Package ch.njol.skript.lang.function
Class Parameter<T>
java.lang.Object
ch.njol.skript.lang.function.Parameter<T>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@Nullable Expression<? extends T>
Get the Expression that will be used to provide the default value of this parameter when the function is called.getName()
Get the name of this parameter.getType()
Get the Type of this parameter.boolean
Get whether this parameter takes one or many values.static <T> @Nullable Parameter<T>
newInstance(String name, ClassInfo<T> type, boolean single, @Nullable String def)
toString()
-
Constructor Details
-
Parameter
public Parameter(String name, ClassInfo<T> type, boolean single, @Nullable Expression<? extends T> def)
-
-
Method Details
-
getType
Get the Type of this parameter.- Returns:
- Type of the parameter
-
newInstance
-
getName
Get the name of this parameter.Will be used as name for the local variable that contains value of it inside function.
- Returns:
- Name of this parameter
-
getDefaultExpression
Get the Expression that will be used to provide the default value of this parameter when the function is called.- Returns:
- Expression that will provide default value of this parameter
-
isSingleValue
public boolean isSingleValue()Get whether this parameter takes one or many values.- Returns:
- True if this parameter takes one value, false otherwise
-
toString
-