public class NullSourceSection extends java.lang.Object implements SourceSection
SourceSection that represents unavailable source, e.g. for language
builtins.| Constructor and Description |
|---|
NullSourceSection(java.lang.String kind,
java.lang.String name)
Placeholder for source that is unavailable, e.g.
|
NullSourceSection(java.lang.String kind,
java.lang.String name,
java.lang.String asCode)
Placeholder for source that is unavailable, e.g.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getCharEndIndex()
Returns the index of the text position immediately following the last character in the
section.
|
int |
getCharIndex()
Returns the 0-based index of the first character in this section.
|
int |
getCharLength()
Returns the length of this section in characters.
|
java.lang.String |
getCode()
Returns text described by this section.
|
java.lang.String |
getIdentifier()
Returns terse text describing this source section, typically used for printing the section.
|
LineLocation |
getLineLocation()
Gets a representation of the first line of the section, suitable for a hash key.
|
java.lang.String |
getShortDescription()
Returns a short description of the source section, using just the file name, rather than its
full path.
|
Source |
getSource()
Representation of the source program that contains this section.
|
int |
getStartColumn()
Returns the 1-based column number of the first character in this section (inclusive).
|
int |
getStartLine()
Returns 1-based line number of the first character in this section (inclusive).
|
java.lang.String |
toString() |
public NullSourceSection(java.lang.String kind,
java.lang.String name)
kind - the general category, e.g. "JS builtin"name - specific name for this sectionpublic NullSourceSection(java.lang.String kind,
java.lang.String name,
java.lang.String asCode)
kind - the general category, e.g. "JS builtin"name - specific name for this sectionasCode - string to return when getCode() is calledpublic final Source getSource()
SourceSectiongetSource in interface SourceSectionpublic final int getStartLine()
SourceSectiongetStartLine in interface SourceSectionpublic final LineLocation getLineLocation()
SourceSectiongetLineLocation in interface SourceSectionpublic final int getStartColumn()
SourceSectiongetStartColumn in interface SourceSectionpublic final int getCharIndex()
SourceSectiongetCharIndex in interface SourceSectionpublic final int getCharLength()
SourceSectiongetCharLength in interface SourceSectionpublic final int getCharEndIndex()
SourceSectiongetCharEndIndex in interface SourceSectionpublic final java.lang.String getIdentifier()
SourceSectiongetIdentifier in interface SourceSectionpublic final java.lang.String getCode()
SourceSectiongetCode in interface SourceSectionpublic final java.lang.String getShortDescription()
SourceSectiongetShortDescription in interface SourceSectionpublic java.lang.String toString()
toString in class java.lang.Object