public NamingEnumeration list ( String name ) throws NamingException { if ( "" . equals ( name ) ) { // listing this context return new FlatNames ( bindings . keys ( ) ) ; } // Perhaps `name' names a context Object target = lookup ( name ) ; if ( target instanceof Context ) { return ( ( Context ) target ) . list ( "" ) ; } throw new NotContextException ( name + " cannot be listed" ) ; }
Enumerates the names bound in the named context along with the class names of objects bound to them . The contents of any subcontexts are not included . If a binding is added to or removed from this context its effect on an enumeration previously returned is undefined .