Class CodeGenerationUtils

java.lang.Object
com.atlassian.bamboo.specs.codegen.emitters.CodeGenerationUtils

public final class CodeGenerationUtils extends Object
  • Method Details

    • appendCommaSeparatedList

      public static void appendCommaSeparatedList(CodeGenerationContext context, StringBuilder builder, List<String> valuesAndFails, Set<Integer> indicesOfFails)
      Generates comma separated list of items.
    • isEmptyField

      public static boolean isEmptyField(Object fieldValue)
      Checks if value is empty. Object is empty if it is null, is a blank string or an empty collection.
    • findEmitterByAnnotation

      public static <T> CodeEmitter<T> findEmitterByAnnotation(AnnotatedElement annotatedElement) throws CodeGenerationException
      Checks if a field or class has a code generator specified by an annotation.
      Returns:
      instance of code generator or null if no annotation is present.
      Throws:
      CodeGenerationException