Class CodeGenerationContext
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.codegen.CodeGenerationContext
-
public class CodeGenerationContext extends java.lang.ObjectContext for generating Bamboo Specs code.
-
-
Constructor Summary
Constructors Constructor Description CodeGenerationContext()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringdecIndentation()Decrement code indentation.java.util.Set<java.lang.String>getImports()intgetIndentationLevel()Current indentation level.java.lang.StringimportClassName(java.lang.Class clazz)Adds a class to the list of classes used in the generated code.java.lang.StringincIndentation()Increment code indentation.java.lang.StringnewLine()Produces a string with new line followed by a number of spaces determined according to the current indentation level.
-
-
-
Method Detail
-
incIndentation
public java.lang.String incIndentation()
Increment code indentation.
-
decIndentation
public java.lang.String decIndentation()
Decrement code indentation.
-
importClassName
public java.lang.String importClassName(java.lang.Class clazz)
Adds a class to the list of classes used in the generated code. The resulting list is used to generate import statements- Parameters:
clazz- class object- Returns:
- class short name
-
newLine
public java.lang.String newLine()
Produces a string with new line followed by a number of spaces determined according to the current indentation level.
-
getIndentationLevel
public int getIndentationLevel()
Current indentation level.- Returns:
- current indentation level.
-
getImports
public java.util.Set<java.lang.String> getImports()
-
-