Class MethodInjectionPoint<T,​X>

  • Type Parameters:
    T - the return type of the method
    X - 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
    • 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 method
        specialValue - value to be passed to the special parameter (observer or disposer parameter) or null if the method is not an observer or disposer
        manager - the bean manager
        ctx - the creational context
        exceptionTypeToThrow - 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 interface jakarta.enterprise.inject.spi.InjectionPoint
      • getType

        public Type getType()
        Specified by:
        getType in interface jakarta.enterprise.inject.spi.InjectionPoint
      • getQualifiers

        public Set<Annotation> getQualifiers()
        Specified by:
        getQualifiers in interface jakarta.enterprise.inject.spi.InjectionPoint
      • getBean

        public jakarta.enterprise.inject.spi.Bean<?> getBean()
        Specified by:
        getBean in interface jakarta.enterprise.inject.spi.InjectionPoint
      • isDelegate

        public boolean isDelegate()
        Specified by:
        isDelegate in interface jakarta.enterprise.inject.spi.InjectionPoint
      • isTransient

        public boolean isTransient()
        Specified by:
        isTransient in interface jakarta.enterprise.inject.spi.InjectionPoint
      • getMember

        public Member getMember()
        Specified by:
        getMember in interface jakarta.enterprise.inject.spi.InjectionPoint
      • getInjectionPoints

        public Set<jakarta.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
        Returns a set of InjectionPoint instances of this constructor/method. This set never contains a SpecialParameterInjectionPoint and is therefore suitable for use outside of Weld. The returned set is immutable.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object