Record Class AnnotationRecord
java.lang.Object
java.lang.Record
org.microbean.construct.element.AnnotationRecord
- Record Components:
delegate
- anAnnotationMirror
to which operations will be delegated; must not benull
domain
- 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
ConstructorDescriptionAnnotationRecord
(AnnotationMirror delegate, Domain domain) Creates a newAnnotationRecord
. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()
Returns the value of thedelegate
record component.domain()
Returns the value of thedomain
record component.final boolean
Indicates whether some other object is "equal to" this one.final UniversalType
final Map
<? extends UniversalElement, ? extends AnnotationValueRecord> final int
hashCode()
Returns a hash code value for this object.static final List
<? extends AnnotationRecord> of
(Collection<? extends AnnotationMirror> as, Domain domain) Returns a non-null
, immutableList
ofAnnotationRecord
s whose elements wrap the suppliedList
's elements.static final AnnotationRecord
of
(AnnotationMirror a, Domain d) Returns a non-null
AnnotationRecord
that is either the suppliedAnnotationMirror
(if it itself is anAnnotationRecord
) or one that wraps it.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AnnotationRecord
Creates a newAnnotationRecord
.- Parameters:
delegate
- anAnnotationMirror
to which operations will be delegated; must not benull
domain
- 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:
getAnnotationType
in interfaceAnnotationMirror
-
getElementValues
- Specified by:
getElementValues
in interfaceAnnotationMirror
-
hashCode
-
of
Returns a non-null
AnnotationRecord
that is either the suppliedAnnotationMirror
(if it itself is anAnnotationRecord
) or one that wraps it.- Parameters:
a
- anAnnotationMirror
; must not benull
d
- aDomain
; must not benull
- Returns:
- a non-
null
AnnotationRecord
- 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
, immutableList
ofAnnotationRecord
s whose elements wrap the suppliedList
's elements.- Parameters:
as
- aCollection
ofAnnotationMirror
s; must not benull
domain
- aDomain
; must not benull
- Returns:
- a non-
null
, immutableList
ofAnnotationRecord
s - Throws:
NullPointerException
- if either argument isnull
-
toString
-
delegate
-
domain
-