Package org.jboss.logging.processor.apt
Class ReturnTypeFactory.AptReturnType
java.lang.Object
org.jboss.logging.processor.apt.AbstractClassType
org.jboss.logging.processor.apt.ReturnTypeFactory.AptReturnType
- All Implemented Interfaces:
AnnotatedConstruct
,Element
,ClassType
,DelegatingElement
,ReturnType
- Enclosing class:
ReturnTypeFactory
private static class ReturnTypeFactory.AptReturnType
extends AbstractClassType
implements ReturnType
Implementation of return type.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Element
private final boolean
private final MessageMethod
private final TypeMirror
private final TypeMirror
private ThrowableType
Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
Constructor Summary
ConstructorsConstructorDescriptionAptReturnType
(ProcessingEnvironment processingEnv, TypeMirror returnType, MessageMethod method) -
Method Summary
Modifier and TypeMethodDescriptionasType()
boolean
The element to delegate the default methods to.int
hashCode()
private void
init()
boolean
Checks to see if the return type is an exception, extends Throwable or the value of aSupplier
is a Throwable type.name()
Returns the qualified class name of the return type.Checks this type to see if there are any type arguments.Returns the exception return type ifReturnType.isThrowable()
returnstrue
.toString()
Methods inherited from class org.jboss.logging.processor.apt.AbstractClassType
isAssignableFrom, isSameAs, isSubtypeOf
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jboss.logging.processor.model.ClassType
isAssignableFrom, isSameAs, isSubtypeOf
Methods inherited from interface org.jboss.logging.processor.model.DelegatingElement
accept, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWith
-
Field Details
-
returnType
-
method
-
delegate
-
resolvedType
-
isThrowable
private final boolean isThrowable -
throwableType
-
-
Constructor Details
-
AptReturnType
AptReturnType(ProcessingEnvironment processingEnv, TypeMirror returnType, MessageMethod method)
-
-
Method Details
-
getDelegate
Description copied from interface:DelegatingElement
The element to delegate the default methods to.- Specified by:
getDelegate
in interfaceDelegatingElement
- Returns:
- the delegate
-
asType
- Specified by:
asType
in interfaceDelegatingElement
- Specified by:
asType
in interfaceElement
-
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:
-
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
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
.
-
resolvedType
Description copied from interface:ReturnType
Checks this type to see if there are any type arguments. If any type arguments are found the first type is returned and assumed to be the resolved type. Otherwise this type is returned.This is useful for the
Supplier
return type.- Specified by:
resolvedType
in interfaceReturnType
- Returns:
- the resolved return type
-
init
private void init() -
hashCode
public int hashCode() -
equals
-
toString
-