All Downloads are FREE. Search and download functionalities are using the official Maven repository.

blah.tests.Commons Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
package blah.tests;

import java.lang.reflect.ParameterizedType;

import lombok.val;

public class Commons {

	public static Class extractGenericTypeFromFirstInterface( Class clazz ) {
		val pType = clazz.getGenericInterfaces();
		Class type = (Class)( (ParameterizedType)pType[0] ).getActualTypeArguments()[0];
		return type;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy