|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectua.gradsoft.termware.util.JavaLangReflectHelper
public class JavaLangReflectHelper
Helper class for work with java language reflection interfaces.
| Constructor Summary | |
|---|---|
JavaLangReflectHelper()
|
|
| Method Summary | |
|---|---|
static Method |
findClassMethodByNameAndArity(Class objectClass,
String name,
int arity)
find method in class objectClass or it superclass with given name and arity. |
static List<Class> |
getAllSuperClasses(Class aClass)
|
static List<Class<?>> |
getAllSuperInterfaces(Class<?> aClass)
|
static Class |
getBigDecimalClass()
|
static Class |
getBigIntegerClass()
|
static Class |
getCharacterClass()
|
static Object[] |
getEmptyArray()
|
static Class |
getObjectArrayClass()
|
static Class |
getStringClass()
|
static Object |
instantiateObject(String className)
instantiate Object with given class name using empty constructor |
static Object |
instantiateObject(String className,
Class argClass,
Object arg)
instantiate object with given class name, using constructor with one argument of class argClass. |
static Object |
invokeObjectMethod(Object o,
Method m)
|
static Object |
invokeObjectMethod(Object o,
Method m,
Object[] arguments)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JavaLangReflectHelper()
| Method Detail |
|---|
public static final Class getStringClass()
public static final Class getCharacterClass()
public static final Class getBigIntegerClass()
public static final Class getBigDecimalClass()
public static final Class getObjectArrayClass()
public static final Object[] getEmptyArray()
public static final List<Class<?>> getAllSuperInterfaces(Class<?> aClass)
public static final List<Class> getAllSuperClasses(Class aClass)
public static Object instantiateObject(String className)
throws InvocationException
InvocationException
public static Object instantiateObject(String className,
Class argClass,
Object arg)
throws InvocationException
InvocationException
public static Method findClassMethodByNameAndArity(Class objectClass,
String name,
int arity)
throws JavaMethodNotFoundException
objectClass or it superclass with given name and arity.
Method in result have name name and number of arguments arity or
arity+1 . If number of parameters is arity+1 then first parameter
have type TransformationContext .
JavaMethodNotFoundException - if such method does not exists.
public static Object invokeObjectMethod(Object o,
Method m)
throws InvocationException
InvocationException
public static Object invokeObjectMethod(Object o,
Method m,
Object[] arguments)
throws InvocationException
InvocationException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||