Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.cdi.util.defaultbean;
 
 import java.util.Set;
 
 import  javax.enterprise.context.spi.CreationalContext;
 import  javax.enterprise.inject.spi.AnnotatedField;
 import  javax.enterprise.inject.spi.Bean;
import  javax.enterprise.inject.spi.BeanManager;
// TODO Make this passivation capable
    private final AnnotatedField<X> field;
    static <T, X> DefaultProducerField<T, X> of(Bean<T> originalBeanType declaringBeanTypeSet<TypebeanTypesSet<AnnotationqualifiersSet<AnnotationdeclaringBeanQualifiers, AnnotatedField<X> field, BeanManager beanManager) {
        return new DefaultProducerField<T, X>(originalBeandeclaringBeanTypebeanTypesqualifiersdeclaringBeanQualifiersfieldbeanManager);
    }
    DefaultProducerField(Bean<T> originalBeanType declaringBeanTypeSet<TypebeanTypesSet<AnnotationqualifiersSet<AnnotationdeclaringBeanQualifiers, AnnotatedField<X> field, BeanManager beanManager) {
        super(originalBeandeclaringBeanTypebeanTypesqualifiersdeclaringBeanQualifiersbeanManager);
        this. = field;
        if (!field.getJavaMember().isAccessible()) {
            field.getJavaMember().setAccessible(true);
        }
    }
    @Override
    protected T getValue(Object receiver, CreationalContext<T> creationalContext) {
        return Reflections.getFieldValue(.getJavaMember(), receiver, Reflections.<T>getRawType(.getBaseType()));
    }
    @Override
    public void destroy(T instance, CreationalContext<T> creationalContext) {
        // TODO: disposers
        creationalContext.release();
    }
New to GrepCode? Check out our FAQ X