java.lang.Object
java.lang.Record
org.microbean.bean.AttributedElement
- Record Components:
element- a non-nullElementattributes- a non-nullListofNamedAttributeMapinstances representing attributes
- All Implemented Interfaces:
Constable
public record AttributedElement(Element element, List<NamedAttributeMap<?>> attributes)
extends Record
implements Constable
An
Element that has been decorated with attributes.
Dependency injection frameworks often refer to this sort of thing as an injection point.
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionAttributedElement(Element element, List<NamedAttributeMap<?>> attributes) Creates an instance of aAttributedElementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributedTypeReturns the value of theattributesrecord component.Optional<? extends ConstantDesc> Returns anOptionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be described.element()Returns the value of theelementrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.final TypeMirrortype()
-
Constructor Details
-
AttributedElement
Creates an instance of aAttributedElementrecord class.- Parameters:
element- the value for theelementrecord componentattributes- the value for theattributesrecord component
-
-
Method Details
-
type
-
attributedType
-
describeConstable
Returns anOptionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be described.- Specified by:
describeConstablein interfaceConstable- Returns:
- an
Optionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be describe; nevernull
-
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
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. All components in this record class are compared withObjects::equals(Object,Object). -
element
Returns the value of theelementrecord component.- Returns:
- the value of the
elementrecord component
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-