cn.wensiqun.asmsupport.creator
类 InterfaceCreator
java.lang.Object
cn.wensiqun.asmsupport.clazz.AClassFactory
cn.wensiqun.asmsupport.creator.AbstractClassContext
cn.wensiqun.asmsupport.creator.AbstractClassCreatorContext
cn.wensiqun.asmsupport.creator.InterfaceCreator
- 所有已实现的接口:
- IClassContext
public class InterfaceCreator
- extends AbstractClassCreatorContext
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InterfaceCreator
public InterfaceCreator(int version,
String name,
Class<?>[] interfaces)
- Interface Creator
- 参数:
version - JDK version.name - Interface qualified name.interfaces - super interfaces.
createMethod
public void createMethod(String name,
AClass[] argClasses,
AClass returnClass,
Class<?>[] exceptions)
- declare an interface method
- 参数:
name - method nameargClasses - method argument typesreturnClass - method return type, if null than indicate voidexceptions - what exception you want explicit throw.
createGlobalVariable
public void createGlobalVariable(String name,
AClass fieldClass)
create a global variable. the modifiers "public static final".
if type is primitive than the default value is same to JVM
if type if Object than default value is null.
if you want assign special value to this variable,
you need do it at static block.
- 参数:
name - variable namefieldClass -
createStaticBlock
public InterfaceCreator createStaticBlock(CInitBody cinitb)
create a static block.
you can call this method just on time.
this is different write java code. we can write multiple static block
- 参数:
mb - Method Body
createDefaultConstructor
protected final void createDefaultConstructor()
- 指定者:
- 类
AbstractClassCreatorContext 中的 createDefaultConstructor
Copyright © 2013. All Rights Reserved.