Package ortus.boxlang.runtime.bifs
Class BIF
java.lang.Object
ortus.boxlang.runtime.bifs.BIF
- Direct Known Subclasses:
Abs,Acos,ApplicationRestart,ApplicationStartTime,ApplicationStop,ArrayAppend,ArrayAvg,ArrayClear,ArrayDelete,ArrayDeleteAt,ArrayEach,ArrayEvery,ArrayFilter,ArrayFind,ArrayFindAll,ArrayFirst,ArrayGetMetadata,ArrayIndexExists,ArrayInsertAt,ArrayIsEmpty,ArrayLast,ArrayMap,ArrayMax,ArrayMedian,ArrayMerge,ArrayMin,ArrayNew,ArrayPop,ArrayPrepend,ArrayPush,ArrayReduce,ArrayReduceRight,ArrayResize,ArrayReverse,ArraySet,ArrayShift,ArraySlice,ArraySome,ArraySort,ArraySplice,ArraySum,ArraySwap,ArrayToList,ArrayToStruct,ArrayUnshift,Ascii,Asin,Atn,Attempt,BinaryDecode,BinaryEncode,BitAnd,BitMaskClear,BitMaskRead,BitMaskSet,BitNot,BitOr,BitSh,BitXor,BooleanFormat,BoxAnnounce,BoxAnnounceAsync,BoxLangBIFProxy,BoxRegisterInterceptor,CallStackGet,CamelCase,Ceiling,Char,CharsetDecode,CharsetEncode,ClearLocale,ClearTimezone,Compare,CompareNoCase,Cos,CreateDateTime,CreateDynamicProxy,CreateGUID,CreateObject,CreateODBCDateTime,CreateTempDirectory,CreateTempFile,CreateTimeSpan,CreateUUID,DataNavigate,DateAdd,DateCompare,DateConvert,DateDiff,DateTimeFormat,DE,DebugBoxContexts,DecimalFormat,DecrementValue,Decrypt,DirectoryCopy,DirectoryCreate,DirectoryDelete,DirectoryExists,DirectoryList,DirectoryMove,Dump,Duplicate,EncodeForHTML,Encrypt,Exp,ExpandPath,FileAppend,FileClose,FileCopy,FileDelete,FileExists,FileGetMimeType,FileInfo,FileIsEOF,FileMove,FileOpen,FileRead,FileReadLine,FileSeek,FileSetAccessMode,FileSetAttribute,FileSetLastModified,FileWrite,FileWriteLine,Find,FindOneOf,Fix,Floor,FormatBaseN,GenerateSecretKey,GetApplicationMetadata,GetBaseTemplatePath,GetBoxCache,GetBoxCacheFilter,GetBoxCacheNames,GetBoxCacheProviders,GetBoxContext,GetBoxRuntime,GetBoxVersionInfo,GetCanonicalPath,GetClassMetadata,GetComponentList,GetContextRoot,GetCurrentTemplatePath,GetDirectoryFromPath,GetFileFromPath,GetFunctionCalledName,GetFunctionList,GetLocale,GetLocaleInfo,GetMetaData,GetSystemSetting,GetTempDirectory,GetTickCount,GetTimezoneInfo,GetToken,Hash,Hmac,IIF,IncrementValue,InputBaseN,Insert,Int,Invoke,IsArray,IsBinary,IsBoolean,IsClosure,IsCurrency,IsCustomFunction,IsDate,IsDateObject,IsDebugMode,IsDefined,IsEmpty,IsFileObject,IsInstanceOf,IsInThread,IsInTransaction,IsIPv6,IsJSON,IsLeapYear,IsLocalHost,IsNull,IsNumeric,IsObject,IsQuery,IsSimpleValue,IsStruct,IsValid,IsXML,IsXmlAttribute,IsXMLDoc,IsXMLElem,IsXMLNode,IsXMLRoot,JavaCast,JSONDeserialize,JSONPrettify,JSONSerialize,Justify,KebabCase,LCase,Left,Len,ListAppend,ListChangeDelims,ListCompact,ListDeleteAt,ListFilter,ListGetAt,ListGetEndings,ListIndexExists,ListInsertAt,ListItemTrim,ListLen,ListPrepend,ListQualify,ListRemoveDuplicates,ListRest,ListSetAt,ListToArray,ListValueCount,Log,Log10,LSIsDate,LSParseDateTime,LTrim,Max,Mid,Min,Now,NullValue,NumberFormat,PagePoolClear,ParagraphFormat,ParseCurrency,ParseDateTime,ParseNumber,PascalCase,Pi,PrecisionEvaluate,Print,Println,QueryAddColumn,QueryAddRow,QueryAppend,QueryClear,QueryColumnArray,QueryColumnCount,QueryColumnData,QueryColumnExists,QueryCurrentRow,QueryDeleteColumn,QueryDeleteRow,QueryEach,QueryEvery,QueryExecute,QueryFilter,QueryGetCell,QueryGetResult,QueryKeyExists,QueryMap,QueryNew,QueryPrepend,QueryRecordCount,QueryReduce,QueryRowData,QuerySetCell,QuerySetRow,QuerySlice,QuerySome,QuerySort,QueryStringToStruct,Rand,Randomize,RandRange,ReEscape,ReFind,ReMatch,RemoveChars,RepeatString,Replace,ReplaceList,ReplaceNoCase,ReReplace,Reverse,Right,Round,RTrim,RunThreadInContext,SessionInvalidate,SessionRotate,SessionStartTime,SetLocale,SetTimezone,Sgn,Sin,Sleep,Slugify,SnakeCase,SpanExcluding,SpanIncluding,SQLPrettify,Sqr,StripCR,StructAppend,StructClear,StructCopy,StructDelete,StructEach,StructEquals,StructEvery,StructFilter,StructFind,StructFindKey,StructFindValue,StructGet,StructGetMetadata,StructInsert,StructIsCaseSensitive,StructIsOrdered,StructKeyArray,StructKeyExists,StructKeyList,StructKeyTranslate,StructMap,StructNew,StructReduce,StructSome,StructSort,StructToQueryString,StructToSorted,StructValueArray,SystemExecute,SystemOutput,Tan,Throw,TimeUnits,ToBase64,ToBinary,ToImmutable,ToMutable,ToNumeric,ToScript,ToString,TransactionCommit,TransactionRollback,TransactionSetSavepoint,Trim,TrueFalseFormat,UCase,UCFirst,URLDecode,URLEncodedFormat,Val,Wrap,WriteLog,WriteOutput,XMLChildPos,XMLElemNew,XMLFormat,XMLGetNodeType,XMLNew,XMLParse,XMLSearch,XMLTransform,XMLValidate,YesNoFormat
Base class for all BIFs. BIFs are invoked by the runtime when a function is called.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final KeyUsed to indicate what is the name of the function being invoked just like getCalledFunctionName() but internallystatic final KeyUsed to indicate that the BIF is being invoked as a member function and it will replace the first argument with the object on which it is being invokedprotected AsyncServiceThe async service helperprotected CacheServiceThe cache service helperprotected ComponentServiceThe component service helperprotected Argument[]BIF Argumentsprotected FunctionServiceThe function service helperprotected InterceptorServiceThe interceptor service helperThe runtime instance. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Object_invoke(IBoxContext context, ArgumentsScope arguments) This is overridden by the concrete to provide the actual BIF implementationvoidAnnounce an event with the providedIStructof data.Argument[]Get the arguments for this BIFinvoke(IBoxContext context, ArgumentsScope arguments) Invoke the BIF with the given arguments
-
Field Details
-
__isMemberExecution
Used to indicate that the BIF is being invoked as a member function and it will replace the first argument with the object on which it is being invoked -
__functionName
Used to indicate what is the name of the function being invoked just like getCalledFunctionName() but internally -
declaredArguments
BIF Arguments -
runtime
The runtime instance. This is public for a unit test to use -
functionService
The function service helper -
componentService
The component service helper -
interceptorService
The interceptor service helper -
cacheService
The cache service helper -
asyncService
The async service helper
-
-
Constructor Details
-
BIF
public BIF()
-
-
Method Details
-
invoke
Invoke the BIF with the given arguments- Parameters:
context- The context in which the BIF is being invokedarguments- The arguments to the BIF- Returns:
- The result of the invocation
-
_invoke
This is overridden by the concrete to provide the actual BIF implementation- Parameters:
context- The context in which the BIF is being invokedarguments- The arguments to the BIF- Returns:
- The result of the invocation
-
getDeclaredArguments
Get the arguments for this BIF- Returns:
- The arguments for this BIF
-
announce
Announce an event with the providedIStructof data.- Parameters:
state- The state key to announcedata- The data to announce
-