public final class ByteBuddyState extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ByteBuddyState.ProxyDefinitionHelpers
Shared proxy definition helpers.
|
Modifier and Type | Method and Description |
---|---|
ByteBuddyState.ProxyDefinitionHelpers |
getProxyDefinitionHelpers()
Returns the proxy definition helpers to reuse when defining proxies.
|
Class<?> |
load(Class<?> referenceClass,
Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> makeClassFunction)
Load a class generated by ByteBuddy.
|
Class<?> |
loadProxy(Class<?> referenceClass,
net.bytebuddy.TypeCache.SimpleKey cacheKey,
Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> makeProxyFunction)
Load a proxy as generated by the
ProxyFactory . |
static net.bytebuddy.dynamic.loading.ClassLoadingStrategy<ClassLoader> |
resolveClassLoadingStrategy(Class<?> originalClass) |
byte[] |
rewrite(net.bytebuddy.pool.TypePool typePool,
String className,
byte[] originalBytes,
Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> rewriteClassFunction)
Rewrite a class, used by the enhancer.
|
public Class<?> loadProxy(Class<?> referenceClass, net.bytebuddy.TypeCache.SimpleKey cacheKey, Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> makeProxyFunction)
ProxyFactory
.referenceClass
- The main class to proxy - might be an interface.cacheKey
- The cache key.makeProxyFunction
- A function building the proxy.public Class<?> load(Class<?> referenceClass, Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> makeClassFunction)
referenceClass
- The main class to proxy - might be an interface.makeClassFunction
- A function building the class.public byte[] rewrite(net.bytebuddy.pool.TypePool typePool, String className, byte[] originalBytes, Function<net.bytebuddy.ByteBuddy,net.bytebuddy.dynamic.DynamicType.Builder<?>> rewriteClassFunction)
typePool
- the ByteBuddy TypePoolclassName
- The original class name.originalBytes
- The original content of the class.rewriteClassFunction
- The function used to rewrite the class.public ByteBuddyState.ProxyDefinitionHelpers getProxyDefinitionHelpers()
These elements are shared as they are immutable.
public static net.bytebuddy.dynamic.loading.ClassLoadingStrategy<ClassLoader> resolveClassLoadingStrategy(Class<?> originalClass)
Copyright © 2019 JBoss by Red Hat. All rights reserved.