|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.gwt.core.ext.soyc.Range
public final class Range
Represents a contiguous region of characters in the compiler output.
Field Summary | |
---|---|
static java.util.Comparator<Range> |
DEPENDENCY_ORDER_COMPARATOR
Sorts Ranges so that a Range will be preceded by any Ranges that enclose it. |
(package private) int |
end
|
(package private) int |
endColumn
|
(package private) int |
endLine
|
static java.util.Comparator<Range> |
SOURCE_ORDER_COMPARATOR
Sorts Ranges into the order in which they would appear in the source code based on start position and end position. |
(package private) com.google.gwt.dev.jjs.SourceInfo |
sourceInfo
|
(package private) int |
start
|
(package private) int |
startColumn
|
(package private) int |
startLine
|
Constructor Summary | |
---|---|
Range(int start,
int end)
Constructor. |
|
Range(int start,
int end,
int startLine,
int startColumn,
int endLine,
int endColumn,
com.google.gwt.dev.jjs.SourceInfo sourceInfo)
A range whose start and end are specified both as character positions and as line numbers and columns. |
|
Range(int start,
int end,
com.google.gwt.dev.jjs.SourceInfo sourceInfo)
Constructor. |
Method Summary | |
---|---|
boolean |
contains(Range o)
Return true if the given Range lies wholly within the Range. |
Range |
createNormalizedCopy(int baseStart,
int baseStartLine)
Creates a Range copy whose start position and line number have been rebased relative to some base position. |
Range |
createOffsetCopy(int positionOffset,
int lineOffset)
Creates a Range copy whose start position and line number have been moved by some known offset size. |
boolean |
equals(java.lang.Object obj)
|
int |
getEnd()
|
int |
getEndColumn()
|
int |
getEndLine()
|
com.google.gwt.dev.jjs.SourceInfo |
getSourceInfo()
|
int |
getStart()
|
int |
getStartColumn()
|
int |
getStartLine()
|
int |
hashCode()
|
int |
length()
|
java.lang.String |
toString()
For debugging use only. |
Range |
withNewEnd(int newEnd,
int newEndLine,
int newEndColumn)
Returns a copy with the end moved. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<Range> DEPENDENCY_ORDER_COMPARATOR
public static final java.util.Comparator<Range> SOURCE_ORDER_COMPARATOR
final int end
final int endColumn
final int endLine
final int start
final int startColumn
final int startLine
final com.google.gwt.dev.jjs.SourceInfo sourceInfo
Constructor Detail |
---|
public Range(int start, int end)
start
- must be non-negativeend
- must be greater than or equal to start
public Range(int start, int end, com.google.gwt.dev.jjs.SourceInfo sourceInfo)
start
- must be non-negativeend
- must be greater than or equal to start
public Range(int start, int end, int startLine, int startColumn, int endLine, int endColumn, com.google.gwt.dev.jjs.SourceInfo sourceInfo)
start
- must be non-negativeend
- must be greater than or equal to start
Method Detail |
---|
public boolean contains(Range o)
true
if the given Range lies wholly within the Range.
public Range createNormalizedCopy(int baseStart, int baseStartLine)
For example a range that starts at byte 5342 when normalized against a base start of 5000 will now start at byte 342.
public Range createOffsetCopy(int positionOffset, int lineOffset)
For example a range that starts at byte 342 when moved by an offset of 5000 will now start at byte 5342.
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int getEnd()
public int getEndColumn()
public int getEndLine()
public com.google.gwt.dev.jjs.SourceInfo getSourceInfo()
public int getStart()
public int getStartColumn()
public int getStartLine()
public int hashCode()
hashCode
in class java.lang.Object
public int length()
public java.lang.String toString()
toString
in class java.lang.Object
public Range withNewEnd(int newEnd, int newEndLine, int newEndColumn)
|
GWT 2.7.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |