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 Summary
Modifier and TypeMethodDescriptionObtains theInjectionPoints defined for theJDKTypeDescriptor.booleanDetermines if there areInjectionPoints defined for theJDKTypeDescriptorstatic InjectableDescriptorof(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 newInjectableDescriptorfor the specifiedJDKTypeDescriptor.Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> Stream<build.codemodel.objectoriented.descriptor.MethodDescriptor> build.codemodel.jdk.descriptor.JDKTypeDescriptorObtains theJDKTypeDescriptorfor which theInjectableDescriptorwas established.
-
Method Details
-
isInjectable
public boolean isInjectable()Determines if there areInjectionPoints defined for theJDKTypeDescriptor- Returns:
trueif there areInjectionPoint,falseotherwise
-
typeDescriptor
public build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor()Obtains theJDKTypeDescriptorfor which theInjectableDescriptorwas established.- Returns:
- the
JDKTypeDescriptor
-
injectionPoints
Obtains theInjectionPoints defined for theJDKTypeDescriptor.- Returns:
- the
InjectionPoints
-
postInjectionMethods
- Returns:
- the
StreamofPostInjectMethodDescriptors
-
preDestroyMethods
- Returns:
- the
StreamofPreDestroyMethodDescriptors
-
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 newInjectableDescriptorfor the specifiedJDKTypeDescriptor.- Parameters:
typeDescriptor- theJDKTypeDescriptorinjectionPoints- theInjectionPointspostInjectionMethods- thePostInjectannotatedMethodDescriptorspreDestroyMethods- thePreDestroyannotatedMethodDescriptors
-