Returns the return type, as specified in the declaration of this method.
Note: if the return type of this method is a reference type (class, interface, or array) and it has not been created or loaded by the declaring type's class loader - that is, {@link TypeComponent#declaringType declaringType()
}.classLoader()
, then ClassNotLoadedException will be thrown. Also, a reference type may have been loaded but not yet prepared, in which case the type will be returned but attempts to perform some operations on the returned type (e.g. {@link ReferenceType#fields() fields()}) will throw a {@link ClassNotPreparedException}. Use {@link ReferenceType#isPrepared()} to determine ifa reference type is prepared.
@see Type
@see Field#type() Field.type() - for usage examples
@return the return {@link Type} of this method.
@throws ClassNotLoadedException if the type has not yet beencreated or loaded through the appropriate class loader.