Package ch.njol.skript.lang.function
Class Signature<T>
java.lang.Object
ch.njol.skript.lang.function.Signature<T>
- All Implemented Interfaces:
Signature<T>
Function signature: name, parameter types and a return type.
-
Constructor Summary
ConstructorsConstructorDescriptionSignature(@Nullable String script, String name, Parameter<?>[] parameters, boolean local, @Nullable ClassInfo<T> returnType, boolean single, @Nullable String originClassPath, @Nullable Contract contract) Signature(@Nullable String script, String name, Parameter<?>[] parameters, @Nullable Class<T> returnType, boolean single, @Nullable Contract contract) Creates a new signature.Signature(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) -
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()Deprecated, for removal: This API element is subject to removal in a future version.Unused and unsafe.Parameter<?> getParameter(int index) Parameter<?>[]inthashCode()booleanisLocal()booleanisSingle()toString()toString(boolean includeReturnType, boolean debug)
-
Constructor Details
-
Signature
-
Signature
public Signature(@Nullable @Nullable String script, String name, Parameter<?>[] parameters, @Nullable @Nullable Class<T> returnType, boolean single, @Nullable @Nullable Contract contract) Creates a new signature.- Parameters:
script- The script of this signature.name- The name of the function.parameters- The parameters.returnType- The return type class.contract- AContractthat may belong to this signature.
-
Signature
-
Signature
-
-
Method Details
-
getName
-
getParameter
-
getParameters
-
isLocal
public boolean isLocal() -
getReturnType
-
isSingle
public boolean isSingle() -
getOriginClassPath
Deprecated, for removal: This API element is subject to removal in a future version.Unused and unsafe. -
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() -
toString
-
toString
-