Package com.sun.tools.xjc.reader
Class Ring
- java.lang.Object
-
- com.sun.tools.xjc.reader.Ring
-
public final class Ring extends Object
Holds all the binding related singleton components in a "ring", and let you access those components, creating them as necessary.A
Ringis local to a thread, and only one instanceofRingcan be active at any given time. Usebegin()andend(Ring)to start/end a ring scope. Inside a scope, useget()to obtain the instance.When a
Modelis built by the reader, an activeRingscope is assumed.Components in Ring
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.
- Author:
- Kohsuke Kawaguchi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> voidadd(Class<T> clazz, T instance)static <T> voidadd(T o)static Ringbegin()Starts a new scope.static voidend(Ring old)Ends a scope.static Ringget()ARinginstance is associated with a thread.static <T> Tget(Class<T> key)
-