public class Reflection extends Object
| Constructor and Description |
|---|
Reflection() |
| Modifier and Type | Method and Description |
|---|---|
static Object |
convert(Object fromValue,
Class<?> toClass) |
static Object |
convert(Object fromValue,
String toClassStr) |
static Object |
execute(Object obj,
String methodName,
String[] args) |
void |
execute1(String arg1,
Integer arg2,
Double arg3) |
static Object |
fromString(String str)
Used for deserializing strings into objects.
|
static Class<?> |
getClass(String[] classpath,
String classname) |
static String[] |
getFieldNames(Class<?> aClass,
int size) |
static Method[] |
getMethods(Object obj,
String methodName,
String[] args) |
static void |
main(String[] args) |
static String |
toString(Object obj)
Used for serializing objects with type information.
|
public static Object convert(Object fromValue, String toClassStr) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException
public static Object convert(Object fromValue, Class<?> toClass) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException
public static Object execute(Object obj, String methodName, String[] args) throws InvocationTargetException, IllegalAccessException
public static Class<?> getClass(String[] classpath, String classname) throws ClassNotFoundException
ClassNotFoundExceptionpublic static String toString(Object obj)
obj - parameterpublic static Object fromString(String str)
str - String of the form "java.lang.Integer#32"public static void main(String[] args)
Copyright 2004-2019 Solace Corporation. All rights reserved.