Schnittstelle ICodeAttribute
- Alle Superschnittstellen:
IClassFileAttribute
- Alle bekannten Implementierungsklassen:
CodeAttribute
Description of a code attribute as described in the JVM specifications.
This interface may be implemented by clients.
- Seit:
- 2.0
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungAnswer back the collection of all attributes of the field info.int
Answer back the attribute number of the code attribute.byte[]
Answer back the array of bytes, which represents all the opcodes as described in the JVM specifications.long
Answer back the length of the bytecode contents.Answer back the array of exception entries, if they are present.int
Answer back the exception table length of the code attribute.Answer back the line number attribute, if it exists, null otherwise.Answer back the local variable attribute, if it exists, null otherwise.int
Answer back the max locals value of the code attribute.int
Answer back the max stack value of the code attribute.void
traverse
(IBytecodeVisitor visitor) Define a Java opcodes walker.Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.util.IClassFileAttribute
getAttributeLength, getAttributeName, getAttributeNameIndex
-
Methodendetails
-
getMaxLocals
int getMaxLocals()Answer back the max locals value of the code attribute.- Gibt zurück:
- the max locals value of the code attribute
-
getMaxStack
int getMaxStack()Answer back the max stack value of the code attribute.- Gibt zurück:
- the max stack value of the code attribute
-
getLineNumberAttribute
ILineNumberAttribute getLineNumberAttribute()Answer back the line number attribute, if it exists, null otherwise.- Gibt zurück:
- the line number attribute, if it exists, null otherwise
-
getLocalVariableAttribute
ILocalVariableAttribute getLocalVariableAttribute()Answer back the local variable attribute, if it exists, null otherwise.- Gibt zurück:
- the local variable attribute, if it exists, null otherwise
-
getExceptionTable
IExceptionTableEntry[] getExceptionTable()Answer back the array of exception entries, if they are present. An empty array otherwise.- Gibt zurück:
- the array of exception entries, if they are present. An empty array otherwise
-
getBytecodes
byte[] getBytecodes()Answer back the array of bytes, which represents all the opcodes as described in the JVM specifications.- Gibt zurück:
- the array of bytes, which represents all the opcodes as described in the JVM specifications
-
getCodeLength
long getCodeLength()Answer back the length of the bytecode contents.- Gibt zurück:
- the length of the bytecode contents
-
getAttributesCount
int getAttributesCount()Answer back the attribute number of the code attribute.- Gibt zurück:
- the attribute number of the code attribute
-
getAttributes
IClassFileAttribute[] getAttributes()Answer back the collection of all attributes of the field info. It includes the LineNumberAttribute and the LocalVariableTableAttribute. Returns an empty collection if none.- Gibt zurück:
- the collection of all attributes of the field info. It includes the LineNumberAttribute and the LocalVariableTableAttribute. Returns an empty collection if none
-
getExceptionTableLength
int getExceptionTableLength()Answer back the exception table length of the code attribute.- Gibt zurück:
- the exception table length of the code attribute
-
traverse
Define a Java opcodes walker. All actions are defined in the visitor.- Parameter:
visitor
- The visitor to use to walk the opcodes.- Löst aus:
ClassFormatException
- Exception thrown if the opcodes contain invalid bytes
-