|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.xjc.reader.Ring
public final class Ring
Holds all the binding related singleton components in a "ring", and let you access those components, creating them as necessary.
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.
Method Summary | ||
---|---|---|
static
|
add(java.lang.Class<T> clazz,
T instance)
|
|
static
|
add(T o)
|
|
static Ring |
begin()
Starts a new scope. |
|
static void |
end(Ring old)
Ends a scope. |
|
static Ring |
get()
A Ring instance is associated with a thread. |
|
static
|
get(java.lang.Class<T> key)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> void add(java.lang.Class<T> clazz, T instance)
public static <T> void add(T o)
public static <T> T get(java.lang.Class<T> key)
public static Ring get()
Ring
instance is associated with a thread.
public static Ring begin()
public static void end(Ring old)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |