Class AbstractClassType

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected javax.lang.model.util.Elements elements  
      protected javax.annotation.processing.ProcessingEnvironment processingEnv  
      protected javax.lang.model.type.TypeMirror typeMirror  
      protected javax.lang.model.util.Types types  
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractClassType​(javax.annotation.processing.ProcessingEnvironment processingEnv, javax.lang.model.element.Element element)  
      AbstractClassType​(javax.annotation.processing.ProcessingEnvironment processingEnv, javax.lang.model.type.TypeMirror typeMirror)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAssignableFrom​(java.lang.Class<?> type)
      Determines if this type is either the same as, or is a supertype of, the class represented by the type parameter.
      boolean isSameAs​(java.lang.Class<?> type)
      Determines if this type is the same type as the class represented by the type parameter.
      boolean isSubtypeOf​(java.lang.Class<?> type)
      Determines if this type is a subtype of the class represented by the type parameter.
      private javax.lang.model.type.TypeMirror toType​(java.lang.Class<?> type)
      Creates a TypeMirror from a class type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.lang.model.AnnotatedConstruct

        getAnnotation, getAnnotationMirrors, getAnnotationsByType
    • Field Detail

      • processingEnv

        protected final javax.annotation.processing.ProcessingEnvironment processingEnv
      • elements

        protected final javax.lang.model.util.Elements elements
      • types

        protected final javax.lang.model.util.Types types
      • typeMirror

        protected final javax.lang.model.type.TypeMirror typeMirror
    • Constructor Detail

      • AbstractClassType

        AbstractClassType​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                          javax.lang.model.type.TypeMirror typeMirror)
      • AbstractClassType

        AbstractClassType​(javax.annotation.processing.ProcessingEnvironment processingEnv,
                          javax.lang.model.element.Element element)
    • Method Detail

      • isAssignableFrom

        public final boolean isAssignableFrom​(java.lang.Class<?> type)
        Description copied from interface: ClassType
        Determines if this type is either the same as, or is a supertype of, the class represented by the type parameter. If this type is assignable from the class true is returned, otherwise false.
        Specified by:
        isAssignableFrom in interface ClassType
        Parameters:
        type - the class type to check.
        Returns:
        true if this type is the same as or a superclass of the class, otherwise false.
      • isSubtypeOf

        public final boolean isSubtypeOf​(java.lang.Class<?> type)
        Description copied from interface: ClassType
        Determines if this type is a subtype of the class represented by the type parameter. If this type is a subtype of the class true is returned, otherwise false.
        Specified by:
        isSubtypeOf in interface ClassType
        Parameters:
        type - the class type to check.
        Returns:
        true if this type is a subtype of the class, otherwise false.
      • isSameAs

        public final boolean isSameAs​(java.lang.Class<?> type)
        Description copied from interface: ClassType
        Determines if this type is the same type as the class represented by the type parameter. If this type is the same type as the class true is returned, otherwise false.
        Specified by:
        isSameAs in interface ClassType
        Parameters:
        type - the class type to check.
        Returns:
        true if this type is the same type as the class, otherwise false.
      • toType

        private javax.lang.model.type.TypeMirror toType​(java.lang.Class<?> type)
        Creates a TypeMirror from a class type.
        Parameters:
        type - the type to create the TypeMirror for
        Returns:
        the TypeMirror to represent the type