Class ReflectUtil


  • public class ReflectUtil
    extends Object
    • Constructor Detail

      • ReflectUtil

        public ReflectUtil()
    • Method Detail

      • 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)
      • setProperty

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

        public static Object getProperty​(Object instance,
                                         String propertyName)
      • getClassButThrowIfInvalid

        public static IGosuClass getClassButThrowIfInvalid​(String fullyQualifiedName)
      • extractRuntimeTypes

        public static IType[] extractRuntimeTypes​(Object... args)