Package ch.njol.skript.lang.function
Class Signature<T>
java.lang.Object
ch.njol.skript.lang.function.Signature<T>
Function signature: name, parameter types and a return type.
-
Constructor Summary
ConstructorsConstructorDescriptionSignature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable ClassInfo<T> returnType, boolean single) Signature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable ClassInfo<T> returnType, boolean single, @Nullable String originClassPath) Signature(String script, String name, Parameter<?>[] parameters, boolean local, @Nullable ClassInfo<T> returnType, boolean single, @Nullable String originClassPath, @Nullable Contract contract) -
Method Summary
Modifier and TypeMethodDescription@Nullable ContractintGets maximum number of parameters that the function described by this signature is able to take.intGets minimum number of parameters that the function described by this signature is able to take.getName()Parameter<?> getParameter(int index) Parameter<?>[]inthashCode()booleanisLocal()booleanisSingle()
-
Constructor Details
-
Signature
-
Signature
-
Signature
-
-
Method Details
-
getName
-
getParameter
-
getParameters
-
isLocal
public boolean isLocal() -
getReturnType
-
isSingle
public boolean isSingle() -
getOriginClassPath
-
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()
-