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 class
This is a wrapper for DataOutputStream, used for debugging purposes. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) DataVectorAttr<BootstrapMethodData>
(package private) CFVersion
(package private) MethodData
private 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) NestMembersAttr
private PermittedSubclassesAttr
protected ConstantPool
private RecordData
(package private) AttrData
Fields 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 TypeMethodDescriptionvoid
addBootstrapMethod
(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) void
addInnerClass
(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell innerClass, ConstantPool.ConstCell outerClass) (package private) void
addLocVarData
(int opc, Argument arg) void
addNestHost
(ConstantPool.ConstCell hostClass) void
addNestMembers
(List<ConstantPool.ConstCell> classes) void
addPermittedSubclasses
(List<ConstantPool.ConstCell> classes) void
endClass()
void
void
endModule
(ModuleAttr moduleAttr) protected DataVector
private FieldData
final void
init
(int access, ConstantPool.ConstCell me, ConstantPool.ConstCell father, ArrayList<Argument> interfaces) Initializes the ClassData.final void
final boolean
Predicate 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) boolean
boolean
protected void
boolean
private void
boolean
void
Rejects a record: removes the record attribute if there are no componentsprotected void
void
setByteLimit
(int bytelimit) setRecord
(int where) StartMethod
(int access, ConstantPool.ConstCell name, ConstantPool.ConstCell sig, ArrayList exc_table) void
Writes to the directory passed with -d optionvoid
Methods 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:
getAttrVector
in 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()
-