Atitit apache 和guava的反射工具

本文对比了Apache Commons Lang、Spring Framework及Guava中的反射工具类。详细介绍了各工具类提供的功能,如字段查找、方法调用等,并提供了Apache相关工具类文件的具体字节数。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Atitit apache guava的反射工具

 

apache1

Spring的反射工具类 ReflectionUtils1

Guava 反射工具2

 

 

apache 

34             7,340 ConstructorUtils.java

34            16,263 FieldUtils.java

34             4,918 MemberUtils.java

34            14,175 MethodUtils.java

34            30,316 TypeUtils.java

5 个文件         73,012 字节

 

 

Spring的反射工具类 ReflectionUtils 

 

 Field findField(Class<?> clazz, String name) {  

 Field findField(Class<?> clazz, String name, Class<?> type) {  

 void setField(Field field, Object target, Object value) {  

 Object getField(Field field, Object target) {  

 Method findMethod(Class<?> clazz, String name) {  

 Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {  

 Object invokeMethod(Method method, Object target) {  

 Object invokeMethod(Method method, Object target, Object... args) {  

 Object invokeJdbcMethod(Method method, Object target) throws SQLException {  

 Object invokeJdbcMethod(Method method, Object target, Object... args) throws SQLException {  

 void handleReflectionException(Exception ex) {  

 void handleInvocationTargetException(InvocationTargetException ex) {  

 void rethrowRuntimeException(Throwable ex) {  

 void rethrowException(Throwable ex) throws Exception {  

 boolean declaresException(Method method, Class<?> exceptionType) {  

 boolean isEqualsMethod(Method method) {  

 boolean isHashCodeMethod(Method method) {  

 boolean isToStringMethod(Method method) {  

 boolean isObjectMethod(Method method) {  

 boolean isCglibRenamedMethod(Method renamedMethod) {  

 void makeAccessible(Field field) {  

 void makeAccessible(Method method) {  

 void makeAccessible(Constructor<?> ctor) {  

 void doWithMethods(Class<?> clazz, MethodCallback mc) throws IllegalArgumentException {  

 void doWithMethods(Class<?> clazz, MethodCallback mc, MethodFilter mf)  

 Method[] getAllDeclaredMethods(Class<?> leafClass) throws IllegalArgumentException {  

  public void doWith(Method method) {  

 Method[] getUniqueDeclaredMethods(Class<?> leafClass) throws IllegalArgumentException {  

 void doWithFields(Class<?> clazz, FieldCallback fc) throws IllegalArgumentException {  

 void doWithFields(Class<?> clazz, FieldCallback fc, FieldFilter ff)  

 void shallowCopyFieldState(final Object src, final Object dest) throws IllegalArgumentException {   

  public boolean matches(Field field) {  

 

 

Guava 反射工具

 

Atitit. Class  元数据的反射操作 api apache  工具 - attilax的专栏 - 博客频道 - youkuaiyun.com.html

Atitit利用反射获取子类 集合 以及继承树 - attilax的专栏 - 博客频道 - youkuaiyun.com.html

Spring的反射工具类 ReflectionUtils - 好库文摘.html

google Guava包的reflection解析 _ 并发编程网 – ifeve.com.html

 

作者:: 绰号:老哇的爪子 ( 全名::Attilax Akbar Al Rapanui 阿提拉克斯 阿克巴 阿尔 拉帕努伊 ) 

汉字名:艾提拉(艾龙)   EMAIL:1466519819@qq.com

转载请注明来源: http://blog.youkuaiyun.com/attilax

Atiend

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值