aicas logoJamaica 3.2 release 62

sun.reflect.generics.reflectiveObjects
Class WildcardTypeImpl

java.lang.Object
  extended by sun.reflect.generics.reflectiveObjects.LazyReflectiveObjectGenerator
      extended by sun.reflect.generics.reflectiveObjects.WildcardTypeImpl
All Implemented Interfaces:
Type, WildcardType

public class WildcardTypeImpl
extends LazyReflectiveObjectGenerator
implements WildcardType

Implementation of WildcardType interface for core reflection.


Method Summary
 boolean equals(Object o)
          equals compares this object to another object.
 Type[] getLowerBounds()
          Returns an array of Type objects representing the lower bound(s) of this type variable.
 Type[] getUpperBounds()
          Returns an array of Type objects representing the upper bound(s) of this type variable.
 int hashCode()
          hashCode returns a hash code for this object.
static WildcardTypeImpl make(FieldTypeSignature[] ubs, FieldTypeSignature[] lbs, GenericsFactory f)
          Factory method.
 String toString()
          toString creates a printable string that represents this object for debugging purposes.
 
Methods inherited from class sun.reflect.generics.reflectiveObjects.LazyReflectiveObjectGenerator
getReifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

make

public static WildcardTypeImpl make(FieldTypeSignature[] ubs,
                                    FieldTypeSignature[] lbs,
                                    GenericsFactory f)
Factory method.

Parameters:
ubs - - an array of ASTs representing the upper bounds for the type variable to be created
lbs - - an array of ASTs representing the lower bounds for the type variable to be created
f - - a factory that can be used to manufacture reflective objects that represent the bounds of this wildcard type
Returns:
a wild card type with the requested bounds and factory

getUpperBounds

public Type[] 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.

For each upper bound B :

Specified by:
getUpperBounds in interface WildcardType
Returns:
an array of Types representing the upper bound(s) of this type variable
Throws:
TypeNotPresentException - if any of the bounds refers to a non-existent type declaration
MalformedParameterizedTypeException - if any of the bounds refer to a parameterized type that cannot be instantiated for any reason

getLowerBounds

public Type[] 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.

For each lower bound B :

Specified by:
getLowerBounds in interface WildcardType
Returns:
an array of Types representing the lower bound(s) of this type variable
Throws:
TypeNotPresentException - if any of the bounds refers to a non-existent type declaration
MalformedParameterizedTypeException - if any of the bounds refer to a parameterized type that cannot be instantiated for any reason

toString

public String toString()
Description copied from class: Object
toString creates a printable string that represents this object for debugging purposes.

The default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).

Overrides:
toString in class Object
Returns:
a string identifying this object.

equals

public boolean equals(Object o)
Description copied from class: Object
equals compares this object to another object.

Equals must be symmetric (a.equals(b) == b.equals(a)), reflexive (a.equals(a)==true) and transitive (a.equals(b) && b.equals(c) IMPLIES (a.equals(c))) and not change over time (a.equals(b) == a.equals(b)). a.equals(null) should always return false.

If a.equals(b) is true for two objects a and b, then a.hashCode()==b.hashCode() must hold.

The default implementation of equals returns this==other.

Overrides:
equals in class Object
Parameters:
o - the other object.
Returns:
if this and other are considered equal.

hashCode

public int hashCode()
Description copied from class: Object
hashCode returns a hash code for this object. The hash code must be equal for two objects a and b if a.equals(b) is true.

The default implementation returns System.identityHashCode(this).

Overrides:
hashCode in class Object
Returns:
a hash code value.

aicas logoJamaica 3.2 release 62

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2008 aicas GmbH. All Rights Reserved.