Class AbstractScope

java.lang.Object
io.github.cowwoc.pouch10.core.AbstractScope
All Implemented Interfaces:
Scope, AutoCloseable

public abstract class AbstractScope extends Object implements Scope
The default implementation of Scope.
  • Field Details

  • Constructor Details

    • AbstractScope

      protected AbstractScope()
      Creates new scope.
  • Method Details

    • addChild

      public void addChild(Scope child)
      Description copied from interface: Scope
      Adds a child scope.
      Specified by:
      addChild in interface Scope
      Parameters:
      child - the child scope
    • removeChild

      public void removeChild(Scope child)
      Description copied from interface: Scope
      Removes a child scope.
      Specified by:
      removeChild in interface Scope
      Parameters:
      child - the child scope
    • ensureOpen

      protected void ensureOpen()
      Ensures that the scope is open.
      Throws:
      IllegalStateException - if the scope is closed