Class CodeGenerator

java.lang.Object
io.deephaven.engine.table.impl.util.codegen.CodeGenerator

public abstract class CodeGenerator extends Object
  • Constructor Details

    • CodeGenerator

      public CodeGenerator()
  • Method Details

    • create

      public static CodeGenerator create(Object... args)
    • block

      public static CodeGenerator block(Object... args)
      Open new block. Opening brace on same line.
    • indent

      public static CodeGenerator indent(Object... args)
      Begin new indentation scope, e.g. to format multiple lines of function parameters.
    • samelineBlock

      public static CodeGenerator samelineBlock(Object... args)
      The tail wagging the dog: the proper method signature for this method is CodeGenerator samelineBlock(String prefix, Object... args) But when I do that, IntelliJ by default litters up the code with parameter hints, which (if the programmer doesn't turn them off), makes the templated code much more unreadable. So instead we just pull out the parameter from here.
      Parameters:
      args - A prefix (of type String) like "else", followed by an arbitrary number of template lines.
      Returns:
      The new component.
    • optional

      public static CodeGenerator optional(Object... args)
      Same "tail wagging the dog" comment applies.
    • repeated

      public static CodeGenerator repeated(Object... args)
      Same "tail wagging the dog" comment applies.
    • replace

      public final void replace(String metaVariable, String replacement)
    • activateOptional

      public final CodeGenerator activateOptional(String tag)
    • activateAllOptionals

      public final void activateAllOptionals(String tag)
    • instantiateNewRepeated

      public final CodeGenerator instantiateNewRepeated(String tag)
    • build

      public final String build()
    • freeze

      public final CodeGenerator freeze()
    • assertNoUnresolvedVariables

      public void assertNoUnresolvedVariables()