public abstract class AbstractFunction extends Object implements ExpressionItem
Modifier and Type | Field and Description |
---|---|
static AbstractFunction[] |
ALL_FUNCTIONS
Inside array contains all functions supported by the preprocessor
|
static String |
EXECUTION_PREFIX
The string contains the prefix for all executing methods of functions
|
static Map<String,AbstractFunction> |
FUNCTION_NAME_MAP |
protected static AtomicLong |
UID_COUNTER
Inside counter to generate UID for some cases
|
Constructor and Description |
---|
AbstractFunction() |
Modifier and Type | Method and Description |
---|---|
static <E extends AbstractFunction> |
findForClass(Class<E> functionClass)
Allows to find a function handler instance for its class
|
static AbstractFunction |
findForName(String str)
Find a function handler for its name
|
abstract ValueType[][] |
getAllowedArgumentTypes()
Get arrays of supported argument types
|
abstract int |
getArity()
Get the function arity
|
ExpressionItemPriority |
getExpressionItemPriority()
Get the priority of the function in the expression tree
|
ExpressionItemType |
getExpressionItemType()
Get the expression item type
|
abstract String |
getName()
Get the function name
|
abstract String |
getReference()
Get the function reference to be output for a help request
|
abstract ValueType |
getResultType()
Get the result type
|
String |
toString() |
public static final String EXECUTION_PREFIX
public static final AbstractFunction[] ALL_FUNCTIONS
public static final Map<String,AbstractFunction> FUNCTION_NAME_MAP
protected static final AtomicLong UID_COUNTER
public static <E extends AbstractFunction> E findForClass(Class<E> functionClass)
E
- the class of the needed function handler extends the
AbstractFunction classfunctionClass
- the class of the needed handler, must not be nullpublic static AbstractFunction findForName(String str)
str
- the function name, must not be nullpublic abstract String getName()
public abstract String getReference()
public abstract int getArity()
@MustNotContainNull public abstract ValueType[][] getAllowedArgumentTypes()
public abstract ValueType getResultType()
public ExpressionItemPriority getExpressionItemPriority()
getExpressionItemPriority
in interface ExpressionItem
public ExpressionItemType getExpressionItemType()
getExpressionItemType
in interface ExpressionItem
Copyright © 2011–2021 Igor Maznitsa. All rights reserved.