Uses of Interface
com.googlecode.aviator.runtime.type.AviatorFunction
Packages that use AviatorFunction
Package
Description
-
Uses of AviatorFunction in com.googlecode.aviator
Fields in com.googlecode.aviator with type parameters of type AviatorFunctionModifier and TypeFieldDescriptionprivate Map
<String, AviatorFunction> ClassPathConfigFunctionLoader.functions
private List
<AviatorFunction> Feature.functions
Functions to support the feature.private static Map
<String, AviatorFunction> AviatorEvaluatorInstance.internalASMLibFunctions
cached compiled internal ASM lib functionsprivate static Map
<String, AviatorFunction> AviatorEvaluatorInstance.internalInterpretedLibFunctions
cached compiled internal interpred lib functionsstatic final Map
<OperatorType, AviatorFunction> AviatorEvaluator.OPS_MAP
Deprecated.please use instance's field.private final Map
<OperatorType, AviatorFunction> AviatorEvaluatorInstance.opsMap
Methods in com.googlecode.aviator that return AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunction
AviatorEvaluator.getFunction
(String name) Retrieve an aviator function by name,throw exception if not found or null.It's not thread-safe.AviatorEvaluatorInstance.getFunction
(String name) AviatorEvaluatorInstance.getFunction
(String name, SymbolTable symbolTable) Retrieve an aviator function by name,throw exception if not found or null.It's not thread-safe.static AviatorFunction
AviatorEvaluator.getOpFunction
(OperatorType opType) Retrieve an operator aviator function by op type, return null if not found.It's not thread-safe.AviatorEvaluatorInstance.getOpFunction
(OperatorType opType) Retrieve an operator aviator function by op type, return null if not found.It's not thread-safe.private AviatorFunction
ClassPathConfigFunctionLoader.onFunctionNotFound
(String name) FunctionLoader.onFunctionNotFound
(String name) Invoked when function not found, The implementation must returns null when function not found.static AviatorFunction
AviatorEvaluator.removeFunction
(AviatorFunction function) Remove a aviator functionstatic AviatorFunction
AviatorEvaluator.removeFunction
(String name) Remove an aviator function by name,it's not thread-safe.AviatorEvaluatorInstance.removeFunction
(AviatorFunction function) Remove a aviator functionAviatorEvaluatorInstance.removeFunction
(String name) Remove an aviator function by name,it's not thread-safe.static AviatorFunction
AviatorEvaluator.removeOpFunction
(OperatorType opType) Remove an operator aviator function by op type, it's not thread-safe.AviatorEvaluatorInstance.removeOpFunction
(OperatorType opType) Remove an operator aviator function by op type, it's not thread-safe.Methods in com.googlecode.aviator that return types with arguments of type AviatorFunctionModifier and TypeMethodDescriptionprivate static List
<AviatorFunction> Feature.asList
(AviatorFunction... args) Feature.getFunctions()
AviatorEvaluatorInstance.getOpsMap()
Returns the operators map.private Map
<String, AviatorFunction> ClassPathConfigFunctionLoader.load()
Load custom functions from config file, default is "aviator_functions.config" in classpath.private Map
<String, AviatorFunction> AviatorEvaluatorInstance.loadInternalFunctions()
Methods in com.googlecode.aviator with parameters of type AviatorFunctionModifier and TypeMethodDescriptionstatic void
AviatorEvaluator.addFunction
(AviatorFunction function) Add an aviator function,it's not thread-safe.void
AviatorEvaluatorInstance.addFunction
(AviatorFunction function) Add an aviator function,it's not thread-safe.void
AviatorEvaluatorInstance.addFunction
(String name, AviatorFunction function) Adds a function with the namestatic void
AviatorEvaluator.addOpFunction
(OperatorType opType, AviatorFunction function) Add an operator aviator function,it's not thread-safe.void
AviatorEvaluatorInstance.addOpFunction
(OperatorType opType, AviatorFunction function) Add an operator aviator function,it's not thread-safe.private static List
<AviatorFunction> Feature.asList
(AviatorFunction... args) static AviatorFunction
AviatorEvaluator.removeFunction
(AviatorFunction function) Remove a aviator functionAviatorEvaluatorInstance.removeFunction
(AviatorFunction function) Remove a aviator functionConstructor parameters in com.googlecode.aviator with type arguments of type AviatorFunctionModifierConstructorDescriptionprivate
Feature
(List<AviatorFunction> funcs) private
Feature
(Set<Feature> prequires, List<AviatorFunction> funcs) -
Uses of AviatorFunction in com.googlecode.aviator.code.interpreter.ir
Fields in com.googlecode.aviator.code.interpreter.ir declared as AviatorFunctionMethods in com.googlecode.aviator.code.interpreter.ir with parameters of type AviatorFunctionModifier and TypeMethodDescriptionprivate AviatorObject
SendIR.callFn
(AviatorFunction fn, AviatorObject[] args, int arity, Env env) Constructors in com.googlecode.aviator.code.interpreter.ir with parameters of type AviatorFunction -
Uses of AviatorFunction in com.googlecode.aviator.runtime
Classes in com.googlecode.aviator.runtime that implement AviatorFunctionMethods in com.googlecode.aviator.runtime that return AviatorFunctionModifier and TypeMethodDescriptionprivate AviatorFunction
RuntimeFunctionDelegator.getFunc
(Map<String, Object> env, AviatorObject... args) static AviatorFunction
RuntimeUtils.getFunction
(Object object, Map<String, Object> env) static AviatorFunction
RuntimeUtils.getFunction
(Map<String, Object> env, String name) private AviatorFunction
RuntimeFunctionDelegator.tryGetFuncFromEnv
(Map<String, Object> env) static final AviatorFunction
RuntimeUtils.unpackArgsFunction
(AviatorFunction fn) Wrap the function to unpacking-arguments function.Methods in com.googlecode.aviator.runtime with parameters of type AviatorFunctionModifier and TypeMethodDescriptionstatic void
RuntimeUtils.resetLambdaContext
(AviatorFunction fn) static final AviatorFunction
RuntimeUtils.unpackArgsFunction
(AviatorFunction fn) Wrap the function to unpacking-arguments function. -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function
Classes in com.googlecode.aviator.runtime.function that implement AviatorFunctionModifier and TypeClassDescriptionclass
Abstract function implementationclass
Abstract function to implement variadic arguments function.class
An aviator function wraps a class's static method.class
Dispatch function by argument arity.final class
All lamabda function base classclass
Trace eval function.Fields in com.googlecode.aviator.runtime.function declared as AviatorFunctionMethods in com.googlecode.aviator.runtime.function that return AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunction
FunctionUtils.getFunction
(AviatorObject arg, Map<String, Object> env, int arity) Get a function from env in follow orders: arg value env current evaluator instance.static AviatorFunction
TraceFunction.wrapTrace
(AviatorFunction func) Methods in com.googlecode.aviator.runtime.function with parameters of type AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunction
TraceFunction.wrapTrace
(AviatorFunction func) Constructors in com.googlecode.aviator.runtime.function with parameters of type AviatorFunction -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.internal
Classes in com.googlecode.aviator.runtime.function.internal that implement AviatorFunctionModifier and TypeClassDescriptionclass
__catch_handler(fun, exception) to create aCatchHandler
.class
__if_callcc functionclass
__new(Class, ...args) to create an instance of special class with arguments.class
Internal reducer-break function for 'for-loop' structure.class
Internal reducer-continue function for 'for-loop' structure.class
Internal reducer-callcc function for 'for-loop' structure.class
Internal reducer-return function for 'for-loop' structure.class
__throw(e) to throw an exception.class
__try(try_func, catch_handlers, finally_fn, callcc)class
Unpacking arguments on runtimeclass
__use(pkg, ...names) function to implement import useFields in com.googlecode.aviator.runtime.function.internal declared as AviatorFunctionModifier and TypeFieldDescriptionprivate final AviatorFunction
UnpackingArgsFunction.fn
private final AviatorFunction
CatchHandler.func
Methods in com.googlecode.aviator.runtime.function.internal that return AviatorFunctionMethods in com.googlecode.aviator.runtime.function.internal with parameters of type AviatorFunctionModifier and TypeMethodDescriptionprivate AviatorObject
ReducerFunction.reduce
(Map<String, Object> env, AviatorObject arg2, AviatorObject arg3, Object coll, AviatorFunction iteratorFn) Constructors in com.googlecode.aviator.runtime.function.internal with parameters of type AviatorFunctionModifierConstructorDescriptionCatchHandler
(Env env, AviatorFunction func, List<String> exceptionClassNames) -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.math
Classes in com.googlecode.aviator.runtime.function.math that implement AviatorFunctionModifier and TypeClassDescriptionclass
math.abs(d) functionclass
math.acos(d) functionclass
math.asin(d) functionclass
math.atan(d) functionclass
math.ceil(d) functionclass
math.cos(d) functionclass
math.floor(d) functionclass
math.log10(d) functionclass
math.log(d) functionclass
math.pow(d1,d2) functionclass
math.round(d) functionclass
math.sin(d) functionclass
math.sqrt(d) functionclass
math.tan(d) function -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.seq
Classes in com.googlecode.aviator.runtime.function.seq that implement AviatorFunctionModifier and TypeClassDescriptionclass
Base class for min/max function.class
seq.add function to add all elements in other sequence into this one.class
seq.add function to add an element into seq.class
seq.array(class, ...elements) function to create a new array of special type and elements.class
seq.collector(seq) to create a collector for this sequence.class
seq.raw(collector) to retrieve the raw container of collector.class
Composite predicate function with invalid input: '&'invalid input: '&' or ||class
seq.contains_key(map,key) function to check if seq(should be map) contains the key.class
count(seq) to get seq's sizeclass
Returns true if fun.call(x) is logical true for every x in sequence, else false.class
filter(seq,predicate) to filter seq by predicateclass
seq.get function to retrieve a element by index(for list) or key(for map).class
include(seq,obj) function to check if seq contains objectclass
into(to_coll, from_coll) Adds all elements in from_coll into to_coll by seq.add(to_coll, element) and return the to_coll.class
seq.keys(map) to retrieve keys sequence of the map.class
Function to make predicate for filter functionclass
seq.entry(key, value) function to create a Map.Entry instance.class
map(col,fun) function to iterate seq with functionclass
seq.max function to find the largest element in sequence.class
seq.min function to find the smallest element in sequence.class
seq.array_of(class, len) function to create a new array of special type and size.class
seq.list function to new an array list.class
seq.map function to new a hash map.class
seq.set function to new a hash set.class
Returns false if fun.call(x) is logical true for any x in sequence, else true.class
A predicate functionclass
seq.put function to set a element value by index(for list) or key(for map).class
reduce(col,fun,init) function to reduce seq with function and a initial value valueclass
seq.add function to add an element into seq.class
reverse(seq) to reverse an array or list in place.class
Returns the first logical true value of fun.call(x) for any x in sequence, else returns nil.class
sort(list, [comparator]) function to sort a java.util.List or array,return a sorted duplicate objectclass
seq.vals(map) to retrieve values sequence of the map.class
seq.collector(seq) to create a collector for this sequence.Fields in com.googlecode.aviator.runtime.function.seq declared as AviatorFunctionMethods in com.googlecode.aviator.runtime.function.seq that return AviatorFunctionModifier and TypeMethodDescriptionprivate static AviatorFunction
SeqCompsitePredFunFunction.createFunction
(Map<String, Object> env, AviatorObject[] args, SeqCompsitePredFunFunction.LogicOp op) -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.string
Classes in com.googlecode.aviator.runtime.function.string that implement AviatorFunctionModifier and TypeClassDescriptionclass
string.contains(s1,s2) functionclass
string.endsWith(s1,s2) functionclass
String.indexOf functionclass
string.join functionclass
string.length(s) functionclass
string.replace_all functionclass
string.replace_first functionclass
string.split functionclass
string.startsWith(s1,s2) functionclass
string.substring(s1,s2) function -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.system
Classes in com.googlecode.aviator.runtime.function.system that implement AviatorFunctionModifier and TypeClassDescriptionclass
Abstract base class for system min/max function.class
assert function to assert an expression's value is true, otherwise throw an exception.class
Cast value to bigintclass
Binary function,includes +,-,*,/,%,!class
Cast value to boolean, return false when nil or false, otherwise returns true.class
Returns an implementation of java.util.Comparator based upon pred function.class
A compare function.class
Constant function to return the argument itself.class
date_to_string functionclass
Cast value to decimal.class
Cast value to double,double(a) eg.class
eval(script) , eval(script, bindings) and eval(script, bindings, cached) to execute a script with current env or special bindings, default is in caching mode.class
identity function return the argument itself.class
is_a(x, clazz) returns true when x is an intance of the class.class
is_def(x) returns true when variable x is defined in current scope or parent scopes.class
load('script.av') to load a script and retrieve it's exports.class
Cast value to longclass
max function to find the largest element in arguments.class
meta(obj, [key]) function to return the meatadata of obj [with the key], returns null if ithere is no metadata.class
min function to find the smallest element in arguments.class
now() function to invoke System.currentTimeMillis()class
println(obj) function to print objectclass
println(obj) function to print object with newlineclass
pst([out], e) function to print stacktrace of exceptionclass
rand() function to generate random double valueclass
A function to create a range in [start, end] with step.class
require('script.av') to load a script and retrieve it's exports, if it's required before, it will return the exports directly.class
seq(obj) function to cast a object into sequence, throw an runtime exception if fail.class
Cast value to stringclass
string_to_date functionclass
sysdate() functionclass
tuple(x,y,z, ...) function to return an object array.class
type(x) function return the type of x, the result is a string such as 'string', 'long', 'double' etc.class
undef(x) to forgot a variable that is defined in current scope.class
with_meta(obj, key, value) function to add metadata key/value to obj, return the obj.class
without_meta(obj, key) function to remove metadata by key from obj, return the obj. -
Uses of AviatorFunction in com.googlecode.aviator.runtime.op
Methods in com.googlecode.aviator.runtime.op with parameters of type AviatorFunctionModifier and TypeMethodDescriptionprivate static AviatorObject
OperationRuntime.eval0
(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObject
OperationRuntime.eval0
(AviatorObject arg, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObject
OperationRuntime.eval0
(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) static AviatorObject
OperationRuntime.evalOpFunction
(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func)