MCPcopy Index your code
hub / github.com/apache/tomcat / NamingContext

Class NamingContext

java/org/apache/naming/NamingContext.java:48–676  ·  view source on GitHub ↗

Catalina JNDI Context implementation.

Source from the content-addressed store, hash-verified

46 * Catalina JNDI Context implementation.
47 */
48public class NamingContext implements Context {
49
50
51 // -------------------------------------------------------------- Constants
52
53
54 /**
55 * Name parser for this context.
56 */
57 protected static final NameParser nameParser = new NameParserImpl();
58
59
60 private static final Log log = LogFactory.getLog(NamingContext.class);
61
62
63 // ----------------------------------------------------------- Constructors
64
65
66 /**
67 * Builds a naming context.
68 *
69 * @param env The environment to use to construct the naming context
70 * @param name The name of the associated Catalina Context
71 */
72 public NamingContext(Hashtable<String,Object> env, String name) {
73 this(env, name, new HashMap<>());
74 }
75
76
77 /**
78 * Builds a naming context.
79 *
80 * @param env The environment to use to construct the naming context
81 * @param name The name of the associated Catalina Context
82 * @param bindings The initial bindings for the naming context
83 */
84 public NamingContext(Hashtable<String,Object> env, String name, HashMap<String,NamingEntry> bindings) {
85
86 this.env = new Hashtable<>();
87 this.name = name;
88 // Populating the environment hashtable
89 if (env != null) {
90 Enumeration<String> envEntries = env.keys();
91 while (envEntries.hasMoreElements()) {
92 String entryName = envEntries.nextElement();
93 addToEnvironment(entryName, env.get(entryName));
94 }
95 }
96 this.bindings = bindings;
97 }
98
99
100 // ----------------------------------------------------- Instance Variables
101
102
103 /**
104 * Environment.
105 */

Callers

nothing calls this directly

Calls 7

getLogMethod · 0.95
getManagerMethod · 0.95
forNameMethod · 0.80
equalsMethod · 0.65
invokeMethod · 0.65
getMethodMethod · 0.65
getPropertyMethod · 0.65

Tested by

no test coverage detected