com.go.trove.classfile
Interface Label
- All Superinterfaces:
- java.lang.Comparable, Location
- public interface Label
- extends Location
A label is used to manipulate a branch instruction's branch location. A
label has a location address. Branch instructions have origin addresses,
which contain the address of the opcode that performs the conditional or
unconditional branch.
Labels are generated by factory methods in the CodeBuilder class.
If a label has any origin addresses, its location address must be set by
the time the CodeBuilder's class file is output.
- Version:
- 22 , 9/07/00
- Author:
- Brian S O'Neill
- See Also:
CodeBuilder
|
Method Summary |
int |
getLocation()
Returns -1 if the location isn't yet fully resolved. |
Label |
setLocation()
Sets the location of a label to be at the current postion in the
code being generated. |
| Methods inherited from interface java.lang.Comparable |
compareTo |
setLocation
public Label setLocation()
- Sets the location of a label to be at the current postion in the
code being generated.
- Returns:
- the Label itself.
getLocation
public int getLocation()
throws java.lang.IllegalStateException
- Returns -1 if the location isn't yet fully resolved.
- Specified by:
getLocation in interface Location
- Throws:
java.lang.IllegalStateException - when the location is unknown because
the setLocation method was never called.