|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.fge.jsonschema.format.AbstractFormatAttribute
public abstract class AbstractFormatAttribute
Base abstract class for a format attribute
You should really use this class instead of implementing FormatAttribute directly. Its main, but important, helping role is to
build the list of supported types for you.
| Constructor Summary | |
|---|---|
protected |
AbstractFormatAttribute(String fmt,
NodeType first,
NodeType... other)
Protected constructor |
| Method Summary | ||
|---|---|---|
protected
|
newMsg(FullData data,
T message)
Return a new message for this format attribute |
|
EnumSet<NodeType> |
supportedTypes()
Return the set of JSON Schema types this format attribute applies to |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.github.fge.jsonschema.format.FormatAttribute |
|---|
validate |
| Constructor Detail |
|---|
protected AbstractFormatAttribute(String fmt,
NodeType first,
NodeType... other)
fmt - the name for this format attributefirst - first supported typeother - other supported types, if anysupportedTypes()| Method Detail |
|---|
public final EnumSet<NodeType> supportedTypes()
FormatAttributeIt is important that this method be implemented correctly. Remind that validation for a given format attribute and an instance which type is not supported always succeeds.
supportedTypes in interface FormatAttribute
protected final <T> ProcessingMessage newMsg(FullData data,
T message)
T - the type of the messagedata - the validation contextmessage - the message
FormatMessages
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||