public class FunctionInfo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
FunctionInfo.Provider
Constants to indicate the runtime provider of a function
|
Constructor and Description |
---|
FunctionInfo(String jiffleName,
String runtimeName,
FunctionInfo.Provider provider,
boolean isVolatile,
String returnTypeLabel,
String... argTypeLabels)
Creates a function info object.
|
Modifier and Type | Method and Description |
---|---|
List<JiffleType> |
getArgTypes() |
String |
getJiffleName()
Gets the name of the function used in Jiffle scripts.
|
int |
getNumArgs()
Gets the number of arguments used by the function.
|
JiffleType |
getReturnType()
Gets the function return type.
|
String |
getRuntimeName()
Gets the Java source for the function provider and name used in the
runtime class.
|
boolean |
isProxy()
Tests if this function is a proxy for a runtime
class field or method.
|
boolean |
isVolatile()
Tests if this function is volatile, ie. returns a different value on each
invocation regardless of image position.
|
boolean |
matches(String fnName,
JiffleType... fnArgTypes)
Tests if this object matches the given name and argument types.
|
public FunctionInfo(String jiffleName, String runtimeName, FunctionInfo.Provider provider, boolean isVolatile, String returnTypeLabel, String... argTypeLabels)
jiffleName
- name of the function used in Jiffle scriptsruntimeName
- either Java name used in runtime class sourceprovider
- the provider: one of FunctionInfo.Provider.JIFFLE
,
FunctionInfo.Provider.MATH
, FunctionInfo.Provider.PROXY
isVolatile
- true
if the function returns a new value on
each invocation regardless of pixel position (e.g. rand())returnType
- function return type labelargTypeLabels
- array of Strings specifying argument types (null or
empty for no-arg functions)JiffleType
public String getJiffleName()
public String getRuntimeName()
public boolean isVolatile()
true
if volatilepublic int getNumArgs()
public List<JiffleType> getArgTypes()
public boolean isProxy()
true
if a proxy functionpublic JiffleType getReturnType()
public boolean matches(String fnName, JiffleType... fnArgTypes)
fnName
- function name used in scriptsfnArgTypes
- argument types; null or empty for no-arg functionstrue
if this object matchesCopyright © 2006–2018 GeoSolutions. All rights reserved.