Record Class AttributedType
java.lang.Object
java.lang.Record
org.microbean.bean.AttributedType
- Record Components:
type- aTypeMirrorattributes- aListofNamedAttributeMaps
- All Implemented Interfaces:
Constable
public record AttributedType(TypeMirror type, List<NamedAttributeMap<?>> attributes)
extends Record
implements Constable
- Author:
- Laird Nelson
-
Constructor Summary
ConstructorsConstructorDescriptionAttributedType(TypeMirror type) Creates a newAttributedType.AttributedType(TypeMirror type, List<NamedAttributeMap<?>> attributes) Creates a newAttributedType. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theattributesrecord component.Optional<? extends ConstantDesc> Returns anOptionalcontaining aConstantDescdescribing thisAttributedType, or an emptyOptionalif it could not be described.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.type()Returns the value of thetyperecord component.
-
Constructor Details
-
AttributedType
Creates a newAttributedType.- Parameters:
type- aTypeMirror; must not benull; must be a primitive, array or declared typeattributes- aListofNamedAttributeMaps; must not benull- Throws:
NullPointerException- if either argument isnullIllegalArgumentException- iftypeis the wrong kind of type
-
AttributedType
Creates a newAttributedType.- Parameters:
type- aTypeMirror; must not benull; must be a primitive, array or declared type- Throws:
NullPointerException- iftypeisnullIllegalArgumentException- iftypeis the wrong kind of type
-
-
Method Details
-
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
-
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). -
type
-
attributes
Returns the value of theattributesrecord component.- Returns:
- the value of the
attributesrecord component
-