Class EntryValidator
java.lang.Object
org.skriptlang.skript.lang.entry.EntryValidator
A validator for storing
EntryData.
It can be used to validate whether a SectionNode contains the required entries.
This validation process will return an EntryContainer for accessing entry values.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA utility builder for creating an entry validator that can be used to parse and validate aSectionNode. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuilder()@Nullable EntryContainervalidate(SectionNode sectionNode) Validates a node using this entry validator.
-
Constructor Details
-
EntryValidator
-
-
Method Details
-
builder
- Returns:
- A builder to be used for creating an
EntryValidator.
-
getEntryData
-
getUnexpectedNodeTester
- Returns:
- A predicate that tests whether a node not explicitly handled by any
getEntryData()should be allowed to be present.
-
getUnexpectedEntryMessage
-
getMissingRequiredEntryMessage
-
validate
Validates a node using this entry validator.- Parameters:
sectionNode- The node to validate.- Returns:
- An entry container holding the validated nodes
along with any additional nodes (if permitted by
getUnexpectedNodeTester()). Will return null if the provided node couldn't be validated.
-