Record Class BindingNode
java.lang.Object
java.lang.Record
build.codemodel.dependency.injection.BindingNode
- Record Components:
typeDescriptor- theJDKTypeDescriptorfor the concrete type, ornullfor value/supplier bindings where no class is directly trackedscope- the scope annotation that governs this binding (e.g.Singleton.class), ornullfor prototype-scoped bindingsdeclaringModule- theModulesubclass that registered this binding, ornullwhen the binding was not registered through a module (Track 1 always passesnull; Track 2 fills this in)kind- how this binding produces its value
public record BindingNode(build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor, Class<? extends Annotation> scope, Class<? extends Module> declaringModule, BindingKind kind)
extends Record
A vertex in the Track 2 binding graph. Describes a single registered
Binding: the type
it produces, the scope it operates under, the Module that declared it (if any), and its
BindingKind.
Instances are constructed by InjectionContext and passed to
BindingGraphContributor.contributeBinding(BindingNode). Fields that cannot be populated in Track 1
(e.g. declaringModule when no module tracking is in place) are null.
- Since:
- Apr-2026
- Author:
- reed.vonredwitz
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBindingNode(build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor, Class<? extends Annotation> scope, Class<? extends Module> declaringModule, BindingKind kind) Creates an instance of aBindingNoderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedeclaringModulerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.kind()Returns the value of thekindrecord component.Class<? extends Annotation> scope()Returns the value of thescoperecord component.final StringtoString()Returns a string representation of this record class.build.codemodel.jdk.descriptor.JDKTypeDescriptorReturns the value of thetypeDescriptorrecord component.
-
Constructor Details
-
BindingNode
public BindingNode(build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor, Class<? extends Annotation> scope, Class<? extends Module> declaringModule, BindingKind kind) Creates an instance of aBindingNoderecord class.- Parameters:
typeDescriptor- the value for thetypeDescriptorrecord componentscope- the value for thescoperecord componentdeclaringModule- the value for thedeclaringModulerecord componentkind- the value for thekindrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
typeDescriptor
public build.codemodel.jdk.descriptor.JDKTypeDescriptor typeDescriptor()Returns the value of thetypeDescriptorrecord component.- Returns:
- the value of the
typeDescriptorrecord component
-
scope
-
declaringModule
Returns the value of thedeclaringModulerecord component.- Returns:
- the value of the
declaringModulerecord component
-
kind
-