Package org.apache.webbeans.spi
Interface DefiningClassService
-
public interface DefiningClassService
SPI interface to implement the proxy defining logic. It enables to switch from unsafe to classloader logic for instance for java @gt;= 9.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> Class<T>
defineAndLoad(String name, byte[] bytecode, Class<T> proxiedClass)
Register the proxy class from its bytecode.ClassLoader
getProxyClassLoader(Class<?> forClass)
Returns the classloader to use to define the given class.
-
-
-
Method Detail
-
getProxyClassLoader
ClassLoader getProxyClassLoader(Class<?> forClass)
Returns the classloader to use to define the given class.- Parameters:
forClass
- the proxied class- Returns:
- the classloader to use to define the class
-
defineAndLoad
<T> Class<T> defineAndLoad(String name, byte[] bytecode, Class<T> proxiedClass)
Register the proxy class from its bytecode.- Type Parameters:
T
- type of the class to proxy- Parameters:
name
- the proxy namebytecode
- the bytecode to "define"proxiedClass
- the original class- Returns:
- the proxy class
-
-