Class GeneratorContext
- java.lang.Object
-
- org.reploop.parser.thrift.generator.GeneratorContext
-
- All Implemented Interfaces:
Serializable
public class GeneratorContext extends Object implements Serializable
Code Generator Context.- Since:
- 2016-05-16 17
- Author:
- George Cao(georgecao@outlook.com)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_INDENTstatic GeneratorContextONE_INDENT_CONTEXTstatic GeneratorContextZERO_INDENT_CONTEXT
-
Constructor Summary
Constructors Constructor Description GeneratorContext()GeneratorContext(int indent)GeneratorContext(int indent, Map<Service,StringBuilder> services)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringBuildercode(Service service)GeneratorContextcopy()GeneratorContextcopyThenIndent()GeneratorContextcopyThenIndent(int indent)GeneratorContextdedent()GeneratorContextdedent(int dedent)intgetIndent()Map<Service,StringBuilder>getServices()GeneratorContextindent()GeneratorContextindent(int indent)GeneratorContextindentThenCopy()GeneratorContextindentThenCopy(int indent)StringtoString()
-
-
-
Field Detail
-
DEFAULT_INDENT
public static final int DEFAULT_INDENT
- See Also:
- Constant Field Values
-
ZERO_INDENT_CONTEXT
public static GeneratorContext ZERO_INDENT_CONTEXT
-
ONE_INDENT_CONTEXT
public static GeneratorContext ONE_INDENT_CONTEXT
-
-
Constructor Detail
-
GeneratorContext
public GeneratorContext(int indent, Map<Service,StringBuilder> services)
-
GeneratorContext
public GeneratorContext(int indent)
-
GeneratorContext
public GeneratorContext()
-
-
Method Detail
-
getIndent
public int getIndent()
-
getServices
public Map<Service,StringBuilder> getServices()
-
code
public StringBuilder code(Service service)
-
copyThenIndent
public GeneratorContext copyThenIndent()
-
copyThenIndent
public GeneratorContext copyThenIndent(int indent)
-
indentThenCopy
public GeneratorContext indentThenCopy()
-
indentThenCopy
public GeneratorContext indentThenCopy(int indent)
-
copy
public GeneratorContext copy()
-
indent
public GeneratorContext indent()
-
indent
public GeneratorContext indent(int indent)
-
dedent
public GeneratorContext dedent()
-
dedent
public GeneratorContext dedent(int dedent)
-
-