Package org.jboss.logging.processor.apt
Class ReturnTypeFactory.VoidReturnType
- java.lang.Object
-
- org.jboss.logging.processor.apt.ReturnTypeFactory.VoidReturnType
-
- All Implemented Interfaces:
javax.lang.model.AnnotatedConstruct
,javax.lang.model.element.Element
,ClassType
,DelegatingElement
,ReturnType
- Enclosing class:
- ReturnTypeFactory
private static class ReturnTypeFactory.VoidReturnType extends java.lang.Object implements ReturnType
-
-
Field Summary
Fields Modifier and Type Field Description private int
hash
private static ReturnTypeFactory.VoidReturnType
INSTANCE
private javax.lang.model.element.Element
voidElement
private javax.lang.model.type.NoType
voidType
-
Constructor Summary
Constructors Modifier Constructor Description private
VoidReturnType(javax.lang.model.util.Types types)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.lang.model.type.TypeMirror
asType()
boolean
equals(java.lang.Object obj)
javax.lang.model.element.Element
getDelegate()
The element to delegate the default methods to.private static ReturnTypeFactory.VoidReturnType
getInstance(javax.lang.model.util.Types types)
int
hashCode()
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.boolean
isThrowable()
Checks to see if the return type is an exception, extends Throwable or the value of aSupplier
is a Throwable type.java.lang.String
name()
Returns the qualified class name of the return type.ThrowableType
throwableReturnType()
Returns the exception return type ifReturnType.isThrowable()
returnstrue
.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.jboss.logging.processor.model.DelegatingElement
accept, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWith
-
Methods inherited from interface org.jboss.logging.processor.model.ReturnType
resolvedType
-
-
-
-
Field Detail
-
INSTANCE
private static ReturnTypeFactory.VoidReturnType INSTANCE
-
voidElement
private final javax.lang.model.element.Element voidElement
-
voidType
private final javax.lang.model.type.NoType voidType
-
hash
private final int hash
-
-
Method Detail
-
getInstance
private static ReturnTypeFactory.VoidReturnType getInstance(javax.lang.model.util.Types types)
-
asType
public javax.lang.model.type.TypeMirror asType()
- Specified by:
asType
in interfaceDelegatingElement
- Specified by:
asType
in interfacejavax.lang.model.element.Element
-
isThrowable
public boolean isThrowable()
Description copied from interface:ReturnType
Checks to see if the return type is an exception, extends Throwable or the value of aSupplier
is a Throwable type.- Specified by:
isThrowable
in interfaceReturnType
- Returns:
true
if the return type is an exception, otherwisefalse
.- See Also:
ReturnType.resolvedType()
-
name
public java.lang.String name()
Description copied from interface:ReturnType
Returns the qualified class name of the return type.- Specified by:
name
in interfaceReturnType
- Returns:
- the qualified class name fo the return type.
-
throwableReturnType
public ThrowableType throwableReturnType()
Description copied from interface:ReturnType
Returns the exception return type ifReturnType.isThrowable()
returnstrue
. Otherwisenull
is returned.- Specified by:
throwableReturnType
in interfaceReturnType
- Returns:
- an exception return type, otherwise
null
.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacejavax.lang.model.element.Element
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacejavax.lang.model.element.Element
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
isAssignableFrom
public 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 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 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
.
-
getDelegate
public javax.lang.model.element.Element getDelegate()
Description copied from interface:DelegatingElement
The element to delegate the default methods to.- Specified by:
getDelegate
in interfaceDelegatingElement
- Returns:
- the delegate
-
-