Package gw.lang.reflect
Class ReflectUtil
java.lang.Object
gw.lang.reflect.ReflectUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
static Object[]
coerceArgsIfNecessary
(IParameterInfo[] parameters, Object... args) static <T> T
static IGosuObject
constructGosuClassInstance
(String className, Object... args) private static void
ensureTypeIsValid
(IType type) static IType[]
extractRuntimeTypes
(Object... args) private static IConstructorInfo
findCallableConstructor
(IType type, IType[] runtimeTypes) static IMethodInfo
findCallableMethod
(String methodName, IType[] runtimeTypes, IType type) static IPropertyInfo
findProperty
(IType type, String propertyName) static IGosuClass
static IGosuClass
getClassButThrowIfInvalid
(String fullyQualifiedName) static IGosuObject
static Object
getProperty
(Object instance, String propertyName) static Object
getStaticProperty
(IType type, String propertyName) static Object
getStaticProperty
(String className, String propertyName) static Object
invokeMethod
(Object instance, String methodName, Object... args) static Object
invokeStaticMethod
(String className, String methodName, Object... args) static void
setProperty
(Object instance, String propertyName, Object value) static void
setStaticProperty
(IType type, String propertyName, Object value) static void
setStaticProperty
(String className, String propertyName, Object value)
-
Constructor Details
-
ReflectUtil
public ReflectUtil()
-
-
Method Details
-
construct
-
constructGosuClassInstance
-
invokeStaticMethod
-
setStaticProperty
-
setStaticProperty
-
getStaticProperty
-
getStaticProperty
-
invokeMethod
-
setProperty
-
getProperty
-
getClass
-
getClassButThrowIfInvalid
-
coerceArgsIfNecessary
-
findProperty
-
findCallableMethod
-
findCallableConstructor
-
ensureTypeIsValid
-
extractRuntimeTypes
-
coerce
-
getEnclosingClassInstance
-