| java.lang.Object org.cojen.classfile.Attribute org.cojen.classfile.attribute.CodeAttr
CodeAttr | public class CodeAttr extends Attribute (Code) | | This class corresponds to the Code_attribute structure as defined in
section 4.7.4 of The Java Virtual Machine Specification.
To make it easier to create bytecode for the CodeAttr, use the
CodeBuilder.
author: Brian S O'Neill See Also: cojen.classfile.Opcode See Also: cojen.classfile.CodeBuilder |
getCodeBuffer | public CodeBuffer getCodeBuffer()(Code) | | Returns null if no CodeBuffer is defined for this CodeAttr.
|
getLength | public int getLength()(Code) | | Returns the length (in bytes) of this object in the class file.
|
getLineNumber | public int getLineNumber(Location start)(Code) | | Returns the line number in the source code from the given bytecode
address (start_pc).
-1 if no line number is mapped for the start_pc. |
localVariableUse | public void localVariableUse(LocalVariable localVar)(Code) | | Indicate a local variable's use information be recorded in the
ClassFile as a debugging aid. If the LocalVariable doesn't provide
both a start and end location, then its information is not recorded.
This method should be called at most once per LocalVariable instance.
|
mapLineNumber | public void mapLineNumber(Location start, int line_number)(Code) | | Map a bytecode address (start_pc) to a line number in the source code
as a debugging aid.
|
setCodeBuffer | public void setCodeBuffer(CodeBuffer code)(Code) | | As a side effect of calling this method, new line number and local
variable tables are created.
|
|
|