|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mule.devkit.dynamic.api.helper.Reflections
public final class Reflections
Helper methods for reflection.
| Method Summary | ||
|---|---|---|
static Class<?> |
asType(Class<?> type)
|
|
static Object |
get(Object object,
String propertyName)
Get value of property for specified object. |
|
static String |
getterMethodName(String propertyName)
|
|
static
|
invoke(Object object,
String method)
|
|
static
|
invoke(Object object,
String method,
Object argument)
|
|
static
|
invoke(Object object,
String method,
Object argument,
Class<?> argumentType)
|
|
static void |
set(Object object,
Map<String,Object> parameters)
Sets parameters for specified object. |
|
static void |
set(Object object,
String propertyName,
Object value)
Sets property to value for specified object. |
|
static Field |
setAccessible(Object object,
String propertyName)
|
|
static String |
setterMethodName(String propertyName)
|
|
static Class<?> |
toPrimitive(Class<?> type)
|
|
static Class<?> |
toType(Class<?> type)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Field setAccessible(Object object,
String propertyName)
public static String getterMethodName(String propertyName)
propertyName -
public static Object get(Object object,
String propertyName)
object - propertyName - public static String setterMethodName(String propertyName)
propertyName -
public static void set(Object object,
String propertyName,
Object value)
object - propertyName - value -
public static void set(Object object,
Map<String,Object> parameters)
object - parameters - public static Class<?> toPrimitive(Class<?> type)
type -
Class
IllegalArgumentException - ig specified Class is not Class.isPrimitive()public static Class<?> toType(Class<?> type)
type -
Class
IllegalArgumentException - ig specified Class is not Class.isPrimitive()public static Class<?> asType(Class<?> type)
type -
Class. Namely convert primitive to their type counterpart.Class.isPrimitive(),
toType(java.lang.Class)
public static <T> T invoke(Object object,
String method,
Object argument)
T - object - method - argument -
for inferred type from arguments
public static <T> T invoke(Object object,
String method,
Object argument,
Class<?> argumentType)
T - object - method - argument - argumentType -
public static <T> T invoke(Object object,
String method)
T - object - method -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||