APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.beans

pack-priv final Class WildcardTypeImpl

extends Object
implements WildcardType
Class Inheritance
All Implemented Interfaces
java.lang.reflect.WildcardType, java.lang.reflect.Type
Imports
java.lang.reflect.Type, .WildcardType, java.util.Arrays

This class implements WildcardType compatibly with the JDK's WildcardTypeImpl. Unfortunately we can't use the JDK's WildcardTypeImpl here as we do for ParameterizedTypeImpl and GenericArrayTypeImpl, because WildcardTypeImpl's constructor takes parameters representing intermediate structures obtained during class-file parsing. We could reconstruct versions of those structures but it would be more trouble than it's worth.
Authors
Eamonn McManus, Sergey Malenkov
Since
1.7

Field Summary

Modifier and TypeField and Description
private final Type[]
private final Type[]

Constructor Summary

AccessConstructor and Description
pack-priv
WildcardTypeImpl(Type[]
the array of types representing the upper bound(s) of this type variable
upperBounds
,
Type[]
the array of types representing the lower bound(s) of this type variable
lowerBounds
)

Creates a wildcard type with the requested bounds.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this object is the same as the object argument; false otherwise
equals
(Object
the reference object with which to compare
object
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public Type[]

Returns:

an array of types representing the lower bound(s) of this type variable
getLowerBounds
()

Implements java.lang.reflect.WildcardType.getLowerBounds.

Returns an array of Type objects representing the lower bound(s) of this type variable.

public Type[]

Returns:

an array of types representing the upper bound(s) of this type variable
getUpperBounds
()

Implements java.lang.reflect.WildcardType.getUpperBounds.

Returns an array of Type objects representing the upper bound(s) of this type variable.

public int

Returns:

a hash code value for this object
hashCode
()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.

public String

Returns:

a string representation of the object
toString
()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

lowerBoundsback to summary
private final Type[] lowerBounds
upperBoundsback to summary
private final Type[] upperBounds

Constructor Detail

WildcardTypeImplback to summary
pack-priv WildcardTypeImpl(Type[] upperBounds, Type[] lowerBounds)

Creates a wildcard type with the requested bounds. Note that the array arguments are not cloned because instances of this class are never constructed from outside the containing package.

Parameters
upperBounds:Type[]

the array of types representing the upper bound(s) of this type variable

lowerBounds:Type[]

the array of types representing the lower bound(s) of this type variable

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one. It is implemented compatibly with the JDK's WildcardTypeImpl.

Parameters
object:Object

the reference object with which to compare

Returns:boolean

true if this object is the same as the object argument; false otherwise

Annotations
@Override
See Also
sun.reflect.generics.reflectiveObjects.WildcardTypeImpl#equals
getLowerBoundsback to summary
public Type[] getLowerBounds()

Implements java.lang.reflect.WildcardType.getLowerBounds.

Returns an array of Type objects representing the lower bound(s) of this type variable. Note that if no lower bound is explicitly declared, the lower bound is the type of null. In this case, a zero length array is returned.

Returns:Type[]

an array of types representing the lower bound(s) of this type variable

Annotations
@Override
getUpperBoundsback to summary
public Type[] getUpperBounds()

Implements java.lang.reflect.WildcardType.getUpperBounds.

Returns an array of Type objects representing the upper bound(s) of this type variable. Note that if no upper bound is explicitly declared, the upper bound is Object.

Returns:Type[]

an array of types representing the upper bound(s) of this type variable

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object. It is implemented compatibly with the JDK's WildcardTypeImpl.

Returns:int

a hash code value for this object

Annotations
@Override
See Also
sun.reflect.generics.reflectiveObjects.WildcardTypeImpl#hashCode
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object. It is implemented compatibly with the JDK's WildcardTypeImpl.

Returns:String

a string representation of the object

Annotations
@Override
See Also
sun.reflect.generics.reflectiveObjects.WildcardTypeImpl#toString