Package org.jboss.logging.processor.apt
Class AbstractClassType
- java.lang.Object
-
- org.jboss.logging.processor.apt.AbstractClassType
-
- All Implemented Interfaces:
javax.lang.model.AnnotatedConstruct,ClassType
- Direct Known Subclasses:
MessageInterfaceFactory.AptMessageInterface,MessageInterfaceFactory.LoggerInterface,ParameterFactory.AptParameter,ReturnTypeFactory.AptReturnType,ThrowableTypeFactory.AptThrowableType
abstract class AbstractClassType extends java.lang.Object implements ClassType
-
-
Field Summary
Fields Modifier and Type Field Description protected javax.lang.model.util.Elementselementsprotected javax.annotation.processing.ProcessingEnvironmentprocessingEnvprotected javax.lang.model.type.TypeMirrortypeMirrorprotected javax.lang.model.util.Typestypes
-
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 booleanisAssignableFrom(java.lang.Class<?> type)Determines if this type is either the same as, or is a supertype of, the class represented by thetypeparameter.booleanisSameAs(java.lang.Class<?> type)Determines if this type is the same type as the class represented by thetypeparameter.booleanisSubtypeOf(java.lang.Class<?> type)Determines if this type is a subtype of the class represented by thetypeparameter.private javax.lang.model.type.TypeMirrortoType(java.lang.Class<?> type)Creates aTypeMirrorfrom a class type.
-
-
-
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:ClassTypeDetermines if this type is either the same as, or is a supertype of, the class represented by thetypeparameter. If this type is assignable from the classtrueis returned, otherwisefalse.- Specified by:
isAssignableFromin interfaceClassType- Parameters:
type- the class type to check.- Returns:
trueif this type is the same as or a superclass of the class, otherwisefalse.
-
isSubtypeOf
public final boolean isSubtypeOf(java.lang.Class<?> type)
Description copied from interface:ClassTypeDetermines if this type is a subtype of the class represented by thetypeparameter. If this type is a subtype of the classtrueis returned, otherwisefalse.- Specified by:
isSubtypeOfin interfaceClassType- Parameters:
type- the class type to check.- Returns:
trueif this type is a subtype of the class, otherwisefalse.
-
isSameAs
public final boolean isSameAs(java.lang.Class<?> type)
Description copied from interface:ClassTypeDetermines if this type is the same type as the class represented by thetypeparameter. If this type is the same type as the classtrueis returned, otherwisefalse.
-
toType
private javax.lang.model.type.TypeMirror toType(java.lang.Class<?> type)
Creates aTypeMirrorfrom a class type.- Parameters:
type- the type to create theTypeMirrorfor- Returns:
- the
TypeMirrorto represent the type
-
-