java.lang.reflect

Interface GenericDeclaration

public interface GenericDeclaration

Represents an entity that declares one or more type parameters. This includes classes and methods (including constructors).

Since: 1.5

Method Summary
TypeVariable<?>[]getTypeParameters()
Returns a TypeVariable object for each type variable declared by this entity, in order of declaration.

Method Detail

getTypeParameters

public TypeVariable<?>[] getTypeParameters()
Returns a TypeVariable object for each type variable declared by this entity, in order of declaration. An empty array is returned if no type variables are declared.

Returns: an array of TypeVariable objects.

Throws: GenericSignatureFormatError if the signature format within the class file does not conform to that specified in the 3rd edition of the Java Virtual Machine Specification.