net.cscott.gjdoc

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.5 2003/04/16 17:00:17 cananian Exp $

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

See Also: java.lang.reflect.ParameterizedType

Method Summary
List<Type>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.

Method Detail

getActualTypeArguments

public List<Type> 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 may well be larger than the size of getBaseType().typeParameters(). The returned actual types are ordered from outermost class to innermost class. For the type A.B.C, this method will return the list [ Integer, String ] even those getBaseType().typeParameters().size() will be zero.

getBaseType

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