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.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 thetype
parameter.boolean
isSameAs(java.lang.Class<?> type)
Determines if this type is the same type as the class represented by thetype
parameter.boolean
isSubtypeOf(java.lang.Class<?> type)
Determines if this type is a subtype of the class represented by thetype
parameter.private javax.lang.model.type.TypeMirror
toType(java.lang.Class<?> type)
Creates aTypeMirror
from 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:ClassType
Determines if this type is either the same as, or is a supertype of, the class represented by thetype
parameter. If this type is assignable from the classtrue
is returned, otherwisefalse
.- Specified by:
isAssignableFrom
in interfaceClassType
- Parameters:
type
- the class type to check.- Returns:
true
if 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:ClassType
Determines if this type is a subtype of the class represented by thetype
parameter. If this type is a subtype of the classtrue
is returned, otherwisefalse
.- Specified by:
isSubtypeOf
in interfaceClassType
- Parameters:
type
- the class type to check.- Returns:
true
if this type is a subtype of the class, otherwisefalse
.
-
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 thetype
parameter. If this type is the same type as the classtrue
is returned, otherwisefalse
.
-
toType
private javax.lang.model.type.TypeMirror toType(java.lang.Class<?> type)
Creates aTypeMirror
from a class type.- Parameters:
type
- the type to create theTypeMirror
for- Returns:
- the
TypeMirror
to represent the type
-
-