Name

GenericDeclaration

Synopsis

This interface is implemented by the classes that represent program elements that can be made generic: java.lang.Class as well as Method and Constructor. It provides access to the type variables declared by the generic type, method, or constructor. getTypeParameters( ) never returns null: if there are no declared type variables, it returns a zero-length array.

public interface GenericDeclaration {
// Public Instance Methods
     TypeVariable<?>[ ] getTypeParameters( );  
}

Implementations

Class, Constructor, Method

Returned By

TypeVariable.getGenericDeclaration( )

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.