|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl
public class ParameterizedTypeImpl
Implementing class for ParameterizedType interface.
| Method Summary | |
|---|---|
boolean |
equals(Object o)
equals compares this object to another object. |
Type[] |
getActualTypeArguments()
Returns an array of Type objects representing the actual type arguments to this type. |
Type |
getOwnerType()
Returns a Type object representing the type that this type is a member of. |
Class<?> |
getRawType()
Returns the Type object representing the class or interface that declared this type. |
int |
hashCode()
hashCode returns a hash code for this object. |
static ParameterizedTypeImpl |
make(Class<?> rawType,
Type[] actualTypeArguments,
Type ownerType)
Static factory. |
String |
toString()
toString creates a printable string that represents this object for debugging purposes. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ParameterizedTypeImpl make(Class<?> rawType,
Type[] actualTypeArguments,
Type ownerType)
This method throws a MalformedParameterizedTypeException under the following circumstances: If the number of actual type arguments (i.e., the size of the array typeArgs) does not correspond to the number of formal type arguments. If any of the actual type arguments is not an instance of the bounds on the corresponding formal.
rawType - the Class representing the generic type declaration being
instantiatedactualTypeArguments - - a (possibly empty) array of types
representing the actual type arguments to the parameterized typeownerType - - the enclosing type, if known.
MalformedParameterizedTypeException - - if the instantiation
is invalidpublic Type[] getActualTypeArguments()
Note that in some cases, the returned array be empty. This can occur if this type represents a non-parameterized type nested within a parameterized type.
getActualTypeArguments in interface ParameterizedTypeTypeNotPresentException - if any of the
actual type arguments refers to a non-existent type declaration
MalformedParameterizedTypeException - if any of the
actual type parameters refer to a parameterized type that cannot
be instantiated for any reasonpublic Class<?> getRawType()
getRawType in interface ParameterizedTypepublic Type getOwnerType()
If this type is a top-level type, null is returned.
getOwnerType in interface ParameterizedTypeTypeNotPresentException - if the owner type
refers to a non-existent type declaration
MalformedParameterizedTypeException - if the owner type
refers to a parameterized type that cannot be instantiated
for any reasonpublic boolean equals(Object o)
ObjectEquals 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.
equals in class Objecto - the other object.
public int hashCode()
ObjectThe default implementation returns System.identityHashCode(this).
hashCode in class Objectpublic String toString()
ObjectThe default implementation returns getClass().getName() + '@' + Integer.toHexString(hashCode()).
toString in class Object
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||