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 Elementprivate final booleanprivate final MessageMethodprivate final TypeMirrorprivate final TypeMirrorprivate ThrowableTypeFields inherited from class AbstractClassType
elements, processingEnv, typeMirror, types -
Constructor Summary
ConstructorsConstructorDescriptionAptReturnType(ProcessingEnvironment processingEnv, TypeMirror returnType, MessageMethod method) -
Method Summary
Modifier and TypeMethodDescriptionasType()booleanThe element to delegate the default methods to.inthashCode()private voidinit()booleanChecks to see if the return type is an exception, extends Throwable or the value of aSupplieris 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 AbstractClassType
isAssignableFrom, isSameAs, isSubtypeOfMethods inherited from interface ClassType
isAssignableFrom, isSameAs, isSubtypeOfMethods inherited from interface 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:DelegatingElementThe element to delegate the default methods to.- Specified by:
getDelegatein interfaceDelegatingElement- Returns:
- the delegate
-
asType
- Specified by:
asTypein interfaceDelegatingElement- Specified by:
asTypein interfaceElement
-
isThrowable
public boolean isThrowable()Description copied from interface:ReturnTypeChecks to see if the return type is an exception, extends Throwable or the value of aSupplieris a Throwable type.- Specified by:
isThrowablein interfaceReturnType- Returns:
trueif the return type is an exception, otherwisefalse.- See Also:
-
name
Description copied from interface:ReturnTypeReturns the qualified class name of the return type.- Specified by:
namein interfaceReturnType- Returns:
- the qualified class name fo the return type.
-
throwableReturnType
Description copied from interface:ReturnTypeReturns the exception return type ifReturnType.isThrowable()returnstrue. Otherwisenullis returned.- Specified by:
throwableReturnTypein interfaceReturnType- Returns:
- an exception return type, otherwise
null.
-
resolvedType
Description copied from interface:ReturnTypeChecks 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
Supplierreturn type.- Specified by:
resolvedTypein interfaceReturnType- Returns:
- the resolved return type
-
init
private void init() -
hashCode
-
equals
-
toString
-