Record Class InjectionEngine.InjectedField
java.lang.Object
java.lang.Record
de.aristaflow.adept2.util.injection.InjectionEngine.InjectedField
- Record Components:
field- The annotated field, already accessible.effectiveType- The type to resolve the binding by.typeArgs- The type arguments of the effective type in pre-order, empty if none are stated.name- The qualifier ornullif the declaration states none.required- Whether an unavailable binding fails the claim.
- Enclosing class:
- InjectionEngine
protected static record InjectionEngine.InjectedField(Field field, Class<?> effectiveType, List<Class<?>> typeArgs, String name, boolean required)
extends Record
One slot to populate: the field itself and everything its declaration adds to it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>Returns the value of theeffectiveTyperecord component.final booleanIndicates whether some other object is "equal to" this one.field()Returns the value of thefieldrecord component.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.typeArgs()Returns the value of thetypeArgsrecord component.
-
Constructor Details
-
InjectedField
protected InjectedField(Field field, Class<?> effectiveType, List<Class<?>> typeArgs, String name, boolean required) Creates an instance of aInjectedFieldrecord class.- Parameters:
field- the value for thefieldrecord componenteffectiveType- the value for theeffectiveTyperecord componenttypeArgs- the value for thetypeArgsrecord componentname- the value for thenamerecord componentrequired- the value for therequiredrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
field
Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
effectiveType
Returns the value of theeffectiveTyperecord component.- Returns:
- the value of the
effectiveTyperecord component
-
typeArgs
Returns the value of thetypeArgsrecord component.- Returns:
- the value of the
typeArgsrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-