Class ConstructorInjectionPoint

java.lang.Object
build.codemodel.dependency.injection.ConstructorInjectionPoint
All Implemented Interfaces:
InjectionPoint

public class ConstructorInjectionPoint extends Object implements InjectionPoint
An InjectionPoint for a ConstructorDescriptor.
Since:
Oct-2024
Author:
brian.oliver
  • Method Details

    • typeDescriptor

      public build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor()
      Description copied from interface: InjectionPoint
      The JDKTypeDescriptor in which the InjectionPoint is defined
      Specified by:
      typeDescriptor in interface InjectionPoint
      Returns:
      the JDKTypeDescriptor
    • dependencies

      public Stream<Dependency> dependencies()
      Description copied from interface: InjectionPoint
      The Dependencys for the parameters required to be injected at the InjectionPoint, in the order in which they are required.
      Specified by:
      dependencies in interface InjectionPoint
      Returns:
      the TypeUsages
    • inject

      public <T> T inject(Object target, Object[] actualParameters)
      Description copied from interface: InjectionPoint
      Inject into the InjectionPoint with the necessary zero or more resolved actual parameter InjectionPoint.dependencies().
      Specified by:
      inject in interface InjectionPoint
      Parameters:
      target - the optional target Object into which injection must occur
      actualParameters - the resolved TypeUsage values to be injected
      Returns:
      the result of the injection
    • of

      public static ConstructorInjectionPoint of(build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor, build.codemodel.objectoriented.descriptor.ConstructorDescriptor constructorDescriptor, Function<? super build.codemodel.foundation.descriptor.Traitable, Stream<build.codemodel.foundation.usage.AnnotationTypeUsage>> qualifierAnnotationExtractor)
      Parameters:
      typeDescriptor - the JDKTypeDescriptor
      constructorDescriptor - the ConstructorDescriptor
      qualifierAnnotationExtractor - a Function to extract Qualifier AnnotationTypeUsages
      Returns:
      a new ConstructorInjectionPoint