public class ClassModifier extends AbstractClassContext
| 限定符和类型 | 字段和说明 |
|---|---|
protected List<IMethodCreator> |
methodModifiers |
classOutPutPath, cw, existedStaticBlock, fieldCreators, methodCreaters| 构造器和说明 |
|---|
ClassModifier(Class<?> clazz) |
getClassOutPutPath, getClassVisitor, getParentClassLoader, loadClass, setClassOutPutPath, setParentClassLoadergetArrayType, getArrayType, getType, newSemiClassprotected List<IMethodCreator> methodModifiers
public ClassModifier(Class<?> clazz)
public final void modifyMethod(String name, Class<?>[] argClasses, KernelModifiedMethodBody mb)
public IMethodCreator createConstructor(int access, AClass[] argTypes, String[] argNames, AClass[] exceptions, KernelConstructorBody body)
access - argTypes - argNames - exceptions - body - public IMethodCreator createMethodForDummy(int access, String name, AClass[] argTypes, String[] argNames, AClass returnClass, AClass[] exceptions, KernelMethodBody body)
createMethod(java.lang.String, cn.wensiqun.asmsupport.standard.def.clazz.AClass[], java.lang.String[], cn.wensiqun.asmsupport.standard.def.clazz.AClass, cn.wensiqun.asmsupport.standard.def.clazz.AClass[], int, cn.wensiqun.asmsupport.core.block.method.common.KernelMethodBody) methodaccess - name - argTypes - argNames - returnClass - exceptions - body - public final void createMethod(String name, AClass[] argClasses, String[] argNames, AClass returnClass, AClass[] exceptions, int access, KernelMethodBody mb)
name - arguments - argNames - returnClass - exceptions - access - mb - public void createStaticMethod(String name, AClass[] argClasses, String[] argNames, AClass returnClass, AClass[] exceptions, int access, KernelStaticMethodBody mb)
name - argClasses - argNames - returnClass - exceptions - access - mb - protected void checkStaticBlock()
checkStaticBlock 在类中 AbstractClassContextpublic void createStaticBlock(KernelStaticBlockBody mb)
public IFieldCreator createField(String name, int modifiers, AClass type)
name - the field namemodifiers - the field modifierstype - the field typepublic IFieldCreator createField(String name, int modifiers, AClass type, Object value)
name - modifiers - type - value - The initial value, this value is only support static field,
otherwise will ignored.This parameter, which may be null
if the field does not have an initial value,
must be an Integer, a Float, a Long, a Double or a
String (for int, float, long or String fields respectively).
This parameter is only used for static fields. Its value is
ignored for non static fields, which must be initialized
through bytecode instructions in constructors or methods.public void modify(Map<String,List<VisitXInsnAdapter>> superConstructorMap)
public Class<?> startup()
IClassContextpublic ProductClass getCurrentClass()
public void setClassWriter(cn.wensiqun.asmsupport.org.objectweb.asm.ClassWriter cw)
public List<IMethodCreator> getMethodModifiers()
Copyright © 2015. All rights reserved.