Java org.springframework.util ReflectionUtils fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.util ReflectionUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.util ReflectionUtils.

The text is from its open source code.

Subclass

org.springframework.util.ReflectionUtils has subclasses.
Click this link to see all its subclasses.

Field

MethodFilterUSER_DECLARED_METHODS
Pre-built MethodFilter that matches all non-bridge non-synthetic methods which are not declared on java.lang.Object .
FieldFilterCOPYABLE_FIELDS
Pre-built FieldFilter that matches all non-static, non-final fields.

Method

voidclearCache()
Clear the internal method/field cache.
booleandeclaresException(Method method, Class exceptionType)
Determine whether the given method explicitly declares the given exception or one of its superclasses, which means that an exception of that type can be propagated as-is within a reflective invocation.
voiddoWithFields(Class clazz, FieldCallback fc)
Invoke the given callback on all fields in the target class, going up the class hierarchy to get all declared fields.
voiddoWithFields(Class clazz, FieldCallback fc, @Nullable FieldFilter ff)
Invoke the given callback on all fields in the target class, going up the class hierarchy to get all declared fields.
voiddoWithLocalFields(Class clazz, FieldCallback fc)
Invoke the given callback on all locally declared fields in the given class.
voiddoWithLocalMethods(Class clazz, MethodCallback mc)
Perform the given callback operation on all matching methods of the given class, as locally declared or equivalent thereof (such as default methods on Java 8 based interfaces that the given class implements).
voiddoWithMethods(Class clazz, MethodCallback mc)
Perform the given callback operation on all matching methods of the given class and superclasses.
voiddoWithMethods(Class clazz, MethodCallback mc, @Nullable MethodFilter mf)
Perform the given callback operation on all matching methods of the given class and superclasses (or given interface and super-interfaces).
FieldfindField(Class clazz, String name)
Attempt to find a Field field on the supplied Class with the supplied name .
FieldfindField(Class clazz, @Nullable String name, @Nullable Class type)
Attempt to find a Field field on the supplied Class with the supplied name and/or Class type .
MethodfindMethod(Class clazz, String name, @Nullable Class... paramTypes)
Attempt to find a Method on the supplied class with the supplied name and parameter types.
MethodfindMethod(Class clazz, String name)
Attempt to find a Method on the supplied class with the supplied name and no parameters.
Method[]getAllDeclaredMethods(Class leafClass)
Get all declared methods on the leaf class and all superclasses.
ObjectgetField(Field field, @Nullable Object target)
Get the field represented by the supplied Field field object on the specified Object target object .
Method[]getUniqueDeclaredMethods(Class leafClass)
Get the unique set of declared methods on the leaf class and all superclasses.
voidhandleInvocationTargetException(InvocationTargetException ex)
Handle the given invocation target exception.
voidhandleReflectionException(Exception ex)
Handle the given reflection exception.
ObjectinvokeMethod(Method method, @Nullable Object target)
Invoke the specified Method against the supplied target object with no arguments.
ObjectinvokeMethod(Method method, @Nullable Object target, @Nullable Object... args)
Invoke the specified Method against the supplied target object with the supplied arguments.
booleanisEqualsMethod(@Nullable Method method)
Determine whether the given method is an "equals" method.
booleanisHashCodeMethod(@Nullable Method method)
Determine whether the given method is a "hashCode" method.
booleanisObjectMethod(@Nullable Method method)
Determine whether the given method is originally declared by java.lang.Object .
booleanisPublicStaticFinal(Field field)
Determine whether the given field is a "public static final" constant.
booleanisToStringMethod(@Nullable Method method)
Determine whether the given method is a "toString" method.
voidmakeAccessible(Constructor ctor)
Make the given constructor accessible, explicitly setting it accessible if necessary.
voidmakeAccessible(Method method)
Make the given method accessible, explicitly setting it accessible if necessary.
voidmakeAccessible(Field field)
Make the given field accessible, explicitly setting it accessible if necessary.
voidrethrowException(Throwable ex)
Rethrow the given Throwable exception , which is presumably the target exception of an InvocationTargetException .
voidrethrowRuntimeException(Throwable ex)
Rethrow the given Throwable exception , which is presumably the target exception of an InvocationTargetException .
voidsetField(Field field, @Nullable Object target, @Nullable Object value)
Set the field represented by the supplied Field field object on the specified Object target object to the specified value .