Package org.jboss.logging.processor.model

# Interface ReturnType

All Superinterfaces:
  `AnnotatedConstruct`, `ClassType`, `DelegatingElement`, `Element`

public interface ReturnType extends ClassType, DelegatingElement
Date: 29.07.2011

Author:
  James R. Perkins

## Method Summary

Modifier and Type
Method
Description
`boolean`
`isThrowable()`
Checks to see if the return type is an exception, extends Throwable or the value of a `Supplier` is a Throwable type.
`String`
`name()`
Returns the qualified class name of the return type.
`default TypeMirror`
`resolvedType()`
Checks this type to see if there are any type arguments.
`ThrowableType`
`throwableReturnType()`
Returns the exception return type if `isThrowable()` returns `true`.

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

`isAssignableFrom, isSameAs, isSubtypeOf`

### 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 Details

### isThrowable

boolean isThrowable()
Checks to see if the return type is an exception, extends Throwable or the value of a `Supplier` is a Throwable type.

Returns:
  `true` if the return type is an exception, otherwise `false`.
See Also:
  - `resolvedType()`

### name

String name()
Returns the qualified class name of the return type.

Returns:
  the qualified class name fo the return type.

### throwableReturnType

ThrowableType throwableReturnType()
Returns the exception return type if `isThrowable()` returns `true`. Otherwise `null` is returned.

Returns:
  an exception return type, otherwise `null`.

### resolvedType

default TypeMirror resolvedType()
Checks this type to see if there are any type arguments. If any type arguments are found the first type is returned and assumed to be the resolved type. Otherwise this type is returned.

This is useful for the `Supplier` return type.

Returns:
  the resolved return type