T
- the superclass typepublic abstract class AbstractProxyFactory<T> extends AbstractSubclassFactory<T>
reflectionMetadataSource
classFile
Modifier | Constructor and Description |
---|---|
protected |
AbstractProxyFactory(String className,
Class<T> superClass,
ClassLoader classLoader,
ProtectionDomain protectionDomain,
ReflectionMetadataSource reflectionMetadataSource)
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
afterClassLoad(Class<?> clazz)
Sets the accessible flag on the cached methods
|
protected void |
cleanup()
Cleans up any resources left over from generating the class.
|
protected void |
finalizeStaticConstructor()
This method must be called by subclasses after they have finished generating the class.
|
List<Method> |
getCachedMethods()
Returns all Method objects that are cached by the proxy.
|
protected void |
loadMethodIdentifier(Method methodToLoad,
org.jboss.classfilewriter.ClassMethod method)
Writes the bytecode to load an instance of Method for the given method onto the stack
If loadMethod has not already been called for the given method then a static field to hold the method is added to the
class, and code is added to the static constructor to initialize the field to the correct Method.
|
addInterface, addInterface, createConstructorDelegates, createConstructorDelegates, getDefaultConstructorOverride, getDefaultMethodOverride, overrideAllMethods, overrideAllMethods, overrideEquals, overrideEquals, overrideFinalize, overrideFinalize, overrideHashcode, overrideHashcode, overrideMethod, overrideMethod, overridePublicMethods, overridePublicMethods, overrideToString, overrideToString
buildClassDefinition, defineClass, generateClass, getClassLoader, getClassName, getProtectionDomain, getSuperClass, getSuperClassName, isProxyClassDefined, isProxyClassDefined, newInstance
protected AbstractProxyFactory(String className, Class<T> superClass, ClassLoader classLoader, ProtectionDomain protectionDomain, ReflectionMetadataSource reflectionMetadataSource)
className
- the class namesuperClass
- the superclassclassLoader
- the defining class loaderprotectionDomain
- the protection domainprotected void finalizeStaticConstructor()
public void afterClassLoad(Class<?> clazz)
afterClassLoad
in class AbstractClassFactory<T>
clazz
- The newly loaded classpublic List<Method> getCachedMethods()
InvocationHandler
when the corresponding proxy action is invokedprotected void cleanup()
cleanup
in class AbstractSubclassFactory<T>
protected void loadMethodIdentifier(Method methodToLoad, org.jboss.classfilewriter.ClassMethod method)
methodToLoad
- the method to loadmethod
- the subclass method to populateCopyright © 2012 JBoss by Red Hat. All Rights Reserved.