Java TypeVariable .getGenericDeclaration ()
Syntax
TypeVariable.getGenericDeclaration() has the following syntax.
D getGenericDeclaration()
Example
In the following code shows how to use TypeVariable.getGenericDeclaration() method.
import java.lang.reflect.TypeVariable;
import java.util.List;
/*from w w w .j ava 2s . c o m*/
public class Main {
public static void main(String args[]) throws Exception {
TypeVariable[] tv = List.class.getTypeParameters();
System.out.println(tv[0].getGenericDeclaration());
}
}