public final class DiffReflections
extends java.lang.Object
| Constructor and Description |
|---|
DiffReflections() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.reflect.Method |
discoverGetter(java.lang.Class<?> diffClass,
java.lang.String fieldOrMethodName)
Discover the public non-args method for access a field value.
|
static <T> T |
invoke(java.lang.Object instance,
java.lang.reflect.Method method)
Calls the method for the object and returns the value.
|
static DiffConfiguration |
mapAnnotations(java.lang.Class<?> diffClass)
Map the methods of the object that has the annotations for diff and stores in cache.
|
static <T> T |
newInstance(java.lang.Class<T> clazz)
Create a class instance.
|
public static DiffConfiguration mapAnnotations(java.lang.Class<?> diffClass)
diffClass - class that have the diff annotations.public static java.lang.reflect.Method discoverGetter(java.lang.Class<?> diffClass,
java.lang.String fieldOrMethodName)
diffClass - the class that has the getter method.fieldOrMethodName - the name of the field for discover or the name of the getter method.public static <T> T invoke(java.lang.Object instance,
java.lang.reflect.Method method)
T - the type of value returned by the method.instance - the object instance that have the method.method - the getter method to get the value.public static <T> T newInstance(java.lang.Class<T> clazz)
T - object type that will be returned by the class.clazz - class that will be used for create an instance.java.lang.UnsupportedOperationException - if no default constructor exists.Copyright © 2018. All rights reserved.