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, throwableTypeFields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAptReturnThrowableType(ProcessingEnvironment processingEnv, MessageMethod messageMethod, TypeMirror type) Creates a new descriptor that is not primitive. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether or not the cause was set in the constructor.The parameters needed to construct the throwable, if not using the default constructor.protected voidinit()Initializes the object.protected voidinit(List<? extends VariableElement> params) Allows for additional processing of parameters.booleanChecks 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, toStringMethods inherited from class org.jboss.logging.processor.apt.AbstractClassType
isAssignableFrom, isSameAs, isSubtypeOfMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jboss.logging.processor.model.ClassType
isAssignableFrom, isSameAs, isSubtypeOfMethods 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.AptThrowableTypeInitializes the object.- Overrides:
initin classThrowableTypeFactory.AptThrowableType
-
init
Description copied from class:ThrowableTypeFactory.AptThrowableTypeAllows for additional processing of parameters.- Overrides:
initin classThrowableTypeFactory.AptThrowableType- Parameters:
params- the parameters to be processed.
-
useConstructionParameters
public boolean useConstructionParameters()Description copied from interface:ThrowableTypeChecks 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:
useConstructionParametersin interfaceThrowableType- Overrides:
useConstructionParametersin classThrowableTypeFactory.AptThrowableType- Returns:
trueif the throwable has a custom constructor that can be used, otherwisefalse.
-
causeSetInConstructor
public boolean causeSetInConstructor()Description copied from interface:ThrowableTypeIndicates whether or not the cause was set in the constructor.- Returns:
trueif the cause was set in the constructor,falseif theThrowable.initCause(Throwable)should be executed
-
constructionParameters
Description copied from interface:ThrowableTypeThe 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:
constructionParametersin interfaceThrowableType- Overrides:
constructionParametersin classThrowableTypeFactory.AptThrowableType- Returns:
- a set of construction parameters or an empty set.
-