javax.enterprise.inject.spi.ProcessProducerMethod Java Examples

The following examples show how to use javax.enterprise.inject.spi.ProcessProducerMethod. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MetricCdiInjectionExtension.java    From smallrye-metrics with Apache License 2.0 4 votes vote down vote up
private void findMetricProducerMethods(@Observes ProcessProducerMethod<? extends Metric, ?> ppm) {
    if (!ppm.getBean().getBeanClass().equals(MetricProducer.class)) {
        SmallRyeMetricsLogging.log.producerMethodDiscovered(ppm.getAnnotatedProducerMethod());
        metricsFromProducers.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
    }
}
 
Example #2
Source File: JAXRSCdiResourceExtension.java    From cxf with Apache License 2.0 4 votes vote down vote up
public <T, X> void collect(@Observes final ProcessProducerMethod< T, X > event) {
    final Type baseType = event.getAnnotatedProducerMethod().getBaseType();
    processProducer(event, baseType);
}
 
Example #3
Source File: HealthCheckExtension.java    From metrics-cdi with Apache License 2.0 4 votes vote down vote up
private void healthCheckProducerMethod(@Observes ProcessProducerMethod<? extends HealthCheck, ?> ppm) {
    healthChecks.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
}
 
Example #4
Source File: MetricsExtension.java    From metrics-cdi with Apache License 2.0 4 votes vote down vote up
private void metricProducerMethod(@Observes ProcessProducerMethod<? extends Metric, ?> ppm) {
    // Skip the Metrics CDI alternatives
    if (!ppm.getBean().getBeanClass().equals(MetricProducer.class))
        metrics.put(ppm.getBean(), ppm.getAnnotatedProducerMethod());
}
 
Example #5
Source File: ConfigurationExtension.java    From deltaspike with Apache License 2.0 4 votes vote down vote up
public void findDynamicProducer(@Observes ProcessProducerMethod<?, DynamicBeanProducer> processBean)
{
    dynamicProducer = processBean.getBean();
}