public abstract DeclaredType getDeclaredType (TypeElement typeElem, TypeMirror… typeArgs)

Returns the type corresponding to a type element and actual type arguments. Given the type element for Set and the type mirror for String, for example, this method may be used to get the parameterized type Set<String>.

The number of type arguments must either equal the number of the type element's formal type parameters, or must be zero. If zero, and if the type element is generic, then the type element's raw type is returned.

If a parameterized type is being returned, its type element must not be contained within a generic outer class. The parameterized type Outer<String>.Inner<Number>, for example, may be constructed by first using this method to get the type Outer<String>, and then invoking getDeclaredType(DeclaredType, TypeElement, TypeMirror...).

Parameters:
typeElem    the type element
typeArgs    the actual type arguments

Returns:  the type corresponding to the type element and actual type arguments

Exceptions:
IllegalArgumentException    if too many or too few type arguments are given, or if an inappropriate type argument or type element is provided