Class ProducerMethodProducer<X,T>
- java.lang.Object
-
- org.jboss.weld.injection.producer.AbstractProducer<T>
-
- org.jboss.weld.injection.producer.AbstractMemberProducer<X,T>
-
- org.jboss.weld.injection.producer.ProducerMethodProducer<X,T>
-
- All Implemented Interfaces:
Producer<T>
public abstract class ProducerMethodProducer<X,T> extends AbstractMemberProducer<X,T>
Producerimplementation for producer methods.- Author:
- Jozef Hartinger
-
-
Constructor Summary
Constructors Constructor Description ProducerMethodProducer(EnhancedAnnotatedMethod<T,? super X> enhancedAnnotatedMethod, DisposalMethod<?,?> disposalMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckProducerMethod(EnhancedAnnotatedMethod<T,? super X> method)Validates the producer methodAnnotatedMember<? super X>getAnnotated()Set<InjectionPoint>getInjectionPoints()Returns the set of allInjectionPoints.protected Tproduce(Object receiver, CreationalContext<T> ctx)protected DefinitionExceptionproducerWithInvalidTypeVariable(AnnotatedMember<?> member)protected DefinitionExceptionproducerWithInvalidWildcard(AnnotatedMember<?> member)protected DefinitionExceptionproducerWithParameterizedTypeWithTypeVariableBeanTypeMustBeDependent(AnnotatedMember<?> member)-
Methods inherited from class org.jboss.weld.injection.producer.AbstractMemberProducer
checkDeclaringBean, checkProducerReturnType, dispose, getBean, getBeanManager, getDeclaringBean, getDisposalMethod, getReceiver, isTypeSerializable, produce, toString
-
Methods inherited from class org.jboss.weld.injection.producer.AbstractProducer
checkDelegateInjectionPoints, equals, hashCode
-
-
-
-
Constructor Detail
-
ProducerMethodProducer
public ProducerMethodProducer(EnhancedAnnotatedMethod<T,? super X> enhancedAnnotatedMethod, DisposalMethod<?,?> disposalMethod)
-
-
Method Detail
-
checkProducerMethod
protected void checkProducerMethod(EnhancedAnnotatedMethod<T,? super X> method)
Validates the producer method
-
getInjectionPoints
public Set<InjectionPoint> getInjectionPoints()
Description copied from interface:ProducerReturns the set of all
InjectionPoints. If theProducerrepresents a class, then this returns returns the set ofInjectionPointobjects representing all injected fields, bean constructor parameters and initializer method parameters. For a producer method, this returns the set ofInjectionPointobjects representing all parameters of the producer method.- Returns:
- the set of all injection points for the producer
-
produce
protected T produce(Object receiver, CreationalContext<T> ctx)
- Specified by:
producein classAbstractMemberProducer<X,T>
-
getAnnotated
public AnnotatedMember<? super X> getAnnotated()
- Specified by:
getAnnotatedin classAbstractMemberProducer<X,T>
-
producerWithInvalidTypeVariable
protected DefinitionException producerWithInvalidTypeVariable(AnnotatedMember<?> member)
- Specified by:
producerWithInvalidTypeVariablein classAbstractMemberProducer<X,T>
-
producerWithInvalidWildcard
protected DefinitionException producerWithInvalidWildcard(AnnotatedMember<?> member)
- Specified by:
producerWithInvalidWildcardin classAbstractMemberProducer<X,T>
-
producerWithParameterizedTypeWithTypeVariableBeanTypeMustBeDependent
protected DefinitionException producerWithParameterizedTypeWithTypeVariableBeanTypeMustBeDependent(AnnotatedMember<?> member)
- Specified by:
producerWithParameterizedTypeWithTypeVariableBeanTypeMustBeDependentin classAbstractMemberProducer<X,T>
-
-