Class ContextValue<C extends TriggerContext, T>

java.lang.Object
io.github.syst3ms.skriptparser.registration.context.ContextValue<C,T>

public class ContextValue<C extends TriggerContext, T> extends Object
A class containing info about a context value.
  • Constructor Details

  • Method Details

    • getContext

      public Class<C> getContext()
    • getReturnType

      public PatternType<T> getReturnType()
    • getPattern

      public PatternElement getPattern()
      Returns the pattern of this context value.
      Returns:
      the pattern
    • getFunction

      public Function<C,T[]> getFunction()
      Returns the function that will be applied onto the context in order to retrieve the correct value.
      Returns:
      the function
    • getState

      public ContextValue.State getState()
      A contextual expression mostly refers to things that happen because of the event, but, sometimes, an event can have a former and future aspect. The state of the context value describes these aspects.
      Returns:
      whether this happens in the past, present or future
    • getUsage

      public ContextValue.Usage getUsage()
      Returns:
      whether this value can be used alone
    • getExcluded

      public Class<? extends C>[] getExcluded()
      Some subclasses don't want to inherit the context values of their parents. The returned array contains all the subclasses that should be excluded when parsing this context value.
      Returns:
      the excluded contexts