类 InterfaceMaker
java.lang.Object
cn.taketoday.bytecode.core.AbstractClassGenerator<Object>
cn.taketoday.bytecode.proxy.InterfaceMaker
- 所有已实现的接口:
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.
- 作者:
- Chris Nokleberg, TODAY
-
嵌套类概要
从类继承的嵌套类/接口 cn.taketoday.bytecode.core.AbstractClassGenerator
AbstractClassGenerator.ClassLoaderData -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidadd(MethodSignature sig, Type[] exceptions) Add a method signature to the interface.voidAdd all the public methods in the specified class.voidAdd a method signature to the interface.Class<?>create()Create an interface using the current set of method signatures.protected ObjectfirstInstance(Class<Object> type) voidprotected ClassLoaderprotected ObjectnextInstance(Object instance) 从类继承的方法 cn.taketoday.bytecode.core.AbstractClassGenerator
create, generate, getClassLoader, getClassName, getCurrent, getDefineClassStrategy, getNamingPolicy, getProtectionDomain, getStrategy, getUseCache, isAttemptLoad, setAttemptLoad, setClassLoader, setDefineClassStrategy, setNamePrefix, setNamingPolicy, setNeighbor, setStrategy, setUseCache, unwrapCachedValue, wrapCachedClass
-
字段详细资料
-
signatures
-
-
构造器详细资料
-
InterfaceMaker
public InterfaceMaker()Create a newInterfaceMaker. A newInterfaceMakerobject should be used for each generated interface, and should not be shared across threads.
-
-
方法详细资料
-
add
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
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
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).- 参数:
clazz- the class containing the methods to add to the interface
-
create
Create an interface using the current set of method signatures. -
getDefaultClassLoader
-
firstInstance
- 指定者:
firstInstance在类中AbstractClassGenerator<Object>- 抛出:
Exception
-
nextInstance
- 指定者:
nextInstance在类中AbstractClassGenerator<Object>
-
generateClass
- 抛出:
Exception
-