Class CodegenValidator

java.lang.Object
io.helidon.codegen.CodegenValidator

public final class CodegenValidator extends Object
Validation utilities.
  • 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 element
      element - annotated element
      annotationType - type of annotation
      property - property of annotation
      value - 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 element
      element - annotated element
      annotationType - type of annotation
      property - property of annotation
      value - actual value read from the annotation property
      Returns:
      the value
      Throws:
      CodegenException - with correct source element describing the problem