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.String
ATTRIBUTE_NAME
private AttributeMap
attributes
private CodeAnalyser
codeAnalyser
private int
codeLength
private ConstantPool
cp
private java.util.List<ExceptionTableEntry>
exceptionTableEntries
private int
length
private int
maxLocals
private int
maxStack
private static long
OFFSET_OF_ATTRIBUTE_LENGTH
private static long
OFFSET_OF_MAX_STACK
private ByteData
rawData
-
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 Op04StructuredStatement
analyse()
void
collectTypeUsages(TypeUsageCollector collector)
Dumper
dump(Dumper d)
AttributeMap
getAttributes()
int
getCodeLength()
ConstantPool
getConstantPool()
java.util.List<ExceptionTableEntry>
getExceptionTableEntries()
AttributeLineNumberTable
getLineNumberTable()
AttributeLocalVariableTable
getLocalVariableTable()
int
getMaxLocals()
long
getRawByteLength()
ByteData
getRawData()
java.lang.String
getRawName()
AttributeRuntimeInvisibleTypeAnnotations
getRuntimeInvisibleTypeAnnotations()
AttributeRuntimeVisibleTypeAnnotations
getRuntimeVisibleTypeAnnotations()
void
releaseCode()
void
setMethod(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:
collectTypeUsages
in interfaceTypeUsageCollectable
- Overrides:
collectTypeUsages
in classAttribute
-
releaseCode
public void releaseCode()
-
getAttributes
public AttributeMap getAttributes()
-
-