private static class ThrowableTypeFactory.AptThrowableType extends AbstractMessageObjectType implements ThrowableType
| Modifier and Type | Field and Description |
|---|---|
private boolean |
defaultConstructor |
private boolean |
isChecked |
private boolean |
stringAndThrowableConstructor |
private boolean |
stringConstructor |
protected javax.lang.model.type.TypeMirror |
stringType |
private boolean |
throwableAndStringConstructor |
private boolean |
throwableConstructor |
protected javax.lang.model.type.TypeMirror |
throwableType |
private javax.lang.model.type.TypeMirror |
type |
elements, typeMirror, types| Modifier | Constructor and Description |
|---|---|
private |
AptThrowableType(javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types,
javax.lang.model.type.TypeMirror type)
Creates a new descriptor that is not primitive.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(ThrowableType o) |
java.util.Set<Parameter> |
constructionParameters()
The parameters needed to construct the throwable, if not using the default constructor.
|
boolean |
equals(java.lang.Object obj) |
boolean |
hasDefaultConstructor()
Checks to see the throwable has a default constructor.
|
int |
hashCode() |
boolean |
hasStringAndThrowableConstructor()
Checks to see if the throwable has a string and throwable (
Throwable(String, Throwable)) constructor. |
boolean |
hasStringConstructor()
Checks to see if the throwable has a string (
Throwable(String)) constructor. |
boolean |
hasThrowableAndStringConstructor()
Checks to see if the throwable has a throwable and string (
Throwable(Throwable, String)) constructor. |
boolean |
hasThrowableConstructor()
Checks to see if the throwable has a string and throwable (
Throwable(String, Throwable)) constructor. |
protected void |
init()
Initializes the object.
|
protected void |
init(java.util.List<? extends javax.lang.model.element.VariableElement> params)
Allows for additional processing of parameters.
|
boolean |
isChecked()
Checks if the throwable is a checked exception.
|
java.lang.String |
name()
Returns the qualified class name of the return type.
|
javax.lang.model.type.TypeMirror |
reference()
The object used to extract information for the message logger or message bundle, if applicable.
|
java.lang.String |
toString() |
boolean |
useConstructionParameters()
Checks to see if the throwable has and can use a custom constructor.
|
isAssignableFrom, isSameAs, isSubtypeOf, typeclone, finalize, getClass, notify, notifyAll, wait, wait, waitisAssignableFrom, isSameAs, isSubtypeOf, typeprivate final javax.lang.model.type.TypeMirror type
private final boolean isChecked
private boolean defaultConstructor
private boolean stringConstructor
private boolean throwableConstructor
private boolean stringAndThrowableConstructor
private boolean throwableAndStringConstructor
protected final javax.lang.model.type.TypeMirror stringType
protected final javax.lang.model.type.TypeMirror throwableType
private AptThrowableType(javax.lang.model.util.Elements elements,
javax.lang.model.util.Types types,
javax.lang.model.type.TypeMirror type)
types - the type utilities from the annotation processor.elements - the element utilities from the annotation processor.type - the class name of the return type.protected final void init()
protected void init(java.util.List<? extends javax.lang.model.element.VariableElement> params)
params - the parameters to be processed.public boolean hasDefaultConstructor()
ThrowableTypehasDefaultConstructor in interface ThrowableTypetrue if the throwable has a default constructor, otherwise false.public boolean hasStringAndThrowableConstructor()
ThrowableTypeThrowable(String, Throwable)) constructor.hasStringAndThrowableConstructor in interface ThrowableTypetrue if the throwable has both a string and throwable constructor, otherwise false.public boolean hasStringConstructor()
ThrowableTypeThrowable(String)) constructor.
If true, Throwable.initCause(Throwable) can be used to set the throwable.hasStringConstructor in interface ThrowableTypetrue if the throwable has a string constructor, otherwise false.public boolean hasThrowableAndStringConstructor()
ThrowableTypeThrowable(Throwable, String)) constructor.hasThrowableAndStringConstructor in interface ThrowableTypetrue if the throwable has both a throwable and string constructor, otherwise false.public boolean hasThrowableConstructor()
ThrowableTypeThrowable(String, Throwable)) constructor.hasThrowableConstructor in interface ThrowableTypetrue if the throwable has a throwable constructor, otherwise false.public boolean useConstructionParameters()
ThrowableTypetrue, the constructor parameters can be retrieved from the ThrowableType.constructionParameters() method.useConstructionParameters in interface ThrowableTypetrue if the throwable has a custom constructor that can be used, otherwise false.public java.util.Set<Parameter> constructionParameters()
ThrowableTypeconstructionParameters in interface ThrowableTypepublic boolean isChecked()
ThrowableTypetrue is
returned, otherwise false.isChecked in interface ThrowableTypetrue if the throwable is a checked exception, otherwise false.public java.lang.String name()
ThrowableTypename in interface MessageObjectname in interface ThrowableTypepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic javax.lang.model.type.TypeMirror reference()
MessageObjectExecutableElement
might be returned.reference in interface MessageObjectpublic int compareTo(ThrowableType o)
compareTo in interface java.lang.Comparable<ThrowableType>