java.lang.Object
io.helidon.codegen.classmodel.Annotation
Model of the annotation.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionAccess modifier of this component.static Annotation.Builder
builder()
NewAnnotation.Builder
instance.static Annotation
create
(Annotation annotation) Create a class model annotation from common types annotation.static Annotation
NewAnnotation
instance based on the type.Description (javadoc) of this component.name()
Name of this component.static Annotation
Parse new Annotation object out of the String.Convert class model annotation to Helidon Common Types annotation.typeName()
Type name of this component.
-
Method Details
-
builder
NewAnnotation.Builder
instance.- Returns:
- new builder instance
-
create
NewAnnotation
instance based on the type.- Parameters:
type
- class type- Returns:
- new annotation instance
-
parse
Parse new Annotation object out of the String.This method works as expected for the following types:
- java.lang.String - expecting a quoted value, escapes of inner quotes is possible
- boolean - if the value is not quoted and is equal either to {code true} or
false
- integer - if the value is not quoted and is a number
- double - if the value is not quoted, and ends with
D
(capital letter d) - long - if the value is not quoted and ends with
L
(capital letter l) - float - if the value is not quoted and ends with
F
(capital letter f) - char - if the value is in single quotes
'
- arrays - if the value is surrounded by curly braces
{}
it is an array - annotations - if the value starts with at sign (
@
)
- byte - unquoted value ending with
B
, such as49B
- short - unquoted value ending with
S
, such as49S
- class - unquoted value, in format
class::fq-name
, such asclass::java.lang.String
- enum - unquoted value, in format
enum::fq-name.NAME
, such asenum::java.lang.annotation.ElementType.CONSTRUCTOR
value
, the property name can be omitted (same as when declaring the annotation in Java).If the annotation does not need to declare any value, braces can be omitted (same as when declaring the annotation in Java)
- Parameters:
annotationDefinition
- annotation definition- Returns:
- new annotation instance
-
create
Create a class model annotation from common types annotation.- Parameters:
annotation
- annotation to process- Returns:
- a new class model annotation
-
toTypesAnnotation
Convert class model annotation to Helidon Common Types annotation.- Returns:
- common types annotation
-
name
Name of this component.- Returns:
- component name
-
accessModifier
Access modifier of this component.- Returns:
- access modifier
-
description
Description (javadoc) of this component.- Returns:
- description lines
-
typeName
Type name of this component.- Returns:
- type name
-