com.github.panchitoboy.common.ecb.helper.ClassHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-ecb Show documentation
Show all versions of common-ecb Show documentation
Libreria de ayuda la generacion de servicios REST
package com.github.panchitoboy.common.ecb.helper;
import java.lang.reflect.ParameterizedType;
import javax.enterprise.inject.spi.InjectionPoint;
import javax.inject.Inject;
public class ClassHelper {
private final Class injectionClass;
@Inject
public ClassHelper(InjectionPoint ip) {
ParameterizedType type = (ParameterizedType) ip.getType();
Class clazz = (Class) type.getActualTypeArguments()[0];
this.injectionClass = clazz;
}
public Class getInjectionClass() {
return injectionClass;
}
}