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.functionsprivate List<AviatorFunction> Feature.functionsFunctions to support the feature.private static Map<String, AviatorFunction> AviatorEvaluatorInstance.internalASMLibFunctionscached compiled internal ASM lib functionsprivate static Map<String, AviatorFunction> AviatorEvaluatorInstance.internalInterpretedLibFunctionscached compiled internal interpred lib functionsstatic final Map<OperatorType, AviatorFunction> AviatorEvaluator.OPS_MAPDeprecated.please use instance's field.private final Map<OperatorType, AviatorFunction> AviatorEvaluatorInstance.opsMapMethods in com.googlecode.aviator that return AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunctionAviatorEvaluator.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 AviatorFunctionAviatorEvaluator.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 AviatorFunctionClassPathConfigFunctionLoader.onFunctionNotFound(String name) FunctionLoader.onFunctionNotFound(String name) Invoked when function not found, The implementation must returns null when function not found.static AviatorFunctionAviatorEvaluator.removeFunction(AviatorFunction function) Remove a aviator functionstatic AviatorFunctionAviatorEvaluator.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 AviatorFunctionAviatorEvaluator.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 voidAviatorEvaluator.addFunction(AviatorFunction function) Add an aviator function,it's not thread-safe.voidAviatorEvaluatorInstance.addFunction(AviatorFunction function) Add an aviator function,it's not thread-safe.voidAviatorEvaluatorInstance.addFunction(String name, AviatorFunction function) Adds a function with the namestatic voidAviatorEvaluator.addOpFunction(OperatorType opType, AviatorFunction function) Add an operator aviator function,it's not thread-safe.voidAviatorEvaluatorInstance.addOpFunction(OperatorType opType, AviatorFunction function) Add an operator aviator function,it's not thread-safe.private static List<AviatorFunction> Feature.asList(AviatorFunction... args) static AviatorFunctionAviatorEvaluator.removeFunction(AviatorFunction function) Remove a aviator functionAviatorEvaluatorInstance.removeFunction(AviatorFunction function) Remove a aviator functionConstructor parameters in com.googlecode.aviator with type arguments of type AviatorFunctionModifierConstructorDescriptionprivateFeature(List<AviatorFunction> funcs) privateFeature(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 AviatorObjectSendIR.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 AviatorFunctionRuntimeFunctionDelegator.getFunc(Map<String, Object> env, AviatorObject... args) static AviatorFunctionRuntimeUtils.getFunction(Object object, Map<String, Object> env) static AviatorFunctionRuntimeUtils.getFunction(Map<String, Object> env, String name) private AviatorFunctionRuntimeFunctionDelegator.tryGetFuncFromEnv(Map<String, Object> env) static final AviatorFunctionRuntimeUtils.unpackArgsFunction(AviatorFunction fn) Wrap the function to unpacking-arguments function.Methods in com.googlecode.aviator.runtime with parameters of type AviatorFunctionModifier and TypeMethodDescriptionstatic voidRuntimeUtils.resetLambdaContext(AviatorFunction fn) static final AviatorFunctionRuntimeUtils.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 TypeClassDescriptionclassAbstract function implementationclassAbstract function to implement variadic arguments function.classAn aviator function wraps a class's static method.classDispatch function by argument arity.final classAll lamabda function base classclassTrace eval function.Fields in com.googlecode.aviator.runtime.function declared as AviatorFunctionMethods in com.googlecode.aviator.runtime.function that return AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunctionFunctionUtils.getFunction(AviatorObject arg, Map<String, Object> env, int arity) Get a function from env in follow orders: arg value env current evaluator instance.static AviatorFunctionTraceFunction.wrapTrace(AviatorFunction func) Methods in com.googlecode.aviator.runtime.function with parameters of type AviatorFunctionModifier and TypeMethodDescriptionstatic AviatorFunctionTraceFunction.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.classInternal reducer-break function for 'for-loop' structure.classInternal reducer-continue function for 'for-loop' structure.classInternal reducer-callcc function for 'for-loop' structure.classInternal reducer-return function for 'for-loop' structure.class__throw(e) to throw an exception.class__try(try_func, catch_handlers, finally_fn, callcc)classUnpacking arguments on runtimeclass__use(pkg, ...names) function to implement import useFields in com.googlecode.aviator.runtime.function.internal declared as AviatorFunctionModifier and TypeFieldDescriptionprivate final AviatorFunctionUnpackingArgsFunction.fnprivate final AviatorFunctionCatchHandler.funcMethods in com.googlecode.aviator.runtime.function.internal that return AviatorFunctionMethods in com.googlecode.aviator.runtime.function.internal with parameters of type AviatorFunctionModifier and TypeMethodDescriptionprivate AviatorObjectReducerFunction.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 TypeClassDescriptionclassmath.abs(d) functionclassmath.acos(d) functionclassmath.asin(d) functionclassmath.atan(d) functionclassmath.ceil(d) functionclassmath.cos(d) functionclassmath.floor(d) functionclassmath.log10(d) functionclassmath.log(d) functionclassmath.pow(d1,d2) functionclassmath.round(d) functionclassmath.sin(d) functionclassmath.sqrt(d) functionclassmath.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 TypeClassDescriptionclassBase class for min/max function.classseq.add function to add all elements in other sequence into this one.classseq.add function to add an element into seq.classseq.array(class, ...elements) function to create a new array of special type and elements.classseq.collector(seq) to create a collector for this sequence.classseq.raw(collector) to retrieve the raw container of collector.classComposite predicate function with invalid input: '&'invalid input: '&' or ||classseq.contains_key(map,key) function to check if seq(should be map) contains the key.classcount(seq) to get seq's sizeclassReturns true if fun.call(x) is logical true for every x in sequence, else false.classfilter(seq,predicate) to filter seq by predicateclassseq.get function to retrieve a element by index(for list) or key(for map).classinclude(seq,obj) function to check if seq contains objectclassinto(to_coll, from_coll) Adds all elements in from_coll into to_coll by seq.add(to_coll, element) and return the to_coll.classseq.keys(map) to retrieve keys sequence of the map.classFunction to make predicate for filter functionclassseq.entry(key, value) function to create a Map.Entry instance.classmap(col,fun) function to iterate seq with functionclassseq.max function to find the largest element in sequence.classseq.min function to find the smallest element in sequence.classseq.array_of(class, len) function to create a new array of special type and size.classseq.list function to new an array list.classseq.map function to new a hash map.classseq.set function to new a hash set.classReturns false if fun.call(x) is logical true for any x in sequence, else true.classA predicate functionclassseq.put function to set a element value by index(for list) or key(for map).classreduce(col,fun,init) function to reduce seq with function and a initial value valueclassseq.add function to add an element into seq.classreverse(seq) to reverse an array or list in place.classReturns the first logical true value of fun.call(x) for any x in sequence, else returns nil.classsort(list, [comparator]) function to sort a java.util.List or array,return a sorted duplicate objectclassseq.vals(map) to retrieve values sequence of the map.classseq.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 AviatorFunctionSeqCompsitePredFunFunction.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 TypeClassDescriptionclassstring.contains(s1,s2) functionclassstring.endsWith(s1,s2) functionclassString.indexOf functionclassstring.join functionclassstring.length(s) functionclassstring.replace_all functionclassstring.replace_first functionclassstring.split functionclassstring.startsWith(s1,s2) functionclassstring.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 TypeClassDescriptionclassAbstract base class for system min/max function.classassert function to assert an expression's value is true, otherwise throw an exception.classCast value to bigintclassBinary function,includes +,-,*,/,%,!classCast value to boolean, return false when nil or false, otherwise returns true.classReturns an implementation of java.util.Comparator based upon pred function.classA compare function.classConstant function to return the argument itself.classdate_to_string functionclassCast value to decimal.classCast value to double,double(a) eg.classeval(script) , eval(script, bindings) and eval(script, bindings, cached) to execute a script with current env or special bindings, default is in caching mode.classidentity function return the argument itself.classis_a(x, clazz) returns true when x is an intance of the class.classis_def(x) returns true when variable x is defined in current scope or parent scopes.classload('script.av') to load a script and retrieve it's exports.classCast value to longclassmax function to find the largest element in arguments.classmeta(obj, [key]) function to return the meatadata of obj [with the key], returns null if ithere is no metadata.classmin function to find the smallest element in arguments.classnow() function to invoke System.currentTimeMillis()classprintln(obj) function to print objectclassprintln(obj) function to print object with newlineclasspst([out], e) function to print stacktrace of exceptionclassrand() function to generate random double valueclassA function to create a range in [start, end] with step.classrequire('script.av') to load a script and retrieve it's exports, if it's required before, it will return the exports directly.classseq(obj) function to cast a object into sequence, throw an runtime exception if fail.classCast value to stringclassstring_to_date functionclasssysdate() functionclasstuple(x,y,z, ...) function to return an object array.classtype(x) function return the type of x, the result is a string such as 'string', 'long', 'double' etc.classundef(x) to forgot a variable that is defined in current scope.classwith_meta(obj, key, value) function to add metadata key/value to obj, return the obj.classwithout_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 AviatorObjectOperationRuntime.eval0(AviatorObject left, AviatorObject right, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObjectOperationRuntime.eval0(AviatorObject arg, Map<String, Object> env, OperatorType opType, AviatorFunction func) private static AviatorObjectOperationRuntime.eval0(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func) static AviatorObjectOperationRuntime.evalOpFunction(Map<String, Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func)