Class ReflectUtil

java.lang.Object
gw.lang.reflect.ReflectUtil

public class ReflectUtil extends Object
  • Constructor Details

    • ReflectUtil

      public ReflectUtil()
  • Method Details

    • construct

      public static <T> T construct(String typeName, Object... args)
    • 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)
    • getStaticProperty

      public static Object getStaticProperty(String className, String propertyName)
    • getStaticProperty

      public static Object getStaticProperty(IType type, String propertyName)
    • invokeMethod

      public static Object invokeMethod(Object instance, String methodName, Object... args)
    • setProperty

      public static void setProperty(Object instance, String propertyName, Object value)
    • getProperty

      public static Object getProperty(Object instance, String propertyName)
    • 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)
    • findCallableConstructor

      private static IConstructorInfo findCallableConstructor(IType type, IType[] runtimeTypes)
    • ensureTypeIsValid

      private static void ensureTypeIsValid(IType type)
    • extractRuntimeTypes

      public static IType[] extractRuntimeTypes(Object... args)
    • coerce

      public static Object coerce(Object value, IType iType)
    • getEnclosingClassInstance

      public static IGosuObject getEnclosingClassInstance(IGosuObject obj)