Class BaseScope

java.lang.Object
ortus.boxlang.runtime.types.Struct
ortus.boxlang.runtime.scopes.BaseScope
All Implemented Interfaces:
Serializable, Map<Key,Object>, IReferenceable, IScope, IStruct, IType, IListenable
Direct Known Subclasses:
ApplicationScope, ArgumentsScope, LocalScope, RequestScope, ScopeWrapper, ServerScope, SessionScope, StaticScope, ThisScope, ThreadScope, VariablesScope

public class BaseScope extends Struct implements IScope
Base scope implementation. Extends HashMap for now. May want to switch to composition over inheritance, but this is simpler for now and using the Key class provides our case insensitivity automatically.
See Also:
  • Constructor Details

    • BaseScope

      public BaseScope(Key scopeName)
      Constructor
      Parameters:
      scopeName - The name of the scope
    • BaseScope

      public BaseScope(Key scopeName, IStruct.TYPES type)
      Constructor
      Parameters:
      scopeName - The name of the scope
      type - The Struct type of the scope
  • Method Details

    • getName

      public Key getName()
      Gets the name of the scope
      Specified by:
      getName in interface IScope
      Returns:
      The name of the scope
    • getLockName

      public String getLockName()
      Gets the name of the lock for use in the lock component. Must be unique per scope instance.
      Specified by:
      getLockName in interface IScope
      Returns:
      The unique lock name for the scope