Package org.jboss.logging.processor.model

## Interface ThrowableType

All Superinterfaces:
  `AnnotatedConstruct`, `ClassType`, `Comparable<ThrowableType>`, `DelegatingElement`, `Element`

    public interface ThrowableType
    extends ClassType, Comparable<ThrowableType>, DelegatingElement

Date: 27.09.2011

Author:
  James R. Perkins

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default boolean` `causeSetInConstructor​()` Indicates whether or not the cause was set in the constructor.
`Set<Parameter>` `constructionParameters​()` The parameters needed to construct the throwable, if not using the default constructor.
`boolean` `hasDefaultConstructor​()` Checks to see the throwable has a default constructor.
`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.
`boolean` `isChecked​()` Checks if the throwable is a checked exception.
`String` `name​()` Returns the qualified class name of the return type.
`boolean` `useConstructionParameters​()` Checks to see if the throwable has and can use a custom constructor.

### Methods inherited from interface org.jboss.logging.processor.model.ClassType

`isAssignableFrom, isSameAs, isSubtypeOf`

### Methods inherited from interface java.lang.Comparable

`compareTo`

### Methods inherited from interface org.jboss.logging.processor.model.DelegatingElement

`accept, asType, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getDelegate, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWith`

### Methods inherited from interface javax.lang.model.element.Element

`equals, hashCode`

### Method Detail

#### hasDefaultConstructor

    boolean hasDefaultConstructor​()

Checks to see the throwable has a default constructor.

Returns:
  `true` if the throwable has a default constructor, otherwise `false`.

#### hasStringAndThrowableConstructor

    boolean hasStringAndThrowableConstructor​()

Checks to see if the throwable has a string and throwable (`Throwable(String, Throwable)`) constructor.

Returns:
  `true` if the throwable has both a string and throwable constructor, otherwise `false`.

#### hasStringConstructor

    boolean hasStringConstructor​()

Checks to see if the throwable has a string (`Throwable(String)`) constructor.

If `true`, `Throwable.initCause(Throwable)` can be used to set the throwable.

Returns:
  `true` if the throwable has a string constructor, otherwise `false`.

#### hasThrowableAndStringConstructor

    boolean hasThrowableAndStringConstructor​()

Checks to see if the throwable has a throwable and string (`Throwable(Throwable, String)`) constructor.

Returns:
  `true` if the throwable has both a throwable and string constructor, otherwise `false`.

#### hasThrowableConstructor

    boolean hasThrowableConstructor​()

Checks to see if the throwable has a string and throwable (`Throwable(String, Throwable)`) constructor.

Returns:
  `true` if the throwable has a throwable constructor, otherwise `false`.

#### useConstructionParameters

    boolean useConstructionParameters​()

Checks to see if the throwable has and can use a custom constructor.

If `true`, the constructor parameters can be retrieved from the `constructionParameters()` method.

Returns:
  `true` if the throwable has a custom constructor that can be used, otherwise `false`.

#### causeSetInConstructor

    default boolean causeSetInConstructor​()

Indicates whether or not the cause was set in the constructor.

Returns:
  `true` if the cause was set in the constructor, `false` if the `Throwable.initCause(Throwable)` should be executed

#### constructionParameters

    Set<Parameter> constructionParameters​()

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.

Returns:
  a set of construction parameters or an empty set.

#### isChecked

    boolean isChecked​()

Checks if the throwable is a checked exception. If the throwable is a checked exception, `true` is returned, otherwise `false`.

Returns:
  `true` if the throwable is a checked exception, otherwise `false`.

#### name

    String name​()

Returns the qualified class name of the return type.

Returns:
  the qualified class name fo the return type.