Java Reflection Generic Parameter getGenericTypes(ParameterizedType t)

Here you can find the source of getGenericTypes(ParameterizedType t)

Description

get Generic Types

License

Open Source License

Declaration

public static Type[] getGenericTypes(ParameterizedType t) 

Method Source Code


//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.lang.reflect.*;

public class Main {
    public static Type[] getGenericTypes(ParameterizedType t) {
        if (t == null)
            return new Type[] {};
        else// w  w w.ja  va2  s .  c  o m
            return t.getActualTypeArguments();
    }
}

Related

  1. getGenericParamType(Type type)
  2. getGenericParamType1(Type parameterizedType)
  3. getGenericParamTypes(Type genericType)
  4. getGenericType(Parameter param)
  5. getGenericTypeParameter(Type genericType)
  6. getGenericTypes(Type[] genericParameterTypes)