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:
java.lang.Comparable<ThrowableType>,javax.lang.model.AnnotatedConstruct,javax.lang.model.element.Element,ClassType,DelegatingElement,ThrowableType
- Enclosing class:
- ThrowableTypeFactory
private static class ThrowableTypeFactory.AptReturnThrowableType extends ThrowableTypeFactory.AptThrowableType
-
-
Field Summary
Fields Modifier and Type Field Description private booleancauseSetprivate java.util.Set<Parameter>constructionParametersprivate MessageMethodmessageMethodprivate booleanuseConstructionParameters-
Fields 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
Constructors Modifier Constructor Description privateAptReturnThrowableType(javax.annotation.processing.ProcessingEnvironment processingEnv, MessageMethod messageMethod, javax.lang.model.type.TypeMirror type)Creates a new descriptor that is not primitive.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancauseSetInConstructor()Indicates whether or not the cause was set in the constructor.java.util.Set<Parameter>constructionParameters()The parameters needed to construct the throwable, if not using the default constructor.protected voidinit()Initializes the object.protected voidinit(java.util.List<? extends javax.lang.model.element.VariableElement> params)Allows for additional processing of parameters.booleanuseConstructionParameters()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 Detail
-
messageMethod
private final MessageMethod messageMethod
-
constructionParameters
private final java.util.Set<Parameter> constructionParameters
-
useConstructionParameters
private boolean useConstructionParameters
-
causeSet
private boolean causeSet
-
-
Constructor Detail
-
AptReturnThrowableType
private AptReturnThrowableType(javax.annotation.processing.ProcessingEnvironment processingEnv, MessageMethod messageMethod, javax.lang.model.type.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 Detail
-
init
protected void init()
Description copied from class:ThrowableTypeFactory.AptThrowableTypeInitializes the object.- Overrides:
initin classThrowableTypeFactory.AptThrowableType
-
init
protected void init(java.util.List<? extends javax.lang.model.element.VariableElement> params)
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
public java.util.Set<Parameter> 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.
-
-