public class Accessible
extends java.lang.Object
| Constructor and Description |
|---|
Accessible(java.lang.Object object)
Create the decorator for given object.
|
| Modifier and Type | Method and Description |
|---|---|
AccessibleField |
field(java.lang.reflect.Field f)
Create a decorator for an instance of accessible field.
|
AccessibleField |
field(java.lang.String name)
Create a decorator for an instance of accessible field.
|
AccessibleMethod |
method(java.lang.reflect.Method m)
Create a decorator for an instance of accessible method.
|
AccessibleMethod |
method(java.lang.String m,
java.lang.Class<?>... parameterTypes)
Create a decorator for an instance of accessible method.
|
static Accessible |
on(java.lang.Object object)
Create the decorator for given object.
|
public Accessible(@Nonnull
java.lang.Object object)
object - an instance of object on which you need reflective access@Nonnull public AccessibleMethod method(@Nonnull java.lang.reflect.Method m)
m - method to access@Nonnull public AccessibleMethod method(@Nonnull java.lang.String m, @Nullable java.lang.Class<?>... parameterTypes) throws java.lang.NoSuchMethodException
m - method to accessparameterTypes - an array of specific parameters to distinguish the methodjava.lang.NoSuchMethodException - no method with such name found@Nonnull public AccessibleField field(@Nonnull java.lang.reflect.Field f)
f - field to access@Nonnull public AccessibleField field(@Nonnull java.lang.String name) throws java.lang.NoSuchFieldException
name - field to accessjava.lang.NoSuchFieldException - no field with such name found@Nonnull public static Accessible on(@Nonnull java.lang.Object object)
object - an instance of object on which you need reflective access