Package ch.njol.skript.lang
Class SyntaxElementInfo<E extends SyntaxElement>
java.lang.Object
ch.njol.skript.lang.SyntaxElementInfo<E>
- Type Parameters:
E- the syntax element this info is for
- All Implemented Interfaces:
DefaultSyntaxInfos,SyntaxInfo<E>
- Direct Known Subclasses:
ExpressionInfo,StructureInfo
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.skriptlang.skript.registration.DefaultSyntaxInfos
DefaultSyntaxInfos.Expression<E extends Expression<R>,R>, DefaultSyntaxInfos.Structure<E extends Structure> Nested classes/interfaces inherited from interface org.skriptlang.skript.registration.SyntaxInfo
SyntaxInfo.Builder<B extends SyntaxInfo.Builder<B,E>, E extends SyntaxElement> -
Field Summary
FieldsFields inherited from interface org.skriptlang.skript.registration.SyntaxInfo
COMBINED, PATTERN_MATCHES_EVERYTHING, SIMPLE -
Constructor Summary
ConstructorsConstructorDescriptionSyntaxElementInfo(String[] patterns, Class<E> elementClass, String originClassPath) -
Method Summary
Modifier and TypeMethodDescriptionstatic <I extends SyntaxElementInfo<E>,E extends SyntaxElement>
IfromModern(SyntaxInfo<? extends E> info) Get the class that represents this element.Get the original classpath for this element.String[]Get the patterns of this syntax element.instance()origin()@Unmodifiable Collection<String> patterns()priority()SyntaxInfo.Builder<? extends SyntaxInfo.Builder<?, E>, E> type()
-
Field Details
-
elementClass
-
patterns
-
originClassPath
-
-
Constructor Details
-
SyntaxElementInfo
public SyntaxElementInfo(String[] patterns, Class<E> elementClass, String originClassPath) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
-
Method Details
-
getElementClass
Get the class that represents this element.- Returns:
- The Class of the element
-
getPatterns
Get the patterns of this syntax element.- Returns:
- Array of Skript patterns for this element
-
getOriginClassPath
Get the original classpath for this element.- Returns:
- The original ClassPath for this element
-
fromModern
@Contract("_ -> new") @Internal @Experimental public static <I extends SyntaxElementInfo<E>,E extends SyntaxElement> I fromModern(SyntaxInfo<? extends E> info) -
toBuilder
- Specified by:
toBuilderin interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- A builder representing this SyntaxInfo.
-
origin
- Specified by:
originin interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- The origin of this syntax.
-
type
- Specified by:
typein interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- The class providing the implementation of this syntax.
-
instance
- Specified by:
instancein interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- A new instance of the class providing the implementation of this syntax.
-
patterns
- Specified by:
patternsin interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- The patterns of this syntax.
-
priority
- Specified by:
priorityin interfaceSyntaxInfo<E extends SyntaxElement>- Returns:
- The priority of this syntax, which dictates its position for matching during parsing.
-