Package com.sun.xml.bind.api
Class TypeReference
- java.lang.Object
-
- com.sun.xml.bind.api.TypeReference
-
public final class TypeReference extends Object
A reference to a JAXB-bound type.Subject to change without notice.
- Since:
- 2.0 EA1
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description Annotation[]
annotations
The annotations associated with the reference of this type.QName
tagName
The associated XML element name that the JAX-RPC uses with this type reference.Type
type
The Java type that's being referenced.
-
Constructor Summary
Constructors Constructor Description TypeReference(QName tagName, Type type, Annotation... annotations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
<A extends Annotation>
Aget(Class<A> annotationType)
Finds the specified annotation from the array and returns it.int
hashCode()
TypeReference
toItemType()
Creates aTypeReference
for the item type, if thisTypeReference
represents a collection type.
-
-
-
Field Detail
-
tagName
public final QName tagName
The associated XML element name that the JAX-RPC uses with this type reference. Always non-null. Strings are interned.
-
type
public final Type type
The Java type that's being referenced. Always non-null.
-
annotations
public final Annotation[] annotations
The annotations associated with the reference of this type. Always non-null.
-
-
Constructor Detail
-
TypeReference
public TypeReference(QName tagName, Type type, Annotation... annotations)
-
-
Method Detail
-
get
public <A extends Annotation> A get(Class<A> annotationType)
Finds the specified annotation from the array and returns it. Null if not found.
-
toItemType
public TypeReference toItemType()
Creates aTypeReference
for the item type, if thisTypeReference
represents a collection type. Otherwise returns an identical type.
-
-