Class CodegenUtil
java.lang.Object
io.helidon.codegen.CodegenUtil
Tools for generating code.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stringcapitalize(String name) Capitalize the first letter of the provided string.static StringProvides copyright header to be added before package declaration.static AnnotationgeneratedAnnotation(TypeName generator, TypeName trigger, TypeName generatedType, String versionId, String comments) Create a generated annotation.static StringtoConstantName(String elementName) Create a constant field for a name of an element.
-
Method Details
-
capitalize
-
toConstantName
-
copyright
Provides copyright header to be added before package declaration.- Parameters:
generator- type of the generator (annotation processor)trigger- type of the class that caused this type to be generatedgeneratedType- type that is going to be generated- Returns:
- copyright string (can be multiline)
-
generatedAnnotation
public static Annotation generatedAnnotation(TypeName generator, TypeName trigger, TypeName generatedType, String versionId, String comments) Create a generated annotation.- Parameters:
generator- type of the generator (annotation processor)trigger- type of the class that caused this type to be generatedgeneratedType- type that is going to be generatedversionId- version of the generatorcomments- additional comments, never use null (use empty string so they do not appear in annotation)- Returns:
- a new annotation to add to the generated type
-