Package org.mapstruct.ap.internal.util
Class RepeatableAnnotations<SINGULAR extends org.mapstruct.tools.gem.Gem,MULTIPLE extends org.mapstruct.tools.gem.Gem,OPTIONS>
java.lang.Object
org.mapstruct.ap.internal.util.RepeatableAnnotations<SINGULAR,MULTIPLE,OPTIONS>
- Type Parameters:
SINGULAR- The singular annotation typeMULTIPLE- The multiple annotation typeOPTIONS- The underlying holder for the processed annotations
- Direct Known Subclasses:
AdditionalAnnotationsBuilder
public abstract class RepeatableAnnotations<SINGULAR extends org.mapstruct.tools.gem.Gem,MULTIPLE extends org.mapstruct.tools.gem.Gem,OPTIONS>
extends Object
A base helper class that provides utility methods for working with repeatable annotations.
- Author:
- Ben Zegveld
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRepeatableAnnotations(ElementUtils elementUtils, String singularFqn, String multipleFqn) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidaddInstance(SINGULAR gem, Element source, Set<OPTIONS> mappings) protected abstract voidaddInstances(MULTIPLE gems, Element source, Set<OPTIONS> mappings) getProcessedAnnotations(Element source) Retrieves the processed annotations.protected abstract MULTIPLEmultipleInstanceOn(Element element) protected abstract SINGULARsingularInstanceOn(Element element)
-
Constructor Details
-
RepeatableAnnotations
-
-
Method Details
-
singularInstanceOn
- Parameters:
element- the element on which the Gem needs to be found- Returns:
- the Gem found on the element.
-
multipleInstanceOn
- Parameters:
element- the element on which the Gems needs to be found- Returns:
- the Gems found on the element.
-
addInstance
- Parameters:
gem- the annotation gem to be processedsource- the source element where the request originated frommappings- the collection of completed processing
-
addInstances
- Parameters:
gems- the annotation gems to be processedsource- the source element where the request originated frommappings- the collection of completed processing
-
getProcessedAnnotations
Retrieves the processed annotations.- Parameters:
source- The source element of interest- Returns:
- The processed annotations for the given element
-