Package org.jboss.weld.injection
Class MethodInjectionPoint<T,X>
- java.lang.Object
-
- org.jboss.weld.injection.MethodInjectionPoint<T,X>
-
- Type Parameters:
T
- the return type of the methodX
- the type of the class that declared the method
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionPoint
,WeldInjectionPointAttributes<T,Method>
public abstract class MethodInjectionPoint<T,X> extends Object
Wraps a method whose parameters may be injected.- Author:
- Jozef Hartinger
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MethodInjectionPoint.MethodInjectionPointType
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hasTransientReferenceParameter
protected MethodInjectionPoint.MethodInjectionPointType
type
-
Constructor Summary
Constructors Modifier Constructor Description protected
MethodInjectionPoint(MethodInjectionPoint.MethodInjectionPointType methodInjectionPointType, EnhancedAnnotatedCallable<T,X,Method> callable, jakarta.enterprise.inject.spi.Bean<?> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
abstract jakarta.enterprise.inject.spi.AnnotatedMethod<X>
getAnnotated()
jakarta.enterprise.inject.spi.Bean<?>
getBean()
Set<jakarta.enterprise.inject.spi.InjectionPoint>
getInjectionPoints()
Returns a set ofInjectionPoint
instances of this constructor/method.Member
getMember()
List<ParameterInjectionPoint<?,X>>
getParameterInjectionPoints()
<A extends Annotation>
AgetQualifier(Class<A> annotationType)
Returns an instance of a given qualifier annotation or null if a given qualifier is not present on the injection point.Set<Annotation>
getQualifiers()
Type
getType()
int
hashCode()
abstract T
invoke(Object receiver, Object specialValue, BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx, Class<? extends RuntimeException> exceptionTypeToThrow)
Invokes the method.boolean
isDelegate()
boolean
isTransient()
String
toString()
-
-
-
Field Detail
-
type
protected MethodInjectionPoint.MethodInjectionPointType type
-
hasTransientReferenceParameter
protected final boolean hasTransientReferenceParameter
-
-
Constructor Detail
-
MethodInjectionPoint
protected MethodInjectionPoint(MethodInjectionPoint.MethodInjectionPointType methodInjectionPointType, EnhancedAnnotatedCallable<T,X,Method> callable, jakarta.enterprise.inject.spi.Bean<?> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
-
Method Detail
-
invoke
public abstract T invoke(Object receiver, Object specialValue, BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx, Class<? extends RuntimeException> exceptionTypeToThrow)
Invokes the method.- Parameters:
receiver
- the instance to receive the method invocation or null if this is a static methodspecialValue
- value to be passed to the special parameter (observer or disposer parameter) or null if the method is not an observer or disposermanager
- the bean managerctx
- the creational contextexceptionTypeToThrow
- exception type to be used to wrap potential exceptions within- Returns:
- the value returned from the method
-
getAnnotated
public abstract jakarta.enterprise.inject.spi.AnnotatedMethod<X> getAnnotated()
- Specified by:
getAnnotated
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getType
public Type getType()
- Specified by:
getType
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getQualifiers
public Set<Annotation> getQualifiers()
- Specified by:
getQualifiers
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getBean
public jakarta.enterprise.inject.spi.Bean<?> getBean()
- Specified by:
getBean
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
isDelegate
public boolean isDelegate()
- Specified by:
isDelegate
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getQualifier
public <A extends Annotation> A getQualifier(Class<A> annotationType)
Description copied from interface:WeldInjectionPointAttributes
Returns an instance of a given qualifier annotation or null if a given qualifier is not present on the injection point.- Specified by:
getQualifier
in interfaceWeldInjectionPointAttributes<T,X>
-
getMember
public Member getMember()
- Specified by:
getMember
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getParameterInjectionPoints
public List<ParameterInjectionPoint<?,X>> getParameterInjectionPoints()
-
getInjectionPoints
public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
Returns a set ofInjectionPoint
instances of this constructor/method. This set never contains aSpecialParameterInjectionPoint
and is therefore suitable for use outside of Weld. The returned set is immutable.
-
-