程序能够访问,检测和修改它自己状态或行为的一种能力,并能根据自身行为的状态和结果,调整或修改应用所描述行为的状态和相关的语义。java
java.lang.Class 数组
java.lang.reflect.Constructor异步
java.lang.reflect.Field this
java.lang.reflect.Methodurl
java.lang.reflect.Modifierspa
AccessibleObjectcode
Array对象
Proxy接口
getConstructor资源
getConstructors
getDeclaredConstructor
getDeclaredConstructors
getField
getFields
getDeclaredField
getDeclaredFields
getMethod
getMethods
getDeclaredMethod
getDeclaredMethods
getClasses
getDeclaredClasses
getAnnnotation
getAnnnotations
getAnnnotationsByTpe
getSuperClass
getGenericSuperClass 获取包含泛型的父类
getAnnotatedSuperclass 获取extends父类时的标注的注解和父类,如class B extends @Anno A { }
getInterfaces
getGenericInterfaces 获取包含泛型的接口
getAnnotatedInterfaces 获取implements接口时的标注的注解和接口,如class C implements @AnnoA A,@AnnoB B { }
getDeclaringClass 返回Class对象,表示this类在return类中被声明,this类对象所表示的类或接口是return类的成员。
getEnclosingClass
getEnclosingConstructor
getEnclosingMethod
isInstance
isPrimitive
isArray
isMemberClass 成员类
isLocalClass 局部类
isAnnonymousClass 匿名类
isInterface
isEnum
isAnnotation
getName 内部名
getSimpleName 缩写名
getCanonicalName 全称名
newInstance 无参构造方法建立对象,没有无参构造方法拋异常InstantiationException
getClassLoader
getTypeParameters 泛型参数
getModifiers 修饰符
getPackage
getResource 获取资源返回url
getResourceAsStream 获取资源返回InputStream
getName
getModifiers
isVarArgs 可变参
isSynthetic 由编译器自动添加,在非静态成员类用于传人外部类对象的构造方法是复合构造方法
newInstance
getGenericParameterTypes 形参泛型参数类型
getParameterTypes 形参参数类型
getTypeParameters 泛型参数占位符
getExceptionTypes
getGenericExceptionTypes
getAnnotation
getDeclaredAnnotations
getParameterAnnotations 注解在形参
getName
getDeclaringClass 获取Field声明所在的类
getModifiers
isEnumConstant 是否枚举
isSynthetic 由编译器自动添加,在非静态成员类用于访问外部类的变量是复合变量
getXXX
get
setXXX
set
getType
getGenericType
getAnnotation
getDeclaredAnnotations
getName
invoke 异步执行
getDeclaringClass 获取Method声明所在的类
getModifiers
isVarArgs 可变参
getDefaultValue
isSynthetic 由编译器自动添加,在非静态成员类用于访问外部类的方法是复合方法
getGenericParameterTypes 形参泛型参数类型
getParameterTypes 形参参数类型
getReturnType
getGenericReturnType
getAnnotation
getDeclaredAnnotations
getParameterAnnotations
getExceptionTypes
getGenericExceptionTypes
PUBLIC
FINAL
STRICT strictfp
VOLATILE
...
isPublic
isFinal
isStrict
isVolatile
...
getAnnotation
getAnnotations
getDeclaredAnnotations
isAccessible
isAnnotationPresent 若是指定类型的注释存在于此元素上,则返回 true,不然返回 false。
setAccessible 静态方法
setAccessible
静态方法
get
getXXX
getLength
newInstance 有指定数组维度
set
setXXX
静态方法
getInvocationHandler
getProxyClass
isProxyClass
newProxyInstance