use of org.mapstruct.ap.internal.util.accessor.ExecutableElementAccessor in project mapstruct by mapstruct.
the class Executables method addNotYetOverridden.
/**
* @param alreadyCollected methods that have already been collected and to which the not-yet-overridden methods will
* be added
* @param methodsToAdd methods to add to alreadyAdded, if they are not yet overridden by an element in the list
* @param parentType the type for with elements are collected
*/
private static void addNotYetOverridden(Elements elementUtils, List<Accessor> alreadyCollected, List<ExecutableElement> methodsToAdd, TypeElement parentType) {
List<Accessor> safeToAdd = new ArrayList<Accessor>(methodsToAdd.size());
for (ExecutableElement toAdd : methodsToAdd) {
if (isNotObjectEquals(toAdd) && wasNotYetOverridden(elementUtils, alreadyCollected, toAdd, parentType)) {
safeToAdd.add(new ExecutableElementAccessor(toAdd));
}
}
alreadyCollected.addAll(0, safeToAdd);
}
Aggregations