Class ASMFactoryUtils

java.lang.Object
com.gigaspaces.internal.reflection.fast.ASMFactoryUtils

public final class ASMFactoryUtils extends Object
Base class for all the ASM factories
Since:
7.1
Author:
guy
  • Constructor Details

    • ASMFactoryUtils

      public ASMFactoryUtils()
  • Method Details

    • defineClass

      public static Class defineClass(ClassLoader loader, String name, byte[] b) throws Exception
      Throws:
      Exception
    • getClassTargetLoader

      public static ClassLoader getClassTargetLoader(Class memberClass)
    • getCreateClassNamePrefix

      public static String getCreateClassNamePrefix(String className)
    • getCreateClassNamePrefix

      public static String getCreateClassNamePrefix(Class<?> clazz)
      A generated class must not be defined into a package of an explicit named module (e.g. JDK dynamic proxies live in module jdk.proxyN since JDK 16) - it would become a member of that module, which does not read the unnamed module holding the GigaSpaces ASM base classes. Such classes are relocated, the same as java.* classes. Automatic modules read all unnamed modules, so their classes are not relocated.
    • isRelocated

      public static boolean isRelocated(Class<?> clazz)
      Whether a generated class for the given class is defined outside the class package (see getCreateClassNamePrefix(Class)). Such a generated class has only public access to the class.