Enum Class SchemaNotation
- All Implemented Interfaces:
Serializable, Comparable<SchemaNotation>, Constable, SchemaVisitor<String>
Predefined schema notations backed by SchemaVisitor implementations.
Each enum constant wraps a SchemaVisitor that renders a
Schema into a textual notation (for example JSON, XML, or PlantUML).
As SchemaNotation implements SchemaVisitor, it can be used
directly with Schema.visit(SchemaVisitor) or via
Schema.toNotation(SchemaNotation).
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemaNotationReturns the enum constant of this class with the specified name.static SchemaNotation[]values()Returns an array containing the constants of this enum class, in the order they are declared.Visits the givenSchemainstance and returns the produced result.
-
Enum Constant Details
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
visit
Visits the given
Schemainstance and returns the produced result.Implementations typically traverse the schema recursively and aggregate results from child schemas.
- Specified by:
visitin interfaceSchemaVisitor<String>- Parameters:
aSchema- the schema to visit- Returns:
- the result produced by the visitor
-