Class AttributeCode
- java.lang.Object
-
- org.benf.cfr.reader.entities.attributes.Attribute
-
- org.benf.cfr.reader.entities.attributes.AttributeCode
-
- All Implemented Interfaces:
KnowsRawName,KnowsRawSize,Dumpable,TypeUsageCollectable
public class AttributeCode extends Attribute
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTRIBUTE_NAMEprivate AttributeMapattributesprivate CodeAnalysercodeAnalyserprivate intcodeLengthprivate ConstantPoolcpprivate java.util.List<ExceptionTableEntry>exceptionTableEntriesprivate intlengthprivate intmaxLocalsprivate intmaxStackprivate static longOFFSET_OF_ATTRIBUTE_LENGTHprivate static longOFFSET_OF_MAX_STACKprivate ByteDatarawData
-
Constructor Summary
Constructors Constructor Description AttributeCode(ByteData raw, ConstantPool cp, ClassFileVersion classFileVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Op04StructuredStatementanalyse()voidcollectTypeUsages(TypeUsageCollector collector)Dumperdump(Dumper d)AttributeMapgetAttributes()intgetCodeLength()ConstantPoolgetConstantPool()java.util.List<ExceptionTableEntry>getExceptionTableEntries()AttributeLineNumberTablegetLineNumberTable()AttributeLocalVariableTablegetLocalVariableTable()intgetMaxLocals()longgetRawByteLength()ByteDatagetRawData()java.lang.StringgetRawName()AttributeRuntimeInvisibleTypeAnnotationsgetRuntimeInvisibleTypeAnnotations()AttributeRuntimeVisibleTypeAnnotationsgetRuntimeVisibleTypeAnnotations()voidreleaseCode()voidsetMethod(Method method)
-
-
-
Field Detail
-
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
OFFSET_OF_ATTRIBUTE_LENGTH
private static final long OFFSET_OF_ATTRIBUTE_LENGTH
- See Also:
- Constant Field Values
-
OFFSET_OF_MAX_STACK
private static final long OFFSET_OF_MAX_STACK
- See Also:
- Constant Field Values
-
length
private final int length
-
maxStack
private final int maxStack
-
maxLocals
private final int maxLocals
-
codeLength
private final int codeLength
-
exceptionTableEntries
private final java.util.List<ExceptionTableEntry> exceptionTableEntries
-
attributes
private final AttributeMap attributes
-
cp
private final ConstantPool cp
-
rawData
private final ByteData rawData
-
codeAnalyser
private final CodeAnalyser codeAnalyser
-
-
Constructor Detail
-
AttributeCode
public AttributeCode(ByteData raw, ConstantPool cp, ClassFileVersion classFileVersion)
-
-
Method Detail
-
setMethod
public void setMethod(Method method)
-
analyse
public Op04StructuredStatement analyse()
-
getConstantPool
public ConstantPool getConstantPool()
-
getLocalVariableTable
public AttributeLocalVariableTable getLocalVariableTable()
-
getLineNumberTable
public AttributeLineNumberTable getLineNumberTable()
-
getRuntimeVisibleTypeAnnotations
public AttributeRuntimeVisibleTypeAnnotations getRuntimeVisibleTypeAnnotations()
-
getRuntimeInvisibleTypeAnnotations
public AttributeRuntimeInvisibleTypeAnnotations getRuntimeInvisibleTypeAnnotations()
-
getRawData
public ByteData getRawData()
-
getExceptionTableEntries
public java.util.List<ExceptionTableEntry> getExceptionTableEntries()
-
getMaxLocals
public int getMaxLocals()
-
getCodeLength
public int getCodeLength()
-
getRawByteLength
public long getRawByteLength()
-
getRawName
public java.lang.String getRawName()
-
collectTypeUsages
public void collectTypeUsages(TypeUsageCollector collector)
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable- Overrides:
collectTypeUsagesin classAttribute
-
releaseCode
public void releaseCode()
-
getAttributes
public AttributeMap getAttributes()
-
-