Class StandardScope<K extends CharSequence,V extends ISymbol>

java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<K,V>
gw.lang.parser.StandardScope<K,V>
All Implemented Interfaces:
IScope<K,V>, Serializable, Cloneable, Map<K,V>
Direct Known Subclasses:
CommonSymbolsScope

public class StandardScope<K extends CharSequence,V extends ISymbol> extends HashMap<K,V> implements IScope<K,V>
See Also:
  • Field Details

    • _activationContext

      private IActivationContext _activationContext
    • _csr

      private int _csr
  • Constructor Details

    • StandardScope

      public StandardScope()
    • StandardScope

      public StandardScope(IActivationContext context)
    • StandardScope

      public StandardScope(int iSize)
    • StandardScope

      public StandardScope(IActivationContext context, int iSize)
    • StandardScope

      protected StandardScope(StandardScope copy)
  • Method Details

    • copy

      public StandardScope<K,V> copy()
      Description copied from interface: IScope
      Shallow copy this scope
      Specified by:
      copy in interface IScope<K extends CharSequence,V extends ISymbol>
    • getActivationCtx

      public IActivationContext getActivationCtx()
      Description copied from interface: IScope
      Get the activation record context. This can be any object representing the activation record e.g., a function symbol, a rule set context, whatever delimits a call boundary.
      Specified by:
      getActivationCtx in interface IScope<K extends CharSequence,V extends ISymbol>
      Returns:
      The activation context.
    • countSymbols

      public int countSymbols()
      Description copied from interface: IScope
      visit all symbols in this Scope,
      Specified by:
      countSymbols in interface IScope<K extends CharSequence,V extends ISymbol>
      Returns:
      true if the visitor want to continue visitiong other symbol/scope, false otherwise.
    • getCSR

      public int getCSR()
      Specified by:
      getCSR in interface IScope<K extends CharSequence,V extends ISymbol>
      Returns:
      the compile-time csr for this scope if it exists
    • setCSR

      public void setCSR(int csr)
      Specified by:
      setCSR in interface IScope<K extends CharSequence,V extends ISymbol>