Class Signature<T>

java.lang.Object
ch.njol.skript.lang.function.Signature<T>

public class Signature<T> extends Object
Function signature: name, parameter types and a return type.
  • Constructor Details

    • Signature

      public Signature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable @Nullable ClassInfo<T> returnType, boolean single, @Nullable @Nullable String originClassPath, @Nullable @Nullable Contract contract)
    • Signature

      public Signature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable @Nullable ClassInfo<T> returnType, boolean single, @Nullable @Nullable String originClassPath)
    • Signature

      public Signature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable @Nullable ClassInfo<T> returnType, boolean single)
  • Method Details

    • getName

      public String getName()
    • getParameter

      public Parameter<?> getParameter(int index)
    • getParameters

      public Parameter<?>[] getParameters()
    • isLocal

      public boolean isLocal()
    • getReturnType

      @Nullable public @Nullable ClassInfo<T> getReturnType()
    • isSingle

      public boolean isSingle()
    • getOriginClassPath

      public String getOriginClassPath()
    • getContract

      @Nullable public @Nullable Contract getContract()
    • getMaxParameters

      public int getMaxParameters()
      Gets maximum number of parameters that the function described by this signature is able to take.
      Returns:
      Maximum number of parameters.
    • getMinParameters

      public int getMinParameters()
      Gets minimum number of parameters that the function described by this signature is able to take. Parameters that have default values and do not have any parameters that are mandatory after them, are optional.
      Returns:
      Minimum number of parameters required.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object