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 Details

    • dereference

      Object dereference(IBoxContext context, Key name, Boolean safe)
      Dereference this object by a key and return the value, or throw exception
      Parameters:
      context - The context we're executing inside of
      name - The key to dereference
      safe - 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 of
      name - The key to dereference
      positionalArguments - The positional arguments to pass to the invokable
      safe - 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 of
      name - The key to dereference
      namedArguments - The named arguments to pass to the invokable
      safe - Whether to throw an exception if the key is not found
      Returns:
      The requested object
    • assign

      Object assign(IBoxContext context, Key name, Object value)
      Assign a value to a key in this object
      Parameters:
      context - The context we're executing inside of
      name - The name of the scope to get
      value - The value to assign to the scope
      Returns:
      The value that was assigned