|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.cglib.core.AbstractClassGenerator
net.sf.cglib.proxy.InterfaceMaker
public class InterfaceMaker
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class net.sf.cglib.core.AbstractClassGenerator |
|---|
AbstractClassGenerator.Source |
| Constructor Summary | |
|---|---|
InterfaceMaker()
Create a new InterfaceMaker. |
|
| Method Summary | |
|---|---|
void |
add(Class clazz)
Add all the public methods in the specified class. |
void |
add(Method method)
Add a method signature to the interface. |
void |
add(Signature sig,
org.objectweb.asm.Type[] exceptions)
Add a method signature to the interface. |
Class |
create()
Create an interface using the current set of method signatures. |
protected Object |
firstInstance(Class type)
|
void |
generateClass(org.objectweb.asm.ClassVisitor v)
|
protected ClassLoader |
getDefaultClassLoader()
|
protected Object |
nextInstance(Object instance)
|
| Methods inherited from class net.sf.cglib.core.AbstractClassGenerator |
|---|
create, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setNamePrefix, setNamingPolicy, setStrategy, setUseCache |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InterfaceMaker()
InterfaceMaker. A new InterfaceMaker
object should be used for each generated interface, and should not
be shared across threads.
| Method Detail |
|---|
public void add(Signature sig,
org.objectweb.asm.Type[] exceptions)
sig - the method signature to add to the interfaceexceptions - an array of exception types to declare for the methodpublic void add(Method method)
method - the method to add to the interfacepublic void add(Class clazz)
getClass, equals, hashCode).
class - the class containing the methods to add to the interfacepublic Class create()
protected ClassLoader getDefaultClassLoader()
getDefaultClassLoader in class AbstractClassGeneratorprotected Object firstInstance(Class type)
firstInstance in class AbstractClassGeneratorprotected Object nextInstance(Object instance)
nextInstance in class AbstractClassGenerator
public void generateClass(org.objectweb.asm.ClassVisitor v)
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||