Interface DefaultSyntaxInfos.Structure<E extends Structure>
- Type Parameters:
E- The class providing the implementation of the Structure this info represents.
- All Superinterfaces:
DefaultSyntaxInfos,SyntaxInfo<E>
- Enclosing interface:
DefaultSyntaxInfos
@Experimental
public static interface DefaultSyntaxInfos.Structure<E extends Structure>
extends SyntaxInfo<E>
A syntax info to be used for
Structures.
It contains additional details including the EntryValidator to use, if any.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDefaultSyntaxInfos.Structure.Builder<B extends DefaultSyntaxInfos.Structure.Builder<B,E>, E extends Structure> A Structure-specific builder is used for constructing a new Structure syntax info.static enumRepresents type ofNodes that can represent a Structure.Nested classes/interfaces inherited from interface org.skriptlang.skript.registration.DefaultSyntaxInfos
DefaultSyntaxInfos.Expression<E extends Expression<R>,R>, DefaultSyntaxInfos.Structure<E extends Structure> -
Field Summary
Fields inherited from interface org.skriptlang.skript.registration.SyntaxInfo
COMBINED, PATTERN_MATCHES_EVERYTHING, SIMPLE -
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Structure>
DefaultSyntaxInfos.Structure.Builder<? extends DefaultSyntaxInfos.Structure.Builder<?, E>, E> Constructs a builder for a structure syntax info.@Nullable EntryValidatornodeType()
-
Method Details
-
builder
@Contract("_ -> new") static <E extends Structure> DefaultSyntaxInfos.Structure.Builder<? extends DefaultSyntaxInfos.Structure.Builder<?,E>, builderE> (Class<E> structureClass) Constructs a builder for a structure syntax info.- Type Parameters:
E- The class providing the implementation of the Structure this info represents.- Parameters:
structureClass- The Structure class the info will represent.- Returns:
- A Structure-specific builder for creating a syntax info representing
structureClass. By default, thenodeType()of the builder isDefaultSyntaxInfos.Structure.NodeType.SECTION.
-
toBuilder
@Contract("-> new") DefaultSyntaxInfos.Structure.Builder<? extends DefaultSyntaxInfos.Structure.Builder<?,E>, toBuilder()E> - Specified by:
toBuilderin interfaceSyntaxInfo<E extends Structure>- Returns:
- A builder representing this SyntaxInfo.
-
entryValidator
- Returns:
- The entry validator to use for handling the Structure's entries. If null, the Structure is expected to manually handle any entries.
-
nodeType
DefaultSyntaxInfos.Structure.NodeType nodeType()- Returns:
- The type of
Nodes that can represent the Structure.
-