public static class Compiler.CodeBuilder
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private int |
colCount |
private int |
lineCount |
private java.lang.StringBuilder |
sb |
private java.util.Set<java.lang.String> |
uniqueLicenses |
Constructor and Description |
---|
CodeBuilder() |
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
addLicense(java.lang.String license)
Adds a license and returns whether it is unique (has yet to be encountered).
|
(package private) Compiler.CodeBuilder |
append(java.lang.String str)
Appends the given string to the text buffer.
|
(package private) boolean |
endsWith(java.lang.String suffix)
Determines whether the text ends with the given suffix.
|
(package private) int |
getColumnIndex()
Returns the (zero-based) index of the last column in the text buffer.
|
int |
getLength()
Returns the length of the text buffer.
|
(package private) int |
getLineIndex()
Returns the (zero-based) index of the last line in the text buffer.
|
(package private) void |
reset()
Removes all text, but leaves the line count unchanged.
|
java.lang.String |
toString()
Returns all text in the text buffer.
|
private final java.lang.StringBuilder sb
private int lineCount
private int colCount
private final java.util.Set<java.lang.String> uniqueLicenses
void reset()
Compiler.CodeBuilder append(java.lang.String str)
public java.lang.String toString()
toString
in class java.lang.Object
public int getLength()
int getLineIndex()
int getColumnIndex()
boolean endsWith(java.lang.String suffix)
boolean addLicense(java.lang.String license)