类 InterfaceMaker
- java.lang.Object
-
- net.sf.cglib.core.AbstractClassGenerator
-
- net.sf.cglib.proxy.InterfaceMaker
-
- 所有已实现的接口:
ClassGenerator
public class InterfaceMaker extends AbstractClassGenerator
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.- 版本:
- $Id: InterfaceMaker.java,v 1.4 2006/03/05 02:43:19 herbyderby Exp $
- 作者:
- Chris Nokleberg
-
-
嵌套类概要
-
从类继承的嵌套类/接口 net.sf.cglib.core.AbstractClassGenerator
AbstractClassGenerator.ClassLoaderData, AbstractClassGenerator.Source
-
-
构造器概要
构造器 构造器 说明 InterfaceMaker()Create a newInterfaceMaker.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidadd(java.lang.Class clazz)Add all the public methods in the specified class.voidadd(java.lang.reflect.Method method)Add a method signature to the interface.voidadd(Signature sig, org.objectweb.asm.Type[] exceptions)Add a method signature to the interface.java.lang.Classcreate()Create an interface using the current set of method signatures.protected java.lang.ObjectfirstInstance(java.lang.Class type)voidgenerateClass(org.objectweb.asm.ClassVisitor v)protected java.lang.ClassLoadergetDefaultClassLoader()protected java.lang.ObjectnextInstance(java.lang.Object instance)-
从类继承的方法 net.sf.cglib.core.AbstractClassGenerator
create, generate, getAttemptLoad, getClassLoader, getClassName, getCurrent, getNamingPolicy, getProtectionDomain, getStrategy, getUseCache, setAttemptLoad, setClassLoader, setContextClass, setNamePrefix, setNamingPolicy, setStrategy, setUseCache, unwrapCachedValue, wrapCachedClass
-
-
-
-
方法详细资料
-
add
public void add(Signature sig, org.objectweb.asm.Type[] exceptions)
Add a method signature to the interface.- 参数:
sig- the method signature to add to the interfaceexceptions- an array of exception types to declare for the method
-
add
public void add(java.lang.reflect.Method method)
Add a method signature to the interface. The method modifiers are ignored, since interface methods are by definition abstract and public.- 参数:
method- the method to add to the interface
-
add
public void add(java.lang.Class clazz)
Add 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).- 参数:
class- the class containing the methods to add to the interface
-
create
public java.lang.Class create()
Create an interface using the current set of method signatures.
-
getDefaultClassLoader
protected java.lang.ClassLoader getDefaultClassLoader()
-
firstInstance
protected java.lang.Object firstInstance(java.lang.Class type)
- 指定者:
firstInstance在类中AbstractClassGenerator
-
nextInstance
protected java.lang.Object nextInstance(java.lang.Object instance)
- 指定者:
nextInstance在类中AbstractClassGenerator
-
generateClass
public void generateClass(org.objectweb.asm.ClassVisitor v) throws java.lang.Exception- 抛出:
java.lang.Exception
-
-