public abstract class AbstractFunction extends java.lang.Object implements Function
Modifier and Type | Field and Description |
---|---|
protected static Logger |
LOGGER |
protected static int |
TYPE_BIGDECIMAL |
protected static int |
TYPE_BOOLEAN |
protected static int |
TYPE_DATE |
protected static int |
TYPE_DOUBLE |
protected static int |
TYPE_FLOAT |
protected static int |
TYPE_INT |
protected static int |
TYPE_LONG |
protected static int |
TYPE_NULL |
protected static int |
TYPE_STRING |
GROUP_AGGREGATE, GROUP_BOOLEAN, GROUP_CONVERSION, GROUP_DATETIME, GROUP_NUMERIC, GROUP_OGC, GROUP_OTHER, GROUP_PROGRAMMING, GROUP_STRING
Modifier | Constructor and Description |
---|---|
protected |
AbstractFunction(java.lang.String group,
java.lang.String name,
Range argc) |
protected |
AbstractFunction(java.lang.String group,
java.lang.String name,
Range argc,
java.lang.String description,
java.lang.String template) |
protected |
AbstractFunction(java.lang.String group,
java.lang.String name,
Range argc,
java.lang.String description,
java.lang.String template,
java.lang.String[] descriptionArgs) |
protected |
AbstractFunction(java.lang.String group,
java.lang.String name,
Range argc,
java.lang.String description,
java.lang.String template,
java.lang.String[] descriptionArgs,
java.lang.String returnType) |
protected |
AbstractFunction(java.lang.String group,
java.lang.String name,
Range argc,
java.lang.String description,
java.lang.String template,
java.lang.String[] descriptionArgs,
java.lang.String returnType,
boolean sqlCompatible) |
Modifier and Type | Method and Description |
---|---|
void |
addAlias(java.lang.String name) |
java.util.List<java.lang.String> |
aliases() |
boolean |
allowConstantFolding()
Returns true if the function always returns the same value for
the same parameters.
|
Range |
argc() |
java.lang.Object |
call(Interpreter interpreter,
Codes args) |
protected void |
checkDoubleValue(double value) |
protected void |
checkFloatValue(float value) |
java.lang.String |
description() |
java.lang.String[] |
descriptionArgs() |
protected java.math.BigDecimal |
getBigDecimal(java.lang.Object value,
int arg) |
protected boolean |
getBoolean(Interpreter interpreter,
Codes args,
int n) |
protected boolean |
getBoolean(java.lang.Object[] args,
int n) |
protected boolean |
getBoolean(java.lang.Object[] args,
int n,
java.lang.Double accuracy) |
protected boolean |
getBoolean(java.lang.Object value,
int n) |
protected boolean |
getBoolean(java.lang.Object value,
int n,
java.lang.Double accuracy) |
protected java.lang.Comparable |
getComparable(java.lang.Object[] args,
int n) |
protected java.lang.Comparable |
getComparable(java.lang.Object value,
int n) |
protected java.lang.Comparable |
getDate(java.lang.Object[] args,
int n) |
protected java.util.Date |
getDate(java.lang.Object value,
int n) |
protected double |
getDouble(java.lang.Object[] args,
int n) |
protected double |
getDouble(java.lang.Object value,
int arg) |
protected java.io.File |
getFile(java.lang.Object[] args,
int n) |
protected java.io.File |
getFile(java.lang.Object value,
int n) |
protected float |
getFloat(java.lang.Object[] args,
int n) |
protected float |
getFloat(java.lang.Object value,
int arg) |
java.lang.String |
getFullDescription()
Return a full description of the funcion internationalized in HTML.
|
protected int |
getInt(Interpreter interpreter,
Codes args,
int n) |
protected int |
getInt(java.lang.Object[] args,
int n) |
protected int |
getInt(java.lang.Object value,
int n) |
protected JsonArray |
getJsonArray(java.lang.Object[] args,
int n) |
protected JsonArray |
getJsonArray(java.lang.Object value,
int n) |
protected JsonObject |
getJsonObject(java.lang.Object[] args,
int n) |
protected JsonObject |
getJsonObject(java.lang.Object value,
int n) |
protected JsonStructure |
getJsonStructure(java.lang.Object[] args,
int n) |
protected JsonStructure |
getJsonStructure(java.lang.Object value,
int n) |
protected GetItemWithSize64 |
getList(java.lang.Object[] args,
int index) |
protected java.time.LocalDateTime |
getLocalDateTime(java.lang.Object[] args,
int n) |
protected java.time.LocalDateTime |
getLocalDateTime(java.lang.Object value,
int n) |
protected long |
getLong(java.lang.Object[] args,
int n) |
protected long |
getLong(java.lang.Object value,
int n) |
protected java.lang.Object |
getObject(Interpreter interpreter,
Codes args,
int n) |
protected java.lang.Object |
getObject(java.lang.Object[] args,
int n) |
protected java.lang.String |
getStr(java.lang.Object[] args,
int n) |
protected java.lang.String |
getStr(java.lang.Object value,
int n) |
protected int |
getType(java.lang.Object op1,
java.lang.Object op2) |
java.net.URL |
getURL(java.lang.Object[] args,
int index) |
java.lang.String |
group() |
boolean |
isHidden() |
protected boolean |
isNull(java.lang.Object[] args,
int n) |
boolean |
isOperator() |
boolean |
isSQLCompatible() |
java.lang.String |
name() |
java.lang.String |
returnType() |
java.lang.String |
template() |
protected boolean |
toBoolean(java.lang.Object value,
java.lang.Double accuracy) |
java.lang.String |
toString() |
java.lang.String |
toString(Codes args,
Formatter<Code> formatter) |
ExpressionBuilder.Value |
toValue(ExpressionBuilder builder,
Codes parameters) |
boolean |
useArgumentsInsteadObjects() |
protected static Logger LOGGER
protected static final int TYPE_INT
protected static final int TYPE_LONG
protected static final int TYPE_FLOAT
protected static final int TYPE_DOUBLE
protected static final int TYPE_BOOLEAN
protected static final int TYPE_STRING
protected static final int TYPE_DATE
protected static final int TYPE_NULL
protected static final int TYPE_BIGDECIMAL
protected AbstractFunction(java.lang.String group, java.lang.String name, Range argc, java.lang.String description, java.lang.String template, java.lang.String[] descriptionArgs, java.lang.String returnType, boolean sqlCompatible)
protected AbstractFunction(java.lang.String group, java.lang.String name, Range argc, java.lang.String description, java.lang.String template, java.lang.String[] descriptionArgs, java.lang.String returnType)
protected AbstractFunction(java.lang.String group, java.lang.String name, Range argc, java.lang.String description, java.lang.String template, java.lang.String[] descriptionArgs)
protected AbstractFunction(java.lang.String group, java.lang.String name, Range argc, java.lang.String description, java.lang.String template)
protected AbstractFunction(java.lang.String group, java.lang.String name, Range argc)
public java.lang.String returnType()
returnType
in interface Function
public java.lang.String description()
description
in interface Function
public java.lang.String[] descriptionArgs()
descriptionArgs
in interface Function
public java.lang.String getFullDescription()
Function
getFullDescription
in interface Function
public java.util.List<java.lang.String> aliases()
public boolean isOperator()
isOperator
in interface Function
public boolean useArgumentsInsteadObjects()
useArgumentsInsteadObjects
in interface Function
public boolean isSQLCompatible()
isSQLCompatible
in interface Function
public boolean allowConstantFolding()
Function
allowConstantFolding
in interface Function
public java.lang.Object call(Interpreter interpreter, Codes args) throws java.lang.Exception
protected int getInt(java.lang.Object[] args, int n)
protected int getInt(java.lang.Object value, int n)
protected int getInt(Interpreter interpreter, Codes args, int n)
protected long getLong(java.lang.Object[] args, int n)
protected long getLong(java.lang.Object value, int n)
protected double getDouble(java.lang.Object[] args, int n)
protected double getDouble(java.lang.Object value, int arg)
protected java.math.BigDecimal getBigDecimal(java.lang.Object value, int arg)
protected float getFloat(java.lang.Object[] args, int n)
protected float getFloat(java.lang.Object value, int arg)
protected java.lang.String getStr(java.lang.Object[] args, int n)
protected java.lang.String getStr(java.lang.Object value, int n)
protected java.io.File getFile(java.lang.Object[] args, int n)
protected java.io.File getFile(java.lang.Object value, int n)
protected boolean isNull(java.lang.Object[] args, int n)
protected java.lang.Object getObject(java.lang.Object[] args, int n)
protected JsonObject getJsonObject(java.lang.Object[] args, int n)
protected JsonObject getJsonObject(java.lang.Object value, int n)
protected JsonArray getJsonArray(java.lang.Object[] args, int n)
protected JsonArray getJsonArray(java.lang.Object value, int n)
protected JsonStructure getJsonStructure(java.lang.Object[] args, int n)
protected JsonStructure getJsonStructure(java.lang.Object value, int n)
protected java.lang.Object getObject(Interpreter interpreter, Codes args, int n)
protected java.lang.Comparable getComparable(java.lang.Object[] args, int n)
protected java.lang.Comparable getComparable(java.lang.Object value, int n)
protected java.lang.Comparable getDate(java.lang.Object[] args, int n)
protected java.util.Date getDate(java.lang.Object value, int n)
protected java.time.LocalDateTime getLocalDateTime(java.lang.Object[] args, int n)
protected java.time.LocalDateTime getLocalDateTime(java.lang.Object value, int n)
public java.net.URL getURL(java.lang.Object[] args, int index) throws java.net.MalformedURLException
java.net.MalformedURLException
protected boolean getBoolean(java.lang.Object[] args, int n, java.lang.Double accuracy)
protected boolean getBoolean(java.lang.Object[] args, int n)
protected boolean getBoolean(java.lang.Object value, int n)
protected boolean getBoolean(java.lang.Object value, int n, java.lang.Double accuracy)
protected boolean getBoolean(Interpreter interpreter, Codes args, int n)
protected boolean toBoolean(java.lang.Object value, java.lang.Double accuracy)
protected GetItemWithSize64 getList(java.lang.Object[] args, int index)
protected int getType(java.lang.Object op1, java.lang.Object op2)
public java.lang.String toString()
toString
in class java.lang.Object
protected void checkDoubleValue(double value)
protected void checkFloatValue(float value)
public ExpressionBuilder.Value toValue(ExpressionBuilder builder, Codes parameters)