Package org.openjdk.asmtools.jasm
Class ClassData
java.lang.Object
org.openjdk.asmtools.jasm.MemberData
org.openjdk.asmtools.jasm.ClassData
ClassData
This is the main data structure for representing parsed class data. This structure
renders directly to a class file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classThis is a wrapper for DataOutputStream, used for debugging purposes. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) DataVectorAttr<BootstrapMethodData> (package private) CFVersion(package private) MethodDataprivate static final String(package private) Environment(package private) ConstantPool.ConstCell(package private) String(package private) static char(package private) DataVectorAttr<InnerClassData> (package private) ConstantPool.ConstCell(package private) ArrayList<MethodData> (package private) ModuleAttr(package private) String(package private) CPXAttr(package private) NestMembersAttrprivate PermittedSubclassesAttrprotected ConstantPoolprivate RecordData(package private) AttrDataFields inherited from class org.openjdk.asmtools.jasm.MemberData
access, annotAttrInv, annotAttrVis, cls, deprecatedAttr, signatureAttr, syntheticAttr, type_annotAttrInv, type_annotAttrVis -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBootstrapMethod(BootstrapMethodData bsmData) addField(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig) addField(int access, ConstantPool.ConstValue_Pair nape) addFieldIfAbsent(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig) voidaddInnerClass(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell innerClass, ConstantPool.ConstCell outerClass) (package private) voidaddLocVarData(int opc, Argument arg) voidaddNestHost(ConstantPool.ConstCell hostClass) voidaddNestMembers(List<ConstantPool.ConstCell> classes) voidaddPermittedSubclasses(List<ConstantPool.ConstCell> classes) voidendClass()voidvoidendModule(ModuleAttr moduleAttr) protected DataVectorprivate FieldDatafinal voidinit(int access, ConstantPool.ConstCell me, ConstantPool.ConstCell father, ArrayList<Argument> interfaces) Initializes the ClassData.final voidfinal booleanPredicate that describes if this class has an access flag indicating that it is an interface.LocalFieldRef(String name, String sig) LocalFieldRef(FieldData field) mkNape(ConstantPool.ConstCell name, ConstantPool.ConstCell sig) booleanbooleanprotected voidbooleanprivate voidbooleanvoidRejects a record: removes the record attribute if there are no componentsprotected voidvoidsetByteLimit(int bytelimit) setRecord(int where) StartMethod(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig, ArrayList exc_table) voidWrites to the directory passed with -d optionvoidMethods inherited from class org.openjdk.asmtools.jasm.MemberData
addAnnotations, createPseudoMod, getDataVector, init, setSignatureAttr
-
Field Details
-
cfv
CFVersion cfv -
me
-
father
ConstantPool.ConstCell father -
myClassName
String myClassName -
sourceFileNameAttr
AttrData sourceFileNameAttr -
interfaces
-
fields
-
methods
ArrayList<MethodData> methods -
innerClasses
DataVectorAttr<InnerClassData> innerClasses -
bootstrapMethodsAttr
DataVectorAttr<BootstrapMethodData> bootstrapMethodsAttr -
nestHostAttr
CPXAttr nestHostAttr -
nestMembersAttr
NestMembersAttr nestMembersAttr -
recordData
-
permittedSubclassesAttr
-
moduleAttribute
ModuleAttr moduleAttribute -
env
Environment env -
pool
-
DEFAULT_EXTENSION
- See Also:
-
fileExtension
String fileExtension -
cdos
-
curMethod
MethodData curMethod -
fileSeparator
static char fileSeparator
-
-
Constructor Details
-
ClassData
canonical default constructor- Parameters:
env- The error reporting environment.cfv- The class file version that this class file supports.
-
-
Method Details
-
init
public final void init(int access, ConstantPool.ConstCell me, ConstantPool.ConstCell father, ArrayList<Argument> interfaces) Initializes the ClassData.- Parameters:
me- The constant pool reference to this classfather- The constant pool reference to the super classinterfaces- A list of interfaces that this class implements
-
initAsModule
public final void initAsModule() -
isInterface
public final boolean isInterface()Predicate that describes if this class has an access flag indicating that it is an interface.- Returns:
- True if the classes access flag indicates it is an interface.
-
relinkBootstrapMethods
protected void relinkBootstrapMethods() -
numberBootstrapMethods
protected void numberBootstrapMethods() -
setRecord
-
rejectRecord
public void rejectRecord()Rejects a record: removes the record attribute if there are no components -
mkNape
-
mkNape
-
addFieldIfAbsent
public FieldData addFieldIfAbsent(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig) -
getField
-
addField
-
addField
-
addField
-
LocalFieldRef
-
LocalFieldRef
-
LocalFieldRef
public ConstantPool.ConstCell LocalFieldRef(ConstantPool.ConstCell name, ConstantPool.ConstCell sig) -
LocalFieldRef
-
StartMethod
public MethodData StartMethod(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig, ArrayList exc_table) -
EndMethod
public void EndMethod() -
LocalMethodRef
-
LocalMethodRef
public ConstantPool.ConstCell LocalMethodRef(ConstantPool.ConstCell name, ConstantPool.ConstCell sig) -
addLocVarData
-
addInnerClass
public void addInnerClass(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell innerClass, ConstantPool.ConstCell outerClass) -
addBootstrapMethod
-
addNestHost
-
addNestMembers
-
addPermittedSubclasses
-
endClass
public void endClass() -
endModule
-
printInnerClasses
private void printInnerClasses() -
write
- Throws:
IOException
-
getAttrVector
- Specified by:
getAttrVectorin classMemberData
-
write
Writes to the directory passed with -d option- Throws:
IOException
-
setByteLimit
public void setByteLimit(int bytelimit) -
nestHostAttributeExists
public boolean nestHostAttributeExists() -
nestMembersAttributesExist
public boolean nestMembersAttributesExist() -
permittedSubclassesAttributesExist
public boolean permittedSubclassesAttributesExist() -
recordAttributeExists
public boolean recordAttributeExists()
-