Package gw.lang.reflect
Class ReflectUtil
- java.lang.Object
-
- gw.lang.reflect.ReflectUtil
-
public class ReflectUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ReflectUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectcoerce(Object value, IType iType)static Object[]coerceArgsIfNecessary(IParameterInfo[] parameters, Object... args)static <T> Tconstruct(String typeName, Object... args)static IGosuObjectconstructGosuClassInstance(String className, Object... args)static IType[]extractRuntimeTypes(Object... args)static IMethodInfofindCallableMethod(String methodName, IType[] runtimeTypes, IType type)static IPropertyInfofindProperty(IType type, String propertyName)static IGosuClassgetClass(String fullyQualifiedName)static IGosuClassgetClassButThrowIfInvalid(String fullyQualifiedName)static IGosuObjectgetEnclosingClassInstance(IGosuObject obj)static ObjectgetProperty(Object instance, String propertyName)static ObjectgetStaticProperty(IType type, String propertyName)static ObjectgetStaticProperty(String className, String propertyName)static ObjectinvokeMethod(Object instance, String methodName, Object... args)static ObjectinvokeStaticMethod(String className, String methodName, Object... args)static voidsetProperty(Object instance, String propertyName, Object value)static voidsetStaticProperty(IType type, String propertyName, Object value)static voidsetStaticProperty(String className, String propertyName, Object value)
-
-
-
Method Detail
-
constructGosuClassInstance
public static IGosuObject constructGosuClassInstance(String className, Object... args)
-
invokeStaticMethod
public static Object invokeStaticMethod(String className, String methodName, Object... args)
-
setStaticProperty
public static void setStaticProperty(String className, String propertyName, Object value)
-
setStaticProperty
public static void setStaticProperty(IType type, String propertyName, Object value)
-
getClass
public static IGosuClass getClass(String fullyQualifiedName)
-
getClassButThrowIfInvalid
public static IGosuClass getClassButThrowIfInvalid(String fullyQualifiedName)
-
coerceArgsIfNecessary
public static Object[] coerceArgsIfNecessary(IParameterInfo[] parameters, Object... args)
-
findProperty
public static IPropertyInfo findProperty(IType type, String propertyName)
-
findCallableMethod
public static IMethodInfo findCallableMethod(String methodName, IType[] runtimeTypes, IType type)
-
getEnclosingClassInstance
public static IGosuObject getEnclosingClassInstance(IGosuObject obj)
-
-