Package ortus.boxlang.runtime.dynamic
Interface IReferenceable
- All Known Subinterfaces:
IClassRunnable
,IScope
,IStruct
- All Known Implementing Classes:
ApplicationScope
,ArgumentsScope
,Array
,BaseScope
,BoxInterface
,ClassVariablesScope
,DateTime
,DynamicObject
,File
,ImmutableArray
,ImmutableStruct
,LocalScope
,Query
,QueryColumn
,RequestScope
,ScopeWrapper
,ServerScope
,SessionScope
,StaticScope
,Struct
,ThisScope
,ThreadScope
,VariablesScope
,XML
public interface IReferenceable
This represents the most basic box context.
-
Method Summary
Modifier and TypeMethodDescriptionassign
(IBoxContext context, Key name, Object value) Assign a value to a key in this objectdereference
(IBoxContext context, Key name, Boolean safe) Dereference this object by a key and return the value, or throw exceptiondereferenceAndInvoke
(IBoxContext context, Key name, Object[] positionalArguments, Boolean safe) Dereference this object by a key and invoke the result as an invokable (UDF, java method) using positional argumentsdereferenceAndInvoke
(IBoxContext context, Key name, Map<Key, Object> namedArguments, Boolean safe) Dereference this object by a key and invoke the result as an invokable (UDF, java method) using named arguments
-
Method Details
-
dereference
Dereference this object by a key and return the value, or throw exception- Parameters:
context
- The context we're executing inside ofname
- The key to dereferencesafe
- Whether to throw an exception if the key is not found- Returns:
- The requested object
-
dereferenceAndInvoke
Object dereferenceAndInvoke(IBoxContext context, Key name, Object[] positionalArguments, Boolean safe) Dereference this object by a key and invoke the result as an invokable (UDF, java method) using positional arguments- Parameters:
context
- The context we're executing inside ofname
- The key to dereferencepositionalArguments
- The positional arguments to pass to the invokablesafe
- Whether to throw an exception if the key is not found- Returns:
- The requested object
-
dereferenceAndInvoke
Object dereferenceAndInvoke(IBoxContext context, Key name, Map<Key, Object> namedArguments, Boolean safe) Dereference this object by a key and invoke the result as an invokable (UDF, java method) using named arguments- Parameters:
context
- The context we're executing inside ofname
- The key to dereferencenamedArguments
- The named arguments to pass to the invokablesafe
- Whether to throw an exception if the key is not found- Returns:
- The requested object
-
assign
Assign a value to a key in this object- Parameters:
context
- The context we're executing inside ofname
- The name of the scope to getvalue
- The value to assign to the scope- Returns:
- The value that was assigned
-