TestableContext Class — spring-boot Architecture
Architecture documentation for the TestableContext class in TestableInitialContextFactory.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot-autoconfigure/src/testFixtures/java/org/springframework/boot/autoconfigure/jndi/TestableInitialContextFactory.java lines 67–95
private static final class TestableContext extends InitialContext {
private final Map<String, Object> bindings = new HashMap<>();
private TestableContext() throws NamingException {
super(true);
}
@Override
public void bind(String name, Object obj) throws NamingException {
this.bindings.put(name, obj);
}
@Override
public Object lookup(String name) {
return this.bindings.get(name);
}
@Override
public Hashtable<?, ?> getEnvironment() throws NamingException {
return new Hashtable<>(); // Used to detect if JNDI is
// available
}
void clearAll() {
this.bindings.clear();
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free