Package ch.njol.skript.lang.function
Class FunctionReference<T>
java.lang.Object
ch.njol.skript.lang.function.FunctionReference<T>
- All Implemented Interfaces:
Contract,Executable<org.bukkit.event.Event,T[]>
@Deprecated(forRemoval=true,
since="2.14")
public class FunctionReference<T>
extends Object
implements Contract, Executable<org.bukkit.event.Event,T[]>
Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFunctionReference(String functionName, @Nullable Node node, @Nullable String script, @Nullable Class<? extends T>[] returnTypes, Expression<?>[] params) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected T @Nullable []execute(org.bukkit.event.Event event) Deprecated, for removal: This API element is subject to removal in a future version.T[]Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.The contract is used in preference to the function for determining return type, etc.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.@Nullable Class<?> getReturnType(Expression<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version.booleanisSingle()Deprecated, for removal: This API element is subject to removal in a future version.booleanisSingle(Expression<?>... arguments) Deprecated, for removal: This API element is subject to removal in a future version.booleanDeprecated, for removal: This API element is subject to removal in a future version.String @Nullable []Deprecated, for removal: This API element is subject to removal in a future version.toString(@Nullable org.bukkit.event.Event event, boolean debug) Deprecated, for removal: This API element is subject to removal in a future version.booleanvalidateFunction(boolean first) Deprecated, for removal: This API element is subject to removal in a future version.Validates this function reference.booleanvalidateParameterArity(boolean first) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
script
Deprecated, for removal: This API element is subject to removal in a future version.Script in which this reference is found. Used for function unload safety checks.
-
-
Constructor Details
-
Method Details
-
validateParameterArity
public boolean validateParameterArity(boolean first) Deprecated, for removal: This API element is subject to removal in a future version. -
validateFunction
public boolean validateFunction(boolean first) Deprecated, for removal: This API element is subject to removal in a future version.Validates this function reference. Prints errors if needed.- Parameters:
first- True if this is called while loading a script. False when this is called when the function signature changes.- Returns:
- True if validation succeeded.
-
getFunction
Deprecated, for removal: This API element is subject to removal in a future version. -
returnedKeys
Deprecated, for removal: This API element is subject to removal in a future version. -
resetReturnValue
public boolean resetReturnValue()Deprecated, for removal: This API element is subject to removal in a future version. -
execute
Deprecated, for removal: This API element is subject to removal in a future version. -
isSingle
public boolean isSingle()Deprecated, for removal: This API element is subject to removal in a future version. -
isSingle
Deprecated, for removal: This API element is subject to removal in a future version. -
getReturnType
Deprecated, for removal: This API element is subject to removal in a future version. -
getReturnType
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
getReturnTypein interfaceContract- Returns:
- What this will return, given these parameters
- See Also:
-
getContract
Deprecated, for removal: This API element is subject to removal in a future version.The contract is used in preference to the function for determining return type, etc.- Returns:
- The contract determining this function's parse-time hints, potentially this reference
-
toString
Deprecated, for removal: This API element is subject to removal in a future version. -
execute
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
executein interfaceExecutable<org.bukkit.event.Event,T[]>
-
FunctionReferenceinstead.