Java examples for java.lang.annotation:Enterprise Annotation
get Base Type of enterprise annotation
import java.lang.reflect.Method; import java.util.Collection; import java.util.List; import java.util.Set; import javax.enterprise.inject.spi.Annotated; import javax.enterprise.inject.spi.AnnotatedMethod; import javax.enterprise.inject.spi.AnnotatedParameter; import javax.enterprise.inject.spi.AnnotatedType; public class Main{ public static BaseType getBaseType(Annotated annotated) { if (annotated instanceof BaseTypeAnnotated) return ((BaseTypeAnnotated) annotated).getBaseTypeImpl(); else/*from www . j a v a 2s . c om*/ return BaseTypeFactory.getCurrent().createForTarget( annotated.getBaseType()); } }