Class WeldDefaultProxyServices

java.lang.Object
org.jboss.weld.bean.proxy.util.WeldDefaultProxyServices
All Implemented Interfaces:
org.jboss.weld.bootstrap.api.Service, org.jboss.weld.serialization.spi.ProxyServices

public class WeldDefaultProxyServices extends Object implements org.jboss.weld.serialization.spi.ProxyServices
This class is a default implementation of ProxyServices that will only be loaded if no other implementation is detected. It supports class defining and attempts to use MethodHandles.Lookup if possible making it JDK 11+ friendly. For classes in signed JARs and classes from Java internal packages, we are forced to use custom class loader.
  • Constructor Details

    • WeldDefaultProxyServices

      public WeldDefaultProxyServices()
  • Method Details

    • defineClass

      public Class<?> defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len) throws ClassFormatError
      Specified by:
      defineClass in interface org.jboss.weld.serialization.spi.ProxyServices
      Throws:
      ClassFormatError
    • defineClass

      public Class<?> defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError
      Specified by:
      defineClass in interface org.jboss.weld.serialization.spi.ProxyServices
      Throws:
      ClassFormatError
    • loadClass

      public Class<?> loadClass(Class<?> originalClass, String classBinaryName) throws ClassNotFoundException
      Specified by:
      loadClass in interface org.jboss.weld.serialization.spi.ProxyServices
      Throws:
      ClassNotFoundException
    • cleanup

      public void cleanup()
      Specified by:
      cleanup in interface org.jboss.weld.bootstrap.api.Service