public T lookup(String name) throws NamingException {
        T binding = super.get(name);
        if (binding != null) {
            return binding;
        }

        // Binding does not exist.  Check if any the contexts are bindings.
        String contextName = name;
        while (!(contextName = getContextName(contextName)).isEmpty()) {
            if (containsKey(contextName)) {
                throw new NotContextException(namespace + "/" + contextName);
            }
        }

        return null;
    }
public T lookup ( String name ) throws NamingException { T binding = super . get ( name ) ; if ( binding != null ) { return binding ; } String contextName = name ; while ( ! ( contextName = getContextName ( contextName ) ) . isEmpty ( ) ) { if ( containsKey ( contextName ) ) { throw new NotContextException ( namespace + "/" + contextName ) ; } } return null ; }
Looks up a binding.

@param name the name passed to {@link #bind}
@return the binding, or null if unavailable
@throws NotContextException if a lookup attempts to use a binding as a
context name