public class TemplateSource extends Object implements CharSequence
LexerImpl. It is possible to advance through the sequence without
allocating a copy and it is possible to perform regex matches from the
logical beginning of the remaining un-tokenized source. This class will also
standardize newline characters from different architectures.| Constructor and Description |
|---|
TemplateSource(Reader reader,
String filename)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
advance(int amount)
Moves the start index a certain amount.
|
void |
advanceThroughWhitespace() |
char |
charAt(int index) |
String |
getFilename() |
int |
getLineNumber() |
int |
length() |
CharSequence |
subSequence(int start,
int end) |
String |
substring(int end) |
String |
substring(int start,
int end) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitchars, codePointspublic TemplateSource(Reader reader, String filename) throws IOException
reader - Reader provided by the Loaderfilename - Filename of the templateIOException - Exceptions thrown from the readerpublic void advance(int amount)
amount - Amount of characters to advance bypublic void advanceThroughWhitespace()
public String substring(int start, int end)
public String substring(int end)
public int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic String toString()
toString in interface CharSequencetoString in class Objectpublic int getLineNumber()
public String getFilename()
Copyright © 2015. All rights reserved.