Top Description Inners Fields Constructors Methods
org.glassfish.hk2.classmodel.reflect.impl

public Class TypeProxy<T extends Type>

extends Object
Class Inheritance
Imports
org.glassfish.hk2.classmodel.reflect.*, java.util.*, java.util.concurrent.locks.ReentrantLock

Proxy for types, used in place until the type can be properly instantiated. Proxy type also holds all incoming reference to the type.
Author
Jerome Dochez

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Field Summary

Modifier and TypeField and Description
private final List<Member>
private final List<ClassModel>
pack-priv final ReentrantLock
private final String
private final TypeProxy.Notifier<T>
private final List<Type>
private T
private volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv
TypeProxy(TypeProxy.Notifier<T>
notification handle to notify receiver the proxied type has been resolved
notifier
,
String
type name
name
)

Creates a new type proxy, this ctor is package private as many other activities must be performed when a new proxy type is created.

Method Summary

Modifier and TypeMethod and Description
public static <U extends Type> Collection<U>
adapter(final Collection<TypeProxy<U>> source)

public void
public void
public void
public T
get()

public List<ClassModel>
public String
public List<Member>
public List<Type>
public boolean
public void
set(T value)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

fieldRefsback to summary
private final List<Member> fieldRefs
implementationsback to summary
private final List<ClassModel> implementations
lockback to summary
pack-priv final ReentrantLock lock
nameback to summary
private final String name
notifierback to summary
private final TypeProxy.Notifier<T> notifier
subTypeRefsback to summary
private final List<Type> subTypeRefs
valueback to summary
private T value
visitedback to summary
private volatile boolean visited

Constructor Detail

TypeProxyback to summary
pack-priv TypeProxy(TypeProxy.Notifier<T> notifier, String name)

Creates a new type proxy, this ctor is package private as many other activities must be performed when a new proxy type is created.

Parameters
notifier:TypeProxy.Notifier<T>

notification handle to notify receiver the proxied type has been resolved

name:String

type name

Method Detail

adapterback to summary
public static <U extends Type> Collection<U> adapter(final Collection<TypeProxy<U>> source)
addFieldRefback to summary
public void addFieldRef(FieldModel field)
addImplementationback to summary
public void addImplementation(ClassModel classModel)
addSubTypeRefback to summary
public void addSubTypeRef(Type subType)
getback to summary
public T get()
getImplementationsback to summary
public List<ClassModel> getImplementations()
getNameback to summary
public String getName()
getRefsback to summary
public List<Member> getRefs()
getSubTypeRefsback to summary
public List<Type> getSubTypeRefs()
isVisitedback to summary
public boolean isVisited()
setback to summary
public void set(T value)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override
visitedback to summary
public void visited()
org.glassfish.hk2.classmodel.reflect.impl back to summary

public Interface TypeProxy.Notifier<T>


Method Summary

Modifier and TypeMethod and Description
public void
valueSet(T value)

Method Detail

valueSetback to summary
public void valueSet(T value)