Package org.springframework.cglib.proxy
Class InterfaceMaker
java.lang.Object
org.springframework.cglib.core.AbstractClassGenerator
org.springframework.cglib.proxy.InterfaceMaker
- All Implemented Interfaces:
- ClassGenerator
Generates new interfaces at runtime.
 By passing a generated interface to the Enhancer's list of interfaces to
 implement, you can make your enhanced classes handle an arbitrary set
 of method signatures.
- Author:
- Chris Nokleberg
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.cglib.core.AbstractClassGeneratorAbstractClassGenerator.ClassLoaderData, AbstractClassGenerator.Source
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd all the public methods in the specified class.voidAdd a method signature to the interface.voidAdd a method signature to the interface.create()Create an interface using the current set of method signatures.protected ObjectfirstInstance(Class type) voidprotected ClassLoaderprotected ObjectnextInstance(Object instance) Methods inherited from class org.springframework.cglib.core.AbstractClassGeneratorcreate, generate, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getProtectionDomain, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setContextClass, setNamePrefix, setNamingPolicy, setStrategy, setUseCache, unwrapCachedValue, wrapCachedClass
- 
Constructor Details- 
InterfaceMakerpublic InterfaceMaker()Create a newInterfaceMaker. A newInterfaceMakerobject should be used for each generated interface, and should not be shared across threads.
 
- 
- 
Method Details- 
addAdd a method signature to the interface.- Parameters:
- sig- the method signature to add to the interface
- exceptions- an array of exception types to declare for the method
 
- 
addAdd a method signature to the interface. The method modifiers are ignored, since interface methods are by definition abstract and public.- Parameters:
- method- the method to add to the interface
 
- 
addAdd all the public methods in the specified class. Methods from superclasses are included, except for methods declared in the base Object class (e.g.getClass,equals,hashCode).- Parameters:
- class- the class containing the methods to add to the interface
 
- 
createCreate an interface using the current set of method signatures.
- 
getDefaultClassLoader- Specified by:
- getDefaultClassLoaderin class- AbstractClassGenerator
 
- 
firstInstance- Specified by:
- firstInstancein class- AbstractClassGenerator
 
- 
nextInstance- Specified by:
- nextInstancein class- AbstractClassGenerator
 
- 
generateClass- Throws:
- Exception
 
 
-