public interface IOutputBuffer
| Modifier and Type | Method and Description |
|---|---|
void |
chop(int numberOfCharacters)
Removes the specified number of characters from the end of the buffer.
|
String |
control(String id,
boolean enabled,
String contents)
Appends a controlled region to the buffer.
|
String |
control(String startComment,
String endComment,
String id,
boolean enabled,
String contents)
Appends a controlled region to the buffer.
|
void |
formatWith(Formatter formatter)
Reformats the contents of the buffer with the given
Formatter. |
int |
getCurrentColumnNumber()
Returns the character number of the last character in the buffer.
|
int |
getCurrentLineNumber()
Returns the line number of the last character in the buffer.
|
int |
getOffset()
Returns the size of the buffer.
|
String |
getSpaces(int howMany)
Returns a string comprised of the specificed number of spaces.
|
String |
preserve(String id,
boolean enabled,
String contents)
Appends a protected region to the buffer.
|
String |
preserve(String startComment,
String endComment,
String id,
boolean enabled,
String contents)
Appends a protected region to the buffer.
|
void |
print(Object o)
Appends a string representation of the given object to the buffer.
|
void |
printdyn(Object o)
Appends a string representation of the given object to the buffer, correcting
the indentation of the string representation to match the indentation level of
the previous line in the buffer.
|
void |
println()
Appends a new line the buffer.
|
void |
println(Object o)
Appends a string representation of the given object and a new line to the buffer.
|
void |
prinx(Object o)
An alias for
print(Object) that should only be called
internally, by code generated by the Preprocessor. |
void |
setContentType(String name)
Specifies the type of output in the buffer, such as Java or HTML.
|
String |
startControl(String id,
boolean enabled)
Appends the starting tag for a controlled region to the buffer.
|
String |
startControl(String startComment,
String endComment,
String id,
boolean enabled)
Appends the starting tag for a protected region to the buffer.
|
String |
startPreserve(String id,
boolean enabled)
Appends the starting tag for a protected region to the buffer.
|
String |
startPreserve(String startComment,
String endComment,
String id,
boolean enabled)
Appends the starting tag for a protected region to the buffer.
|
void |
stop()
Halts execution of the current template.
|
String |
stopControl()
Appends a closing tag for a protected region to the buffer.
|
String |
stopPreserve()
Appends a closing tag for a protected region to the buffer.
|
String |
toString()
Converts the contents of the buffer to a string.
|
void chop(int numberOfCharacters)
void print(Object o)
void println()
void println(Object o)
void printdyn(Object o)
void prinx(Object o)
print(Object) that should only be called
internally, by code generated by the Preprocessor. This
is a workaround to allow us to identify, in the preprocessed EOL,
statements that were generated from an EGL static section. We then
adjust these ASTs to allow better traceability in the AST outline
view.String getSpaces(int howMany)
void setContentType(String name) throws EglRuntimeException
EglRuntimeException - if the content type is not supported.String preserve(String id, boolean enabled, String contents) throws EglRuntimeException
id - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notcontents - - the contents for this protected regionEglRuntimeException - if setContentType(String) has not been called.String preserve(String startComment, String endComment, String id, boolean enabled, String contents) throws EglRuntimeException
startComment - - the character sequence used to denote the start of a comment for the type of output in the bufferendComment - - the character sequence used to denote the end of a comment for the type of output in the bufferid - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notcontents - - the contents for this protected regionEglRuntimeExceptionString startPreserve(String id, boolean enabled) throws EglRuntimeException
id - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notEglRuntimeException - if setContentType(String) has not been calledString startPreserve(String startComment, String endComment, String id, boolean enabled) throws EglRuntimeException
startComment - - the character sequence used to denote the start of a comment for the type of output in the bufferendComment - - the character sequence used to denote the end of a comment for the type of output in the bufferid - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notEglRuntimeExceptionString stopPreserve() throws EglRuntimeException
EglRuntimeException - if there is no unclosed protected region in the buffer.String control(String id, boolean enabled, String contents) throws EglRuntimeException
id - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notcontents - - the contents for this protected regionEglRuntimeException - if setContentType(String) has not been called.String control(String startComment, String endComment, String id, boolean enabled, String contents) throws EglRuntimeException
startComment - - the character sequence used to denote the start of a comment for the type of output in the bufferendComment - - the character sequence used to denote the end of a comment for the type of output in the bufferid - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notcontents - - the contents for this protected regionEglRuntimeExceptionString startControl(String id, boolean enabled) throws EglRuntimeException
id - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notEglRuntimeException - if setContentType(String) has not been calledString startControl(String startComment, String endComment, String id, boolean enabled) throws EglRuntimeException
startComment - - the character sequence used to denote the start of a comment for the type of output in the bufferendComment - - the character sequence used to denote the end of a comment for the type of output in the bufferid - - a unique identifier for this protected regionenabled - - a flag indicating whether protection of text in this region should be enabled or notEglRuntimeExceptionString stopControl() throws EglRuntimeException
EglRuntimeException - if there is no unclosed protected region in the buffer.void stop()
throws EglStoppedException
EglStoppedExceptionint getCurrentLineNumber()
int getCurrentColumnNumber()
int getOffset()
void formatWith(Formatter formatter)
Formatter.Copyright © 2016. All rights reserved.