Interface Aggregate
By default, Aggregates have no dependencies.
- Author:
- Laird Nelson
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SequencedSet<Assignment<?>> An immutable, emptySequencedSetofAssignments.static final SequencedSet<AttributedElement> An immutable, emptySequencedSetofAttributedElements. -
Method Summary
Modifier and TypeMethodDescriptiondefault SequencedSet<? extends Assignment<?>> assign(Function<? super AttributedType, ?> r) A convenience method that assigns a contextual reference to each of thisAggregate'sAttributedElementinstances and returns the resultingSequencedSetofAssignments.default SequencedSet<AttributedElement> Returns an immutable, determinate,SequencedSetofAttributedElementinstances.
-
Field Details
-
EMPTY_ASSIGNMENTS
An immutable, emptySequencedSetofAssignments. -
EMPTY_DEPENDENCIES
An immutable, emptySequencedSetofAttributedElements.
-
-
Method Details
-
dependencies
Returns an immutable, determinate,SequencedSetofAttributedElementinstances.If an
AttributedElementin the set returns aTypeElementfrom itsAttributedElement.element()method that represents thisAggregateimplementation, undefined behavior, including the possibility of infinite loops, may result (anAggregatemay not have itself as a dependency).Note that it is permissible for an
AttributedElementin the set to refer to another type by returning aTypeElementfrom itsAttributedElement.element()method.The default implementation of this method returns the value of the
EMPTY_DEPENDENCIESfield.- Returns:
- an immutable, determinate,
SequencedSetofAttributedElementinstances; nevernull - See Also:
-
assign
A convenience method that assigns a contextual reference to each of thisAggregate'sAttributedElementinstances and returns the resultingSequencedSetofAssignments.Note: Undefined behavior may result if an
AttributedElementin the dependencies represents thisAggregateimplementation (anAggregatemay not have itself as a dependency).Typically there is no need to override this method.
Usage of this method is not required.
- Parameters:
r- aFunctionthat retrieves a contextual reference suitable for anAttributedType; ifdependencies()returns a non-emptySequencedSetthen this argument must not benull- Returns:
- an immutable
SequencedSetofAssignmentinstances; nevernull - Throws:
NullPointerException- ifrisnull
-