Package org.jboss.logging.processor.apt
Class ThrowableTypeFactory.AptReturnThrowableType
java.lang.Object
org.jboss.logging.processor.apt.AbstractClassType
org.jboss.logging.processor.apt.ThrowableTypeFactory.AptThrowableType
org.jboss.logging.processor.apt.ThrowableTypeFactory.AptReturnThrowableType
- All Implemented Interfaces:
Comparable<ThrowableType>
,AnnotatedConstruct
,Element
,ClassType
,DelegatingElement
,ThrowableType
- Enclosing class:
- ThrowableTypeFactory
private static class ThrowableTypeFactory.AptReturnThrowableType
extends ThrowableTypeFactory.AptThrowableType
-
Field Summary
FieldsFields inherited from class org.jboss.logging.processor.apt.ThrowableTypeFactory.AptThrowableType
stringType, throwableType
Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AptReturnThrowableType
(ProcessingEnvironment processingEnv, MessageMethod messageMethod, TypeMirror type) Creates a new descriptor that is not primitive. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether or not the cause was set in the constructor.The parameters needed to construct the throwable, if not using the default constructor.protected void
init()
Initializes the object.protected void
init
(List<? extends VariableElement> params) Allows for additional processing of parameters.boolean
Checks to see if the throwable has and can use a custom constructor.Methods inherited from class org.jboss.logging.processor.apt.ThrowableTypeFactory.AptThrowableType
asType, compareTo, equals, getDelegate, hasDefaultConstructor, hashCode, hasStringAndThrowableConstructor, hasStringConstructor, hasThrowableAndStringConstructor, hasThrowableConstructor, isChecked, name, 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
-
messageMethod
-
constructionParameters
-
useConstructionParameters
private boolean useConstructionParameters -
causeSet
private boolean causeSet
-
-
Constructor Details
-
AptReturnThrowableType
private AptReturnThrowableType(ProcessingEnvironment processingEnv, MessageMethod messageMethod, TypeMirror type) Creates a new descriptor that is not primitive.- Parameters:
processingEnv
- the annotation processing environment.messageMethod
- the message method.type
- the class name of the return type.
-
-
Method Details
-
init
protected void init()Description copied from class:ThrowableTypeFactory.AptThrowableType
Initializes the object.- Overrides:
init
in classThrowableTypeFactory.AptThrowableType
-
init
Description copied from class:ThrowableTypeFactory.AptThrowableType
Allows for additional processing of parameters.- Overrides:
init
in classThrowableTypeFactory.AptThrowableType
- Parameters:
params
- the parameters to be processed.
-
useConstructionParameters
public boolean useConstructionParameters()Description copied from interface:ThrowableType
Checks to see if the throwable has and can use a custom constructor. Iftrue
, the constructor parameters can be retrieved from theThrowableType.constructionParameters()
method.- Specified by:
useConstructionParameters
in interfaceThrowableType
- Overrides:
useConstructionParameters
in classThrowableTypeFactory.AptThrowableType
- Returns:
true
if the throwable has a custom constructor that can be used, otherwisefalse
.
-
causeSetInConstructor
public boolean causeSetInConstructor()Description copied from interface:ThrowableType
Indicates whether or not the cause was set in the constructor.- Returns:
true
if the cause was set in the constructor,false
if theThrowable.initCause(Throwable)
should be executed
-
constructionParameters
Description copied from interface:ThrowableType
The parameters needed to construct the throwable, if not using the default constructor. If the default constructor should be used an empty set should be returned. The order the set is returned is the order in which the parameters must be in for the constructor.- Specified by:
constructionParameters
in interfaceThrowableType
- Overrides:
constructionParameters
in classThrowableTypeFactory.AptThrowableType
- Returns:
- a set of construction parameters or an empty set.
-