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

public class SyntaxElementInfo<E extends SyntaxElement> extends Object implements SyntaxInfo<E>
  • Field Details

    • elementClass

      public final Class<E extends SyntaxElement> elementClass
    • patterns

      public final String[] patterns
    • originClassPath

      public final String originClassPath
  • Constructor Details

  • Method Details

    • getElementClass

      public Class<E> getElementClass()
      Get the class that represents this element.
      Returns:
      The Class of the element
    • getPatterns

      public String[] getPatterns()
      Get the patterns of this syntax element.
      Returns:
      Array of Skript patterns for this element
    • getOriginClassPath

      public String 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

      @Internal public SyntaxInfo.Builder<? extends SyntaxInfo.Builder<?,E>,E> toBuilder()
      Specified by:
      toBuilder in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      A builder representing this SyntaxInfo.
    • origin

      @Internal public SyntaxOrigin origin()
      Specified by:
      origin in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      The origin of this syntax.
    • type

      @Internal public Class<E> type()
      Specified by:
      type in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      The class providing the implementation of this syntax.
    • instance

      @Internal public E instance()
      Specified by:
      instance in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      A new instance of the class providing the implementation of this syntax.
    • patterns

      @Internal public @Unmodifiable Collection<String> patterns()
      Specified by:
      patterns in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      The patterns of this syntax.
    • priority

      @Internal public Priority priority()
      Specified by:
      priority in interface SyntaxInfo<E extends SyntaxElement>
      Returns:
      The priority of this syntax, which dictates its position for matching during parsing.