Uses of Interface
com.googlecode.aviator.runtime.type.AviatorFunction
-
-
Uses of AviatorFunction in com.googlecode.aviator
Fields in com.googlecode.aviator with type parameters of type AviatorFunction Modifier and Type Field Description private java.util.Map<java.lang.String,AviatorFunction>ClassPathConfigFunctionLoader. functionsprivate java.util.List<AviatorFunction>Feature. functionsFunctions to support the feature.private static java.util.Map<java.lang.String,AviatorFunction>AviatorEvaluatorInstance. internalASMLibFunctionscached compiled internal ASM lib functionsprivate static java.util.Map<java.lang.String,AviatorFunction>AviatorEvaluatorInstance. internalInterpretedLibFunctionscached compiled internal interpred lib functionsstatic java.util.Map<OperatorType,AviatorFunction>AviatorEvaluator. OPS_MAPDeprecated.please use instance's field.private java.util.Map<OperatorType,AviatorFunction>AviatorEvaluatorInstance. opsMapMethods in com.googlecode.aviator that return AviatorFunction Modifier and Type Method Description static AviatorFunctionAviatorEvaluator. getFunction(java.lang.String name)Retrieve an aviator function by name,throw exception if not found or null.It's not thread-safe.AviatorFunctionAviatorEvaluatorInstance. getFunction(java.lang.String name)AviatorFunctionAviatorEvaluatorInstance. getFunction(java.lang.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.AviatorFunctionAviatorEvaluatorInstance. getOpFunction(OperatorType opType)Retrieve an operator aviator function by op type, return null if not found.It's not thread-safe.private AviatorFunctionClassPathConfigFunctionLoader. loadClass(java.lang.String className)AviatorFunctionClassPathConfigFunctionLoader. onFunctionNotFound(java.lang.String name)AviatorFunctionFunctionLoader. onFunctionNotFound(java.lang.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(java.lang.String name)Remove an aviator function by name,it's not thread-safe.AviatorFunctionAviatorEvaluatorInstance. removeFunction(AviatorFunction function)Remove a aviator functionAviatorFunctionAviatorEvaluatorInstance. removeFunction(java.lang.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.AviatorFunctionAviatorEvaluatorInstance. 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 AviatorFunction Modifier and Type Method Description private static java.util.List<AviatorFunction>Feature. asList(AviatorFunction... args)java.util.List<AviatorFunction>Feature. getFunctions()java.util.Map<OperatorType,AviatorFunction>AviatorEvaluatorInstance. getOpsMap()Returns the operators map.private java.util.Map<java.lang.String,AviatorFunction>ClassPathConfigFunctionLoader. load()Load custom functions from config file, default is "aviator_functions.config" in classpath.private java.util.Map<java.lang.String,AviatorFunction>AviatorEvaluatorInstance. loadInternalFunctions()Methods in com.googlecode.aviator with parameters of type AviatorFunction Modifier and Type Method Description static 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(java.lang.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 java.util.List<AviatorFunction>Feature. asList(AviatorFunction... args)static AviatorFunctionAviatorEvaluator. removeFunction(AviatorFunction function)Remove a aviator functionAviatorFunctionAviatorEvaluatorInstance. removeFunction(AviatorFunction function)Remove a aviator functionConstructor parameters in com.googlecode.aviator with type arguments of type AviatorFunction Constructor Description Feature(java.util.List<AviatorFunction> funcs)Feature(java.util.Set<Feature> prequires, java.util.List<AviatorFunction> funcs) -
Uses of AviatorFunction in com.googlecode.aviator.code.interpreter.ir
Fields in com.googlecode.aviator.code.interpreter.ir declared as AviatorFunction Modifier and Type Field Description private AviatorFunctionOperatorIR. fnMethods in com.googlecode.aviator.code.interpreter.ir with parameters of type AviatorFunction Modifier and Type Method Description private AviatorObjectSendIR. callFn(AviatorFunction fn, AviatorObject[] args, int arity, Env env)Constructors in com.googlecode.aviator.code.interpreter.ir with parameters of type AviatorFunction Constructor Description OperatorIR(OperatorType op, AviatorFunction func) -
Uses of AviatorFunction in com.googlecode.aviator.runtime
Classes in com.googlecode.aviator.runtime that implement AviatorFunction Modifier and Type Class Description classRuntimeFunctionDelegatorRuntime function delegatorMethods in com.googlecode.aviator.runtime that return AviatorFunction Modifier and Type Method Description private AviatorFunctionRuntimeFunctionDelegator. getFunc(java.util.Map<java.lang.String,java.lang.Object> env, AviatorObject... args)static AviatorFunctionRuntimeUtils. getFunction(java.lang.Object object, java.util.Map<java.lang.String,java.lang.Object> env)static AviatorFunctionRuntimeUtils. getFunction(java.util.Map<java.lang.String,java.lang.Object> env, java.lang.String name)private AviatorFunctionRuntimeFunctionDelegator. tryGetFuncFromEnv(java.util.Map<java.lang.String,java.lang.Object> env)static AviatorFunctionRuntimeUtils. unpackArgsFunction(AviatorFunction fn)Wrap the function to unpacking-arguments function.Methods in com.googlecode.aviator.runtime with parameters of type AviatorFunction Modifier and Type Method Description static voidRuntimeUtils. resetLambdaContext(AviatorFunction fn)static 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 AviatorFunction Modifier and Type Class Description classAbstractFunctionAbstract function implementationclassAbstractVariadicFunctionAbstract function to implement variadic arguments function.classClassMethodFunctionAn aviator function wraps a class's static method.classDispatchFunctionDispatch function by argument arity.classLambdaFunctionAll lamabda function base classclassTraceFunctionTrace eval function.Fields in com.googlecode.aviator.runtime.function declared as AviatorFunction Modifier and Type Field Description private AviatorFunctionTraceFunction. rawFuncMethods in com.googlecode.aviator.runtime.function that return AviatorFunction Modifier and Type Method Description static AviatorFunctionFunctionUtils. getFunction(AviatorObject arg, java.util.Map<java.lang.String,java.lang.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 AviatorFunction Modifier and Type Method Description static AviatorFunctionTraceFunction. wrapTrace(AviatorFunction func)Constructors in com.googlecode.aviator.runtime.function with parameters of type AviatorFunction Constructor Description TraceFunction(AviatorFunction rawFunc) -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.internal
Classes in com.googlecode.aviator.runtime.function.internal that implement AviatorFunction Modifier and Type Class Description classCatchHandlerFunction__catch_handler(fun, exception) to create aCatchHandler.classIfCallccFunction__if_callcc functionclassNewInstanceFunction__new(Class, ...args) to create an instance of special class with arguments.classReducerBreakFunctionInternal reducer-break function for 'for-loop' structure.classReducerContFunctionInternal reducer-continue function for 'for-loop' structure.classReducerFunctionInternal reducer-callcc function for 'for-loop' structure.classReducerReturnFunctionInternal reducer-return function for 'for-loop' structure.classThrowFunction__throw(e) to throw an exception.classTryCatchFunction__try(try_func, catch_handlers, finally_fn, callcc)classUnpackingArgsFunctionUnpacking arguments on runtimeclassUseFunction__use(pkg, ...names) function to implement import useFields in com.googlecode.aviator.runtime.function.internal declared as AviatorFunction Modifier and Type Field Description private AviatorFunctionUnpackingArgsFunction. fnprivate AviatorFunctionCatchHandler. funcMethods in com.googlecode.aviator.runtime.function.internal that return AviatorFunction Modifier and Type Method Description AviatorFunctionCatchHandler. getFunc()Methods in com.googlecode.aviator.runtime.function.internal with parameters of type AviatorFunction Modifier and Type Method Description private AviatorObjectReducerFunction. reduce(java.util.Map<java.lang.String,java.lang.Object> env, AviatorObject arg2, AviatorObject arg3, java.lang.Object coll, AviatorFunction iteratorFn)Constructors in com.googlecode.aviator.runtime.function.internal with parameters of type AviatorFunction Constructor Description CatchHandler(Env env, AviatorFunction func, java.util.List<java.lang.String> exceptionClassNames)UnpackingArgsFunction(AviatorFunction fn) -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.math
Classes in com.googlecode.aviator.runtime.function.math that implement AviatorFunction Modifier and Type Class Description classMathAbsFunctionmath.abs(d) functionclassMathAcosFunctionmath.acos(d) functionclassMathAsinFunctionmath.asin(d) functionclassMathAtanFunctionmath.atan(d) functionclassMathCeilFunctionmath.ceil(d) functionclassMathCosFunctionmath.cos(d) functionclassMathFloorFunctionmath.floor(d) functionclassMathLog10Functionmath.log10(d) functionclassMathLogFunctionmath.log(d) functionclassMathPowFunctionmath.pow(d1,d2) functionclassMathRoundFunctionmath.round(d) functionclassMathSinFunctionmath.sin(d) functionclassMathSqrtFunctionmath.sqrt(d) functionclassMathTanFunctionmath.tan(d) function -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.seq
Classes in com.googlecode.aviator.runtime.function.seq that implement AviatorFunction Modifier and Type Class Description classAbstractSeqMinMaxFunctionBase class for min/max function.classSeqAddAllFunctionseq.add function to add all elements in other sequence into this one.classSeqAddFunctionseq.add function to add an element into seq.classSeqArrayFunctionseq.array(class, ...elements) function to create a new array of special type and elements.classSeqCollectorFunctionseq.collector(seq) to create a collector for this sequence.classSeqCollectorRawFunctionseq.raw(collector) to retrieve the raw container of collector.classSeqCompsitePredFunFunctionComposite predicate function with && or ||classSeqContainsKeyFunctionseq.contains_key(map,key) function to check if seq(should be map) contains the key.classSeqCountFunctioncount(seq) to get seq's sizeclassSeqEveryFunctionReturns true if fun.call(x) is logical true for every x in sequence, else false.classSeqFilterFunctionfilter(seq,predicate) to filter seq by predicateclassSeqGetFunctionseq.get function to retrieve a element by index(for list) or key(for map).classSeqIncludeFunctioninclude(seq,obj) function to check if seq contains objectclassSeqIntoFunctioninto(to_coll, from_coll) Adds all elements in from_coll into to_coll by seq.add(to_coll, element) and return the to_coll.classSeqKeysFunctionseq.keys(map) to retrieve keys sequence of the map.classSeqMakePredicateFunFunctionFunction to make predicate for filter functionclassSeqMapEntryFunctionseq.entry(key, value) function to create a Map.Entry instance.classSeqMapFunctionmap(col,fun) function to iterate seq with functionclassSeqMaxFunctionseq.max function to find the largest element in sequence.classSeqMinFunctionseq.min function to find the smallest element in sequence.classSeqNewArrayFunctionseq.array_of(class, len) function to create a new array of special type and size.classSeqNewListFunctionseq.list function to new an array list.classSeqNewMapFunctionseq.map function to new a hash map.classSeqNewSetFunctionseq.set function to new a hash set.classSeqNotAnyFunctionReturns false if fun.call(x) is logical true for any x in sequence, else true.classSeqPredicateFunctionA predicate functionclassSeqPutFunctionseq.put function to set a element value by index(for list) or key(for map).classSeqReduceFunctionreduce(col,fun,init) function to reduce seq with function and a initial value valueclassSeqRemoveFunctionseq.add function to add an element into seq.classSeqReverseFunctionreverse(seq) to reverse an array or list in place.classSeqSomeFunctionReturns the first logical true value of fun.call(x) for any x in sequence, else returns nil.classSeqSortFunctionsort(list, [comparator]) function to sort a java.util.List or array,return a sorted duplicate objectclassSeqValsFunctionseq.vals(map) to retrieve values sequence of the map.classSeqZipmapFunctionseq.collector(seq) to create a collector for this sequence.Fields in com.googlecode.aviator.runtime.function.seq declared as AviatorFunction Modifier and Type Field Description private static AviatorFunctionSeqIntoFunction. SEQ_ADDMethods in com.googlecode.aviator.runtime.function.seq that return AviatorFunction Modifier and Type Method Description private static AviatorFunctionSeqCompsitePredFunFunction. createFunction(java.util.Map<java.lang.String,java.lang.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 AviatorFunction Modifier and Type Class Description classStringContainsFunctionstring.contains(s1,s2) functionclassStringEndsWithFunctionstring.endsWith(s1,s2) functionclassStringIndexOfFunctionString.indexOf functionclassStringJoinFunctionstring.join functionclassStringLengthFunctionstring.length(s) functionclassStringReplaceAllFunctionstring.replace_all functionclassStringReplaceFirstFunctionstring.replace_first functionclassStringSplitFunctionstring.split functionclassStringStartsWithFunctionstring.startsWith(s1,s2) functionclassStringSubStringFunctionstring.substring(s1,s2) function -
Uses of AviatorFunction in com.googlecode.aviator.runtime.function.system
Classes in com.googlecode.aviator.runtime.function.system that implement AviatorFunction Modifier and Type Class Description classAbstractMinMaxFunctionAbstract base class for system min/max function.classAssertFunctionassert function to assert an expression's value is true, otherwise throw an exception.classBigIntFunctionCast value to bigintclassBinaryFunctionBinary function,includes +,-,*,/,%,!classBooleanFunctionCast value to boolean, return false when nil or false, otherwise returns true.classComparatorFunctionReturns an implementation of java.util.Comparator based upon pred function.classCompareFunctionA compare function.classConstantFunctionConstant function to return the argument itself.classDate2StringFunctiondate_to_string functionclassDecimalFunctionCast value to decimal.classDoubleFunctionCast value to double,double(a) eg.classEvalFunctioneval(script) , eval(script, bindings) and eval(script, bindings, cached) to execute a script with current env or special bindings, default is in caching mode.classIdentityFunctionidentity function return the argument itself.classIsAFunctionis_a(x, clazz) returns true when x is an intance of the class.classIsDefFunctionis_def(x) returns true when variable x is defined in current scope or parent scopes.classLoadFunctionload('script.av') to load a script and retrieve it's exports.classLongFunctionCast value to longclassMaxFunctionmax function to find the largest element in arguments.classMetaFunctionmeta(obj, [key]) function to return the meatadata of obj [with the key], returns null if ithere is no metadata.classMinFunctionmin function to find the smallest element in arguments.classNowFunctionnow() function to invoke System.currentTimeMillis()classPrintFunctionprintln(obj) function to print objectclassPrintlnFunctionprintln(obj) function to print object with newlineclassPstFunctionpst([out], e) function to print stacktrace of exceptionclassRandomFunctionrand() function to generate random double valueclassRangeFunctionA function to create a range in [start, end] with step.classRequireFunctionrequire('script.av') to load a script and retrieve it's exports, if it's required before, it will return the exports directly.classSeqFunctionseq(obj) function to cast a object into sequence, throw an runtime exception if fail.classStrFunctionCast value to stringclassString2DateFunctionstring_to_date functionclassSysDateFunctionsysdate() functionclassTupleFunctiontuple(x,y,z, ...) function to return an object array.classTypeFunctiontype(x) function return the type of x, the result is a string such as 'string', 'long', 'double' etc.classUndefFunctionundef(x) to forgot a variable that is defined in current scope.classWithMetaFunctionwith_meta(obj, key, value) function to add metadata key/value to obj, return the obj.classWithoutMetaFunctionwithout_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 AviatorFunction Modifier and Type Method Description private static AviatorObjectOperationRuntime. eval0(AviatorObject left, AviatorObject right, java.util.Map<java.lang.String,java.lang.Object> env, OperatorType opType, AviatorFunction func)private static AviatorObjectOperationRuntime. eval0(AviatorObject arg, java.util.Map<java.lang.String,java.lang.Object> env, OperatorType opType, AviatorFunction func)private static AviatorObjectOperationRuntime. eval0(java.util.Map<java.lang.String,java.lang.Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func)static AviatorObjectOperationRuntime. evalOpFunction(java.util.Map<java.lang.String,java.lang.Object> env, AviatorObject[] args, OperatorType opType, AviatorFunction func)
-