Name

WildcardType

Synopsis

This interface extends Type and represents a generic type declared with a bounded or unbounded wildcard. getUpperBounds( ) returns the upper bounds of the wildcard. The returned array always includes at least one element. If no upper bound is declared, Object.class is the implicit upper bound. getLowerBounds( ) returns the lower bounds of the wildcard. If no lower bound is declared, this method returns an empty array .

java.lang.reflect.WildcardType

Figure 10-104. java.lang.reflect.WildcardType

public interface WildcardType extends Type {
// Public Instance Methods
     Type[ ] getLowerBounds( );  
     Type[ ] getUpperBounds( );  
}

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.