java.lang.Object
io.helidon.codegen.CodegenValidator
Validation utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringvalidateDuration(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate a duration annotation on a method, field, or constructor.static StringvalidateSize(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate aSizeannotation on a method, field, or constructor.static StringvalidateUri(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate a URI value in an annotation.
-
Method Details
-
validateUri
public static String validateUri(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate a URI value in an annotation.- Parameters:
enclosingType- type that owns the elementelement- annotated elementannotationType- type of annotationproperty- property of annotationvalue- actual value read from the annotation property- Returns:
- the value
- Throws:
CodegenException- with correct source element describing the problem
-
validateDuration
public static String validateDuration(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate a duration annotation on a method, field, or constructor.- Parameters:
enclosingType- type that owns the elementelement- annotated elementannotationType- type of annotationproperty- property of annotationvalue- actual value read from the annotation property- Returns:
- the value
- Throws:
CodegenException- with correct source element describing the problem
-
validateSize
public static String validateSize(TypeName enclosingType, TypedElementInfo element, TypeName annotationType, String property, String value) Validate aSizeannotation on a method, field, or constructor.- Parameters:
enclosingType- type that owns the elementelement- annotated elementannotationType- type of annotationproperty- property of annotationvalue- actual value read from the annotation property- Returns:
- the value
- Throws:
CodegenException- with correct source element describing the problem
-