com.sun.tools.xjc.reader

Class 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 Ring is local to a thread, and only one instanceof Ring can be active at any given time. Use begin and end 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.

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.

Method Summary
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 <T> Tget(Class<T> key)
static Ringget()
A Ring instance is associated with a thread.

Method Detail

add

public static <T> void add(Class<T> clazz, T instance)

add

public static <T> void add(T o)

begin

public static Ring begin()
Starts a new scope.

end

public static void end(Ring old)
Ends a scope.

get

public static <T> T get(Class<T> key)

get

public static Ring get()
A Ring instance is associated with a thread.