Class TypeProxy<T extends Type>
- java.lang.Object
-
- org.glassfish.hk2.classmodel.reflect.impl.TypeProxy<T>
-
public class TypeProxy<T extends Type> extends java.lang.Object
Proxy for types, used in place until the type can be properly instantiated. Proxy type also holds all incoming reference to the type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
TypeProxy.Notifier<T>
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Member>
fieldRefs
private java.util.List<ClassModel>
implementations
private java.lang.String
name
private TypeProxy.Notifier<T>
notifier
private java.util.List<Type>
subTypeRefs
private T
value
private boolean
visited
-
Constructor Summary
Constructors Constructor Description TypeProxy(TypeProxy.Notifier<T> notifier, java.lang.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <U extends Type>
java.util.Collection<U>adapter(java.util.Collection<TypeProxy<U>> source)
void
addFieldRef(FieldModel field)
void
addImplementation(ClassModel classModel)
void
addSubTypeRef(Type subType)
T
get()
java.util.List<ClassModel>
getImplementations()
java.lang.String
getName()
java.util.List<Member>
getRefs()
java.util.List<Type>
getSubTypeRefs()
boolean
isVisited()
void
set(T value)
java.lang.String
toString()
void
visited()
-
-
-
Field Detail
-
visited
private volatile boolean visited
-
name
private final java.lang.String name
-
notifier
private final TypeProxy.Notifier<T extends Type> notifier
-
fieldRefs
private final java.util.List<Member> fieldRefs
-
subTypeRefs
private final java.util.List<Type> subTypeRefs
-
implementations
private final java.util.List<ClassModel> implementations
-
-
Constructor Detail
-
TypeProxy
TypeProxy(TypeProxy.Notifier<T> notifier, java.lang.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
- notification handle to notify receiver the proxied type has been resolvedname
- type name
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
set
public void set(T value)
-
get
public T get()
-
getName
public java.lang.String getName()
-
addFieldRef
public void addFieldRef(FieldModel field)
-
getRefs
public java.util.List<Member> getRefs()
-
addSubTypeRef
public void addSubTypeRef(Type subType)
-
getSubTypeRefs
public java.util.List<Type> getSubTypeRefs()
-
addImplementation
public void addImplementation(ClassModel classModel)
-
getImplementations
public java.util.List<ClassModel> getImplementations()
-
adapter
public static <U extends Type> java.util.Collection<U> adapter(java.util.Collection<TypeProxy<U>> source)
-
visited
public void visited()
-
isVisited
public boolean isVisited()
-
-