|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.weld.bean.proxy.ProxyFactory<T>
org.jboss.weld.bean.proxy.InterceptedSubclassFactory<T>
public class InterceptedSubclassFactory<T>
Factory for producing subclasses that are used by the combined interceptors and decorators stack.
Field Summary | |
---|---|
static String |
PROXY_SUFFIX
|
Fields inherited from class org.jboss.weld.bean.proxy.ProxyFactory |
---|
CONSTRUCTED_FLAG_NAME, DEFAULT_METHOD_RESOLVER, DEFAULT_PROXY_PACKAGE, log |
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROXY_SUFFIX
Constructor Detail |
---|
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 interceptedMethod Detail |
---|
protected 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 type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |