Class ImmutableContext.NestedImmutableContext

java.lang.Object
org.apache.xbean.naming.context.AbstractContext
org.apache.xbean.naming.context.ImmutableContext.NestedImmutableContext
All Implemented Interfaces:
Serializable, Context, NestedContextFactory
Enclosing class:
ImmutableContext

public final class ImmutableContext.NestedImmutableContext extends AbstractContext
Nested context which shares the absolute index map in MapContext.
See Also:
  • Constructor Details

  • Method Details

    • getDeepBinding

      protected Object getDeepBinding(String name)
      Description copied from class: AbstractContext
      Gets the object bound to the name. The name may contain slashes.
      Overrides:
      getDeepBinding in class AbstractContext
      Parameters:
      name - the name
      Returns:
      the object bound to the name, or null if not found
    • getBindings

      protected Map<String,Object> getBindings()
      Description copied from class: AbstractContext
      Gets a map of the bindings for the current node (i.e., no names with slashes). This method must not return null.
      Specified by:
      getBindings in class AbstractContext
      Returns:
      a Map from binding name to binding value
    • addDeepBinding

      protected final void addDeepBinding(String name, Object value, boolean createIntermediateContexts) throws NamingException
      Throws:
      NamingException
    • addBinding

      protected final boolean addBinding(String name, Object value, boolean rebind) throws NamingException
      Specified by:
      addBinding in class AbstractContext
      Throws:
      NamingException
    • removeDeepBinding

      protected final void removeDeepBinding(Name name, boolean pruneEmptyContexts) throws NamingException
      Overrides:
      removeDeepBinding in class AbstractContext
      Throws:
      NamingException
    • removeBinding

      protected final boolean removeBinding(String name, boolean removeNotEmptyContext) throws NamingException
      Description copied from class: AbstractContext
      Removes the binding from the context. The name will not contain a path and the value will not be a nested context although it may be a foreign context.
      Specified by:
      removeBinding in class AbstractContext
      Parameters:
      name - name under which the value should be bound
      removeNotEmptyContext - ??? TODO figure this out
      Returns:
      whether removal was successful
      Throws:
      NamingException - if a problem occurs during the bind such as a value already being bound
    • isNestedSubcontext

      public boolean isNestedSubcontext(Object value)
      Description copied from interface: NestedContextFactory
      Is the specified value an instance of a nested context
      Parameters:
      value - the value to inspect
      Returns:
      true if the specified value an instance of a nested context; false otherwise
    • createNestedSubcontext

      public Context createNestedSubcontext(String path, Map<String,Object> bindings)
      Description copied from interface: NestedContextFactory
      Creates a nested subcontext instance. This does not cause the nested context to be bound.
      Parameters:
      path - the path to the new nested context
      bindings - the initial bindings for the context
      Returns:
      the new nested context
    • getImmutableContext

      protected ImmutableContext getImmutableContext()