Record Class AnnotationRecord
java.lang.Object
java.lang.Record
org.microbean.construct.element.AnnotationRecord
- Record Components:
delegate- anAnnotationMirrorto which operations will be delegated; must not benulldomain- aDomain; must not benull
- All Implemented Interfaces:
AnnotationMirror
public record AnnotationRecord(AnnotationMirror delegate, Domain domain)
extends Record
implements AnnotationMirror
An
AnnotationMirror implementation.- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationRecord(AnnotationMirror delegate, Domain domain) Creates a newAnnotationRecord. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()Returns the value of thedelegaterecord component.domain()Returns the value of thedomainrecord component.final booleanIndicates whether some other object is "equal to" this one.final UniversalTypefinal Map<? extends UniversalElement, ? extends AnnotationValueRecord> final inthashCode()Returns a hash code value for this object.static final List<? extends AnnotationRecord> of(Collection<? extends AnnotationMirror> as, Domain domain) Returns a non-null, immutableListofAnnotationRecords whose elements wrap the suppliedList's elements.static final AnnotationRecordof(AnnotationMirror a, Domain d) Returns a non-nullAnnotationRecordthat is either the suppliedAnnotationMirror(if it itself is anAnnotationRecord) or one that wraps it.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AnnotationRecord
Creates a newAnnotationRecord.- Parameters:
delegate- anAnnotationMirrorto which operations will be delegated; must not benulldomain- aDomain; must not benull- Throws:
NullPointerException- if either argument isnull
-
-
Method Details
-
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). -
getAnnotationType
- Specified by:
getAnnotationTypein interfaceAnnotationMirror
-
getElementValues
- Specified by:
getElementValuesin interfaceAnnotationMirror
-
hashCode
-
of
Returns a non-nullAnnotationRecordthat is either the suppliedAnnotationMirror(if it itself is anAnnotationRecord) or one that wraps it.- Parameters:
a- anAnnotationMirror; must not benulld- aDomain; must not benull- Returns:
- a non-
nullAnnotationRecord - Throws:
NullPointerException- if either argument isnull- See Also:
-
of
public static final List<? extends AnnotationRecord> of(Collection<? extends AnnotationMirror> as, Domain domain) Returns a non-null, immutableListofAnnotationRecords whose elements wrap the suppliedList's elements.- Parameters:
as- aCollectionofAnnotationMirrors; must not benulldomain- aDomain; must not benull- Returns:
- a non-
null, immutableListofAnnotationRecords - Throws:
NullPointerException- if either argument isnull
-
toString
-
delegate
-
domain
-