Class CodeAttribute
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileAttribute
org.aspectj.org.eclipse.jdt.internal.core.util.CodeAttribute
- All Implemented Interfaces:
IClassFileAttribute,ICodeAttribute
Default implementation of ICodeAttribute.
-
Field Summary
Fields inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileAttribute
NO_ATTRIBUTES -
Method Summary
Modifier and TypeMethodDescriptionAnswer back the collection of all attributes of the field info.intAnswer 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.longAnswer back the length of the bytecode contents.Answer back the array of exception entries, if they are present.intAnswer 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.intAnswer back the max locals value of the code attribute.intAnswer back the max stack value of the code attribute.voidtraverse(IBytecodeVisitor visitor) Define a Java opcodes walker.Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileAttribute
getAttributeLength, getAttributeName, getAttributeNameIndexMethods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8AtMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.aspectj.org.eclipse.jdt.core.util.IClassFileAttribute
getAttributeLength, getAttributeName, getAttributeNameIndex
-
Method Details
-
getAttributes
Description copied from interface:ICodeAttributeAnswer back the collection of all attributes of the field info. It includes the LineNumberAttribute and the LocalVariableTableAttribute. Returns an empty collection if none.- Specified by:
getAttributesin interfaceICodeAttribute- Returns:
- the collection of all attributes of the field info. It includes the LineNumberAttribute and the LocalVariableTableAttribute. Returns an empty collection if none
- See Also:
-
getAttributesCount
public int getAttributesCount()Description copied from interface:ICodeAttributeAnswer back the attribute number of the code attribute.- Specified by:
getAttributesCountin interfaceICodeAttribute- Returns:
- the attribute number of the code attribute
- See Also:
-
getBytecodes
public byte[] getBytecodes()Description copied from interface:ICodeAttributeAnswer back the array of bytes, which represents all the opcodes as described in the JVM specifications.- Specified by:
getBytecodesin interfaceICodeAttribute- Returns:
- the array of bytes, which represents all the opcodes as described in the JVM specifications
- See Also:
-
getCodeLength
public long getCodeLength()Description copied from interface:ICodeAttributeAnswer back the length of the bytecode contents.- Specified by:
getCodeLengthin interfaceICodeAttribute- Returns:
- the length of the bytecode contents
- See Also:
-
getExceptionTable
Description copied from interface:ICodeAttributeAnswer back the array of exception entries, if they are present. An empty array otherwise.- Specified by:
getExceptionTablein interfaceICodeAttribute- Returns:
- the array of exception entries, if they are present. An empty array otherwise
- See Also:
-
getExceptionTableLength
public int getExceptionTableLength()Description copied from interface:ICodeAttributeAnswer back the exception table length of the code attribute.- Specified by:
getExceptionTableLengthin interfaceICodeAttribute- Returns:
- the exception table length of the code attribute
- See Also:
-
getLineNumberAttribute
Description copied from interface:ICodeAttributeAnswer back the line number attribute, if it exists, null otherwise.- Specified by:
getLineNumberAttributein interfaceICodeAttribute- Returns:
- the line number attribute, if it exists, null otherwise
- See Also:
-
getLocalVariableAttribute
Description copied from interface:ICodeAttributeAnswer back the local variable attribute, if it exists, null otherwise.- Specified by:
getLocalVariableAttributein interfaceICodeAttribute- Returns:
- the local variable attribute, if it exists, null otherwise
- See Also:
-
getMaxLocals
public int getMaxLocals()Description copied from interface:ICodeAttributeAnswer back the max locals value of the code attribute.- Specified by:
getMaxLocalsin interfaceICodeAttribute- Returns:
- the max locals value of the code attribute
- See Also:
-
getMaxStack
public int getMaxStack()Description copied from interface:ICodeAttributeAnswer back the max stack value of the code attribute.- Specified by:
getMaxStackin interfaceICodeAttribute- Returns:
- the max stack value of the code attribute
- See Also:
-
traverse
Description copied from interface:ICodeAttributeDefine a Java opcodes walker. All actions are defined in the visitor.- Specified by:
traversein interfaceICodeAttribute- Parameters:
visitor- The visitor to use to walk the opcodes.- Throws:
ClassFormatException- Exception thrown if the opcodes contain invalid bytes- See Also:
-