Class SchemaAnnotation

java.lang.Object
org.apache.juneau.annotation.SchemaAnnotation

public class SchemaAnnotation extends Object
Utility classes and methods for the @Schema annotation.
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • create

      Instantiates a new builder for this class.
      Returns:
      A new builder object.
    • create

      public static SchemaAnnotation.Builder create(Class<?>... on)
      Instantiates a new builder for this class.
      Parameters:
      on - The targets this annotation applies to.
      Returns:
      A new builder object.
    • create

      public static SchemaAnnotation.Builder create(String... on)
      Instantiates a new builder for this class.
      Parameters:
      on - The targets this annotation applies to.
      Returns:
      A new builder object.
    • empty

      public static boolean empty(Schema a)
      Returns true if the specified annotation contains all default values.
      Parameters:
      a - The annotation to check.
      Returns:
      true if the specified annotation contains all default values.
    • asMap

      public static JsonMap asMap(Schema a) throws ParseException
      Converts the specified @Schema annotation into a generic map.
      Parameters:
      a - The annotation instance. Can be null.
      Returns:
      The schema converted to a map, or and empty map if the annotation was null.
      Throws:
      ParseException - Malformed input encountered.