net.cscott.sinjdoc

Interface ParameterizedType

public interface ParameterizedType extends Type

The ParameterizedType interface represents a parameterized type such as Collection<Integer> or HashMap<String,Double>.

Version: $Id: ParameterizedType.java,v 1.8 2003/07/29 16:02:37 cananian Exp $

Author: C. Scott Ananian (cscott@cscott.net)

See Also: java.lang.reflect.ParameterizedType

Method Summary
List<TypeArgument>getActualTypeArguments()
Return the type arguments that this parameterized type has been instantiated with.
ClassTypegetBaseType()
Return the Type corresponding to the "raw class" of this parameterized type; that is, the type without parameters.
TypegetDeclaringType()
Return the Type corresponding to the (possibly parameterized) declaring class of this parameterized type, or null if this type does not represent an inner class.

Method Detail

getActualTypeArguments

public List<TypeArgument> getActualTypeArguments()
Return the type arguments that this parameterized type has been instantiated with. Note that for nested parameterized types, the size of the returned list will always be equal to the size of of getBaseType().typeParameters(); however, the getDeclaringType() method may return a parameterized type. For example, for the type: A<Integer>.B<String>.C, this method will return a zero-length list, and getDeclaringType() will return the ParameterizedType for A<Integer>.B<String>.

getBaseType

public ClassType getBaseType()
Return the Type corresponding to the "raw class" of this parameterized type; that is, the type without parameters.

getDeclaringType

public Type getDeclaringType()
Return the Type corresponding to the (possibly parameterized) declaring class of this parameterized type, or null if this type does not represent an inner class. Note that this method will return a ClassType if this type represents a static inner class, even if the declaring class is parameterized.
Copyright © 2003 C. Scott Ananian