Since: API Level 1
public interface

WildcardType

implements Type
java.lang.reflect.WildcardType

Class Overview

This interface represents a wildcard type, such as the simple wildcard '?', the upper bounded wildcard '? extends Closeable', the multiple upper bounded wildcard '? extends Closeable & Flushable' or the lower bounded wildcard '? super OutputStream'.

Summary

Public Methods
abstract Type[] getLowerBounds()
Returns the array of types that represent the lower bounds of this type.
abstract Type[] getUpperBounds()
Returns the array of types that represent the upper bounds of this type.

Public Methods

public abstract Type[] getLowerBounds ()

Since: API Level 1

Returns the array of types that represent the lower bounds of this type. The default lower bound is null, in which case an empty array is returned. Since only one lower bound is allowed, the returned array's length will never exceed one.

Returns
  • an array containing the lower bounds types
Throws
TypeNotPresentException if any of the bounds points to a missing type
MalformedParameterizedTypeException if any of the bounds points to a type that cannot be instantiated for some reason

public abstract Type[] getUpperBounds ()

Since: API Level 1

Returns the array of types that represent the upper bounds of this type. The default upper bound is Object.

Returns
  • an array containing the upper bounds types
Throws
TypeNotPresentException if any of the bounds points to a missing type
MalformedParameterizedTypeException if any bound points to a type that cannot be instantiated for some reason