Class ClassType

  • All Implemented Interfaces:
    Type

    class ClassType
    extends java.lang.Object
    implements Type
    The ClassType object is used to represent a type that is neither a field or method. Such a type is used when an object is to be used to populate a collection. In such a scenario there is no method or field annotations associated with the object.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Class type
      This is the type that is represented by this instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassType​(java.lang.Class type)
      Constructor for the ClassType object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends java.lang.annotation.Annotation>
      T
      getAnnotation​(java.lang.Class<T> type)
      This is used to acquire an annotation of the specified type.
      java.lang.Class getType()
      This is the class associated with this type.
      java.lang.String toString()
      This is used to describe the type as it exists within the owning class.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • type

        private final java.lang.Class type
        This is the type that is represented by this instance.
    • Constructor Detail

      • ClassType

        public ClassType​(java.lang.Class type)
        Constructor for the ClassType object. This will create a type used to represent a stand alone object, such as an object being inserted in to a Java collection.
        Parameters:
        type - this is the class that this type represents
    • Method Detail

      • getType

        public java.lang.Class getType()
        This is the class associated with this type. This is used by the serialization framework to determine how the XML is to be converted in to an object and vice versa.
        Specified by:
        getType in interface Type
        Returns:
        this returns the class associated with this type
      • getAnnotation

        public <T extends java.lang.annotation.Annotation> T getAnnotation​(java.lang.Class<T> type)
        This is used to acquire an annotation of the specified type. If no such annotation exists for the type then this will return null. Currently for classes this will always be null.
        Specified by:
        getAnnotation in interface Type
        Parameters:
        type - this is the annotation type be be acquired
        Returns:
        currently this method will always return null
      • toString

        public java.lang.String toString()
        This is used to describe the type as it exists within the owning class. This is used to provide error messages that can be used to debug issues that occur when processing.
        Specified by:
        toString in interface Type
        Overrides:
        toString in class java.lang.Object
        Returns:
        this returns a string representation of the type