Package org.jboss.weld.bean.proxy.util
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Class<?>defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len) Class<?>defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len, ProtectionDomain protectionDomain) Class<?>
-
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:
defineClassin interfaceorg.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:
defineClassin interfaceorg.jboss.weld.serialization.spi.ProxyServices- Throws:
ClassFormatError
-
loadClass
public Class<?> loadClass(Class<?> originalClass, String classBinaryName) throws ClassNotFoundException - Specified by:
loadClassin interfaceorg.jboss.weld.serialization.spi.ProxyServices- Throws:
ClassNotFoundException
-
cleanup
public void cleanup()- Specified by:
cleanupin interfaceorg.jboss.weld.bootstrap.api.Service
-