Record Class AttributedElement
java.lang.Object
java.lang.Record
org.microbean.bean.AttributedElement
- Record Components:
element
- anElement
attributes
- aList
ofNamedAttributeMap
s
- All Implemented Interfaces:
Constable
public record AttributedElement(Element element, List<NamedAttributeMap<?>> attributes)
extends Record
implements Constable
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionAttributedElement
(Element element, List<NamedAttributeMap<?>> attributes) Creates a newAttributedElement
. -
Method Summary
Modifier and TypeMethodDescriptionfinal AttributedType
Returns thisAttributedElement
'sAttributedType
.Returns the value of theattributes
record component.Optional
<? extends ConstantDesc> Returns anOptional
containing aConstantDesc
describing thisAttributedType
, or an emptyOptional
if it could not be described.element()
Returns the value of theelement
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.final TypeMirror
type()
Returns thisAttributedElement
's type.
-
Constructor Details
-
AttributedElement
Creates a newAttributedElement
.- Parameters:
element
- aElement
; must not benull
attributes
- aList
ofNamedAttributeMap
s; must not benull
- Throws:
NullPointerException
- if either argument isnull
-
-
Method Details
-
type
Returns thisAttributedElement
's type.- Returns:
- this
AttributedElement
's type; nevernull
-
attributedType
Returns thisAttributedElement
'sAttributedType
.- Returns:
- this
AttributedElement
'sAttributedType
; nevernull
- See Also:
-
describeConstable
Returns anOptional
containing aConstantDesc
describing thisAttributedType
, or an emptyOptional
if it could not be described.- Specified by:
describeConstable
in interfaceConstable
- Returns:
- an
Optional
containing aConstantDesc
describing thisAttributedType
, or an emptyOptional
if it could not be describe; nevernull
-
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)
. -
element
-
attributes
Returns the value of theattributes
record component.- Returns:
- the value of the
attributes
record component
-