Class CodeGenerationUtils
java.lang.Object
com.atlassian.bamboo.specs.codegen.emitters.CodeGenerationUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendCommaSeparatedList
(CodeGenerationContext context, StringBuilder builder, List<String> valuesAndFails, Set<Integer> indicesOfFails) Generates comma separated list of items.static <T> CodeEmitter<T>
findEmitterByAnnotation
(AnnotatedElement annotatedElement) Checks if a field or class has a code generator specified by an annotation.static boolean
isEmptyField
(Object fieldValue) Checks if value is empty.
-
Method Details
-
appendCommaSeparatedList
public static void appendCommaSeparatedList(CodeGenerationContext context, StringBuilder builder, List<String> valuesAndFails, Set<Integer> indicesOfFails) Generates comma separated list of items. -
isEmptyField
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
-