T
- public final class Reflection<T> extends Object
Modifier and Type | Method and Description |
---|---|
Reflection<T> |
_new() |
Reflection<T> |
_new(Object... args) |
<V> V |
get(String fieldName) |
T |
instance() |
<V> V |
invoke(String methodName,
Object... args) |
Reflection<T> |
invokke(String methodName,
Object... args) |
static <T> Reflection<T> |
on(Class<T> cls) |
static <T> Reflection<T> |
on(String clsName) |
static <T> Reflection<T> |
on(T target) |
Reflection<T> |
set(String fieldName,
Object value) |
public static <T> Reflection<T> on(String clsName)
T
- clsName
- public static <T> Reflection<T> on(Class<T> cls)
T
- cls
- public static <T> Reflection<T> on(T target)
T
- target
- public Reflection<T> _new()
@SafeVarargs public final Reflection<T> _new(Object... args)
args
- public T instance()
public <V> V get(String fieldName)
V
- the value typefieldName
- public Reflection<T> set(String fieldName, Object value)
fieldName
- value
- @SafeVarargs public final <V> V invoke(String methodName, Object... args)
V
- the value typemethodName
- args
- @SafeVarargs public final Reflection<T> invokke(String methodName, Object... args)
methodName
- args
- Copyright © 2020. All rights reserved.