Class RepeatableAnnotations<SINGULAR extends org.mapstruct.tools.gem.Gem,​MULTIPLE extends org.mapstruct.tools.gem.Gem,​OPTIONS>

  • 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
    Author:
    Ben Zegveld
    • Constructor Detail

      • RepeatableAnnotations

        protected RepeatableAnnotations​(ElementUtils elementUtils,
                                        String singularFqn,
                                        String multipleFqn)
    • Method Detail

      • singularInstanceOn

        protected abstract SINGULAR singularInstanceOn​(Element element)
        Parameters:
        element - the element on which the Gem needs to be found
        Returns:
        the Gem found on the element.
      • multipleInstanceOn

        protected abstract MULTIPLE multipleInstanceOn​(Element element)
        Parameters:
        element - the element on which the Gems needs to be found
        Returns:
        the Gems found on the element.
      • addInstance

        protected abstract void addInstance​(SINGULAR gem,
                                            Element source,
                                            Set<OPTIONS> mappings)
        Parameters:
        gem - the annotation gem to be processed
        source - the source element where the request originated from
        mappings - the collection of completed processing
      • addInstances

        protected abstract void addInstances​(MULTIPLE gems,
                                             Element source,
                                             Set<OPTIONS> mappings)
        Parameters:
        gems - the annotation gems to be processed
        source - the source element where the request originated from
        mappings - the collection of completed processing
      • getProcessedAnnotations

        public Set<OPTIONS> getProcessedAnnotations​(Element source)
        Retrieves the processed annotations.
        Parameters:
        source - The source element of interest
        Returns:
        The processed annotations for the given element