Class CodeGenerationContext


  • public class CodeGenerationContext
    extends Object
    Context for generating Bamboo Specs code.
    • Constructor Detail

      • CodeGenerationContext

        public CodeGenerationContext()
    • Method Detail

      • incIndentation

        public String incIndentation()
        Increment code indentation.
      • decIndentation

        public String decIndentation()
        Decrement code indentation.
      • importClassName

        public String importClassName​(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 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 Set<String> getImports()