Package se.datadosen.tags
Class Section
java.lang.Object
se.datadosen.tags.Section
String section of a text document with knowledge of whole document,
including source file. Enables correct file, line and column error reporting
- Since:
- 13.6
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionchar
charAt
(int index) Like its String equivalent, but for this SectionHack in ElementNode to pass error context to ScriptletNode.boolean
int
int
getSourceColumn
(int index) int
getSourceLineNumber
(int index) int
hashCode()
int
indexOf
(int ch) int
indexOf
(int ch, int fromIndex) Like its String equivalent, but for this Sectionint
int
int
length()
Like its String equivalent, but for this Sectionvoid
setSourceFile
(File sourceFile) Set source file, for contextboolean
startsWith
(String prefix, int toffset) Like its String equivalent, but for this Sectionsubsection
(int beginIndex) subsection
(int beginIndex, int endIndex) toString()
-
Constructor Details
-
Section
-
Section
-
Section
-
Section
-
Section
-
-
Method Details
-
derive
Hack in ElementNode to pass error context to ScriptletNode. This at least allows us to pass the right file and line number- Parameters:
s
-
-
subsection
-
subsection
-
getBeginIndex
public int getBeginIndex() -
getSourceLineNumber
public int getSourceLineNumber(int index) - Parameters:
index
- position in document, relative to this Section- Returns:
- Source file line number
-
getSourceColumn
public int getSourceColumn(int index) - Parameters:
index
- position in document, relative to this Section- Returns:
- Source file column number
-
getSourceFile
- Returns:
- Source file for context, null if missing
-
setSourceFile
Set source file, for context- Parameters:
sourceFile
-
-
charAt
public char charAt(int index) Like its String equivalent, but for this Section- Parameters:
index
-- Returns:
-
indexOf
public int indexOf(int ch, int fromIndex) Like its String equivalent, but for this Section- Parameters:
ch
-fromIndex
-- Returns:
-
indexOf
public int indexOf(int ch) -
indexOf
-
indexOf
-
startsWith
Like its String equivalent, but for this Section- Parameters:
prefix
-toffset
-- Returns:
-
toString
-
hashCode
public int hashCode() -
equals
-
length
public int length()Like its String equivalent, but for this Section- Returns:
-