Class TypeReference


  • public final class TypeReference
    extends java.lang.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
      java.lang.annotation.Annotation[] annotations
      The annotations associated with the reference of this type.
      javax.xml.namespace.QName tagName
      The associated XML element name that the JAX-RPC uses with this type reference.
      java.lang.reflect.Type type
      The Java type that's being referenced.
    • Constructor Summary

      Constructors 
      Constructor Description
      TypeReference​(javax.xml.namespace.QName tagName, java.lang.reflect.Type type, java.lang.annotation.Annotation... annotations)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      <A extends java.lang.annotation.Annotation>
      A
      get​(java.lang.Class<A> annotationType)
      Finds the specified annotation from the array and returns it.
      int hashCode()  
      TypeReference toItemType()
      Creates a TypeReference for the item type, if this TypeReference represents a collection type.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • tagName

        public final javax.xml.namespace.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 java.lang.reflect.Type type
        The Java type that's being referenced. Always non-null.
      • annotations

        public final java.lang.annotation.Annotation[] annotations
        The annotations associated with the reference of this type. Always non-null.
    • Constructor Detail

      • TypeReference

        public TypeReference​(javax.xml.namespace.QName tagName,
                             java.lang.reflect.Type type,
                             java.lang.annotation.Annotation... annotations)
    • Method Detail

      • get

        public <A extends java.lang.annotation.Annotation> A get​(java.lang.Class<A> annotationType)
        Finds the specified annotation from the array and returns it. Null if not found.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object