public class InterceptedSubclassFactory<T> extends ProxyFactory<T>
Modifier and Type | Field and Description |
---|---|
static String |
PROXY_SUFFIX |
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, log
Constructor and Description |
---|
InterceptedSubclassFactory(Class<?> proxiedBeanType,
Set<? extends Type> typeClosure,
javax.enterprise.inject.spi.Bean<?> bean,
Set<MethodSignature> enhancedMethodSignatures) |
InterceptedSubclassFactory(Class<?> proxiedBeanType,
Set<? extends Type> typeClosure,
String proxyName,
javax.enterprise.inject.spi.Bean<?> bean,
Set<MethodSignature> enhancedMethodSignatures)
Creates a new proxy factory when the name of the proxy class is already
known, such as during de-serialization
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMethods(javassist.bytecode.ClassFile proxyClassType) |
protected void |
addMethodsFromClass(javassist.bytecode.ClassFile proxyClassType) |
protected void |
addSpecialMethods(javassist.bytecode.ClassFile proxyClassType)
Adds methods requiring special implementations rather than just
delegation.
|
protected javassist.bytecode.Bytecode |
createForwardingMethodBody(javassist.bytecode.ClassFile proxyClassType,
MethodInformation method) |
protected javassist.bytecode.Bytecode |
createInterceptorBody(javassist.bytecode.ClassFile file,
MethodInformation methodInfo,
boolean delegateToSuper)
Creates the given method on the proxy class where the implementation
forwards the call directly to the method handler.
|
protected String |
getProxyNameSuffix()
Returns a suffix to append to the name of the proxy class.
|
protected static void |
invokeMethodHandler(javassist.bytecode.ClassFile file,
javassist.bytecode.Bytecode b,
MethodInformation methodInfo,
boolean addReturnInstruction,
BytecodeMethodResolver bytecodeMethodResolver,
boolean addProceed)
calls methodHandler.invoke for a given method
|
addAdditionalInterfaces, addConstructedGuardToMethodBody, addConstructors, addFields, addInterface, addSerializationSupport, create, createInterceptorBody, createSpecialMethodBody, generateEqualsMethod, generateHashCodeMethod, getAdditionalInterfaces, getBaseProxyName, getBean, getBeanType, getProxyClass, invokeMethodHandler, isProxy, resolveClassLoaderForBeanProxy, resolveClassLoaderForBeanProxy, setBeanInstance
public static final String PROXY_SUFFIX
public InterceptedSubclassFactory(Class<?> proxiedBeanType, Set<? extends Type> typeClosure, javax.enterprise.inject.spi.Bean<?> bean, Set<MethodSignature> enhancedMethodSignatures)
public InterceptedSubclassFactory(Class<?> proxiedBeanType, Set<? extends Type> typeClosure, String proxyName, javax.enterprise.inject.spi.Bean<?> bean, Set<MethodSignature> enhancedMethodSignatures)
proxiedBeanType
- the super-class for this proxy classtypeClosure
- the bean types of the beanenhancedMethodSignatures
- a restricted set of methods that need to be interceptedprotected String getProxyNameSuffix()
getProxyNameSuffix
in class ProxyFactory<T>
protected void addMethods(javassist.bytecode.ClassFile proxyClassType)
addMethods
in class ProxyFactory<T>
protected void addMethodsFromClass(javassist.bytecode.ClassFile proxyClassType)
addMethodsFromClass
in class ProxyFactory<T>
protected javassist.bytecode.Bytecode createForwardingMethodBody(javassist.bytecode.ClassFile proxyClassType, MethodInformation method) throws javassist.NotFoundException
createForwardingMethodBody
in class ProxyFactory<T>
javassist.NotFoundException
protected javassist.bytecode.Bytecode createInterceptorBody(javassist.bytecode.ClassFile file, MethodInformation methodInfo, boolean delegateToSuper) throws javassist.NotFoundException
file
- the class filemethodInfo
- any JLR methoddelegateToSuper
- javassist.NotFoundException
protected static void invokeMethodHandler(javassist.bytecode.ClassFile file, javassist.bytecode.Bytecode b, MethodInformation methodInfo, boolean addReturnInstruction, BytecodeMethodResolver bytecodeMethodResolver, boolean addProceed)
file
- the current class fileb
- the bytecode to add the methodHandler.invoke call tomethodInfo
- declaring class of the methodaddReturnInstruction
- set to true you want to return the result ofbytecodeMethodResolver
- The method resolveraddProceed
- protected void addSpecialMethods(javassist.bytecode.ClassFile proxyClassType)
addSpecialMethods
in class ProxyFactory<T>
proxyClassType
- the Javassist class description for the proxy typeCopyright © 2012 Seam Framework. All Rights Reserved.