public static final class LineNumberTableAttribute.LineNumber extends java.lang.Object implements Node
LineNumber
denotes a line_number structure somewhere in a LineNumberTable_attribute structure.
This class is not thread-safe.
Modifier and Type | Method and Description |
---|---|
LineNumberTableAttribute.LineNumber |
copy()
Returns a copy of this
LineNumber instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of LineNumber , and that LineNumber instance is equal to this LineNumber instance, false otherwise. |
int |
getLineNumber()
Returns the line_number of this
LineNumber instance. |
int |
getStartPC()
Returns the start_pc of this
LineNumber instance. |
int |
hashCode()
Returns a hash code for this
LineNumber instance. |
static LineNumberTableAttribute.LineNumber |
newInstance(int startPC,
int lineNumber)
Returns a new
LineNumber instance. |
void |
setLineNumber(int lineNumber)
Sets the line_number for this
LineNumber instance. |
void |
setStartPC(int startPC)
Sets the start_pc for this
LineNumber instance. |
java.lang.String |
toString()
Returns a
String representation of this LineNumber instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
LineNumber to dataOutput . |
public LineNumberTableAttribute.LineNumber copy()
LineNumber
instance.LineNumber
instancepublic java.lang.String toString()
String
representation of this LineNumber
instance.toString
in class java.lang.Object
String
representation of this LineNumber
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of LineNumber
, and that LineNumber
instance is equal to this LineNumber
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this LineNumber
instance for equalitytrue
if, and only if, object
is an instance of LineNumber
, and that LineNumber
instance is equal to this LineNumber
instance, false
otherwisepublic int getLineNumber()
LineNumber
instance.LineNumber
instance.public int getStartPC()
LineNumber
instance.LineNumber
instance.public int hashCode()
LineNumber
instance.hashCode
in class java.lang.Object
LineNumber
instancepublic void setLineNumber(int lineNumber)
LineNumber
instance.
If lineNumber
is less than 0
, an IllegalArgumentException
will be thrown.
lineNumber
- the new line_numberjava.lang.IllegalArgumentException
- thrown if, and only if, lineNumber
is less than 0
public void setStartPC(int startPC)
LineNumber
instance.startPC
- the new start_pcpublic void write(java.io.DataOutput dataOutput)
LineNumber
to dataOutput
.
If dataOutput
is an OutputStream
(or any other type of stream), this method will not close it.
If dataOutput
is null
, a NullPointerException
will be thrown.
If an I/O-error occurs, an UncheckedIOException
will be thrown.
dataOutput
- the DataOutput
to write tojava.lang.NullPointerException
- thrown if, and only if, dataOutput
is null
java.io.UncheckedIOException
- thrown if, and only if, an I/O-error occurspublic static LineNumberTableAttribute.LineNumber newInstance(int startPC, int lineNumber)
LineNumber
instance.
If lineNumber
is less than 0
, an IllegalArgumentException
will be thrown.
startPC
- the start_pclineNumber
- the line_numberLineNumber
instancejava.lang.IllegalArgumentException
- thrown if, and only if, lineNumber
is less than 0