A Ring is local to a thread,
and only one instanceof Ring can be active at any given time.
Use begin() and end(Ring) to start/end a ring scope.
Inside a scope, use get() to obtain the instance.
When a Model is built by the reader, an active Ring scope
is assumed.
Depending on the schema language we are dealing with, different components are in the model. But at least the following components are in the ring.
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private static final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <T> void | |
| public static <T> void | |
| public static Ring | |
| public static void | |
| public static <T> T | |
| public static Ring |
| components | back to summary |
|---|---|
| private final Map<Class<?>, Object> components | |
| instances | back to summary |
|---|---|
| private static final ThreadLocal<Ring> instances | |
| Ring | back to summary |
|---|---|
| private Ring() | |
| add | back to summary |
|---|---|
| public static <T> void add(Class<T> clazz, T instance) | |
| add | back to summary |
|---|---|
public static <T> void add(T o)
| |
| begin | back to summary |
|---|---|
| public static Ring begin() Starts a new scope. | |
| end | back to summary |
|---|---|
| public static void end(Ring old) Ends a scope. | |
| get | back to summary |
|---|---|
| public static <T> T get(Class<T> key) | |
| get | back to summary |
|---|---|
| public static Ring get() An instance is associated with a thread. | |