Annotation Type Matches
-
@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE) public @interface Matches
This annotation defines a rule that requires matching patterns and/or data types among the target contents of the assembly represented by the containingMetaschemaAssemblyannotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description StringdescriptionAn optional description of the constraint.StringformalNameAn optional formal name for the constraint.StringidAn optional identifier for the constraint, which must be unique to only this constraint.IConstraint.LevellevelThe significance of a violation of this constraint.StringmessageThe message to emit when the constraint is violated.StringpatternRetrieve an optional pattern that the associated value must match.Property[]propertiesAn optional set of properties associated with these allowed values.StringremarksAny remarks about the constraint, encoded as an escaped Markdown string.StringtargetAn optional metapath that points to the target flag or field value that the constraint applies to.Class<? extends IDataTypeAdapter<?>>typeAdapterThe Module data type adapter for the data type that the associated value must conform to.
-
-
-
-
formalName
@NonNull String formalName
An optional formal name for the constraint.- Returns:
- the formal name if provided or an empty string otherwise
- Default:
- ""
-
-
-
description
@NonNull String description
An optional description of the constraint.- Returns:
- the description if provided or an empty string otherwise
- Default:
- ""
-
-
-
level
@NonNull IConstraint.Level level
The significance of a violation of this constraint.- Returns:
- the level
- Default:
- gov.nist.secauto.metaschema.core.model.constraint.IConstraint.Level.ERROR
-
-
-
target
@NonNull String target
An optional metapath that points to the target flag or field value that the constraint applies to. If omitted the target will be ".", which means the target is the value of theBoundFlag,BoundFieldorMetaschemaFieldValueannotation the constraint appears on. In the prior case, this annotation may only appear on aBoundFieldif the field has no flags, which results in aBoundFieldannotation on a field instance with a scalar, data type value.- Returns:
- the target metapath
- Default:
- "."
-
-
-
properties
Property[] properties
An optional set of properties associated with these allowed values.- Returns:
- the properties or an empty array with no properties
- Default:
- {}
-
-
-
pattern
@NonNull String pattern
Retrieve an optional pattern that the associated value must match. This must be a pattern that can compile usingPattern.compile(String).- Returns:
- a pattern string or an empty string if no pattern is provided
- Default:
- ""
-
-
-
typeAdapter
@NonNull Class<? extends IDataTypeAdapter<?>> typeAdapter
The Module data type adapter for the data type that the associated value must conform to.- Returns:
- the data type adapter or a
NullJavaTypeAdapterif none is provided
- Default:
- gov.nist.secauto.metaschema.databind.model.annotations.NullJavaTypeAdapter.class
-
-