反射单词解释

来源:互联网 发布:java的发展方向 编辑:程序博客网 时间:2024/05/29 12:22
newInstance()  --得到一个实例
getField() --得到单个公开属性
getFields --得到全部公开属性
getDeclaredField() --得到单个声明的属性
getDeclaredFields() --得到全部声明的属性
setAccessible --设置为可访问
Field.setAccessible(fArr1, true); --设置全部属性可访问
getMethod() --得到单个公开方法
invoke --执行
getDeclaredMethod --得到单个声明的方法
getDeclaredMethods --得到全部声明的方法
getConstructor -- 获得构造方法
getConstructors -- 获得全部构造方法
0 0