Class ReflectionUtil

java.lang.Object
com.gigaspaces.internal.reflection.ReflectionUtil

public class ReflectionUtil extends Object
  • Constructor Details

    • ReflectionUtil

      public ReflectionUtil()
  • Method Details

    • createInstanceWithOptionalDependencies

      public static Object createInstanceWithOptionalDependencies(Class<?> factoryClass)
    • createProxy

      public static Object createProxy(ClassLoader loader, Class<?>[] interfaces, ProxyInvocationHandler handler, boolean allowCache)
    • createCtor

      public static <T> IConstructor<T> createCtor(Class<T> type)
    • createCtor

      public static <T> IConstructor<T> createCtor(Constructor<T> ctor)
    • createParamsCtor

      public static <T> IParamsConstructor<T> createParamsCtor(Constructor<T> ctor)
    • createMethod

      public static <T> IMethod<T> createMethod(Method method)
    • createMethod

      public static <T> IMethod<T> createMethod(ClassLoader classLoader, Method method)
    • createMethods

      public static <T> IMethod<T>[] createMethods(Method[] methods)
    • createMethods

      public static <T> IMethod<T>[] createMethods(ClassLoader classLoader, Method[] methods)
    • createGetterMethod

      public static <T> IGetterMethod<T> createGetterMethod(Method method)
    • createGetterMethod

      public static <T> IGetterMethod<T> createGetterMethod(ClassLoader classLoader, Method method)
    • createSetterMethod

      public static <T> ISetterMethod<T> createSetterMethod(Method method)
    • createSetterMethod

      public static <T> ISetterMethod<T> createSetterMethod(ClassLoader classLoader, Method method)
    • createField

      public static <T, F> IField<T,F> createField(Field field)
    • createFieldProperties

      public static <T> IProperties<T> createFieldProperties(Class<T> declaringClass, Field[] fields)
    • getConstructorParametersNames

      public static <T> String[] getConstructorParametersNames(Constructor<T> ctor)
    • createProperties

      public static <T> IProperties<T> createProperties(SpaceTypeInfo typeInfo)
    • getCanonicalSortedFields

      public static List<IField> getCanonicalSortedFields(Class claz)
      Return the canonical sorted fields of the specified class. We define the order of canonical sorted fields of class C as follows:

      If C is "java.lang.Object", it is the regular sorting of C. Otherwise, let C1 be the superclass of C, then the canonical order is the canonical order of C1 follow by the regular order of C.

      The definition is well defined and independent of JVM/Platform. Moreover, it has the quality that fields of superclasses appear before fields of subclasses. The legal fields are according to isUsableField(IField)

    • isPublic

      public static boolean isPublic(Class<?> type)
    • assertIsPublic

      public static void assertIsPublic(Class<?> type)
    • getDefaultConstructor

      public static <T> Constructor<T> getDefaultConstructor(Class<T> type)
    • assertHasDefaultConstructor

      public static void assertHasDefaultConstructor(Class<?> type)
    • isProxyClass

      public static boolean isProxyClass(Class<?> clz)
    • getInvocationHandler

      public static Object getInvocationHandler(Object obj)
      A generic method retrieves the InvocationHandler of a Proxy or an AbstractProxy.
    • getAllInterfacesForClassAsSet

      public static Set<Class> getAllInterfacesForClassAsSet(Class clazz)
    • getInternalName

      public static String getInternalName(Class c)
    • getDescriptor

      public static String getDescriptor(Class c)
    • getClassTargetLoader

      public static ClassLoader getClassTargetLoader(Class memberClass)
    • getMethodDescriptor

      public static String getMethodDescriptor(Method m)