Class InjectableDescriptor

java.lang.Object
build.codemodel.dependency.injection.InjectableDescriptor
All Implemented Interfaces:
build.codemodel.foundation.descriptor.Trait

public class InjectableDescriptor extends Object implements build.codemodel.foundation.descriptor.Trait
Defines information concerning the inject-ability of a JDKTypeDescriptor with the InjectionFramework.
Since:
Oct-2024
Author:
brian.oliver
  • Method Details

    • isInjectable

      public boolean isInjectable()
      Determines if there are InjectionPoints defined for the JDKTypeDescriptor
      Returns:
      true if there are InjectionPoint, false otherwise
    • typeDescriptor

      public build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor()
      Obtains the JDKTypeDescriptor for which the InjectableDescriptor was established.
      Returns:
      the JDKTypeDescriptor
    • injectionPoints

      public Stream<InjectionPoint> injectionPoints()
      Obtains the InjectionPoints defined for the JDKTypeDescriptor.
      Returns:
      the InjectionPoints
    • postInjectionMethods

      public Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> postInjectionMethods()
      Obtains the PostInject annotated MethodDescriptors defined for the JDKTypeDescriptor.
      Returns:
      the Stream of PostInject MethodDescriptors
    • preDestroyMethods

      public Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> preDestroyMethods()
      Obtains the PreDestroy annotated MethodDescriptors defined for the JDKTypeDescriptor.
      Returns:
      the Stream of PreDestroy MethodDescriptors
    • of

      public static InjectableDescriptor of(build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor, Stream<InjectionPoint> injectionPoints, Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> postInjectionMethods, Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> preDestroyMethods)
      Creates a new InjectableDescriptor for the specified JDKTypeDescriptor.
      Parameters:
      typeDescriptor - the JDKTypeDescriptor
      injectionPoints - the InjectionPoints
      postInjectionMethods - the PostInject annotated MethodDescriptors
      preDestroyMethods - the PreDestroy annotated MethodDescriptors