Skip to content

Commit

Permalink
Keep existing interface methods
Browse files Browse the repository at this point in the history
  • Loading branch information
I-Al-Istannen committed Oct 5, 2024
1 parent 3096bab commit b99981e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ private void createExtractingMethods(CtType<?> type, CtInterface<?> assertInterf
Metamodel instance = Metamodel.getInstance();
MetamodelConcept concept = instance.getConcept((Class<? extends CtElement>) type.getActualClass());
TreeSet<CtMethod<?>> methods = new TreeSet<>(Comparator.comparing(CtMethod::getSimpleName));
methods.addAll(assertInterface.getMethods());

for (var entry : concept.getRoleToProperty().entrySet()) {
List<CtMethod<?>> declaredMethods = entry.getValue().getMethod(MMMethodKind.GET).getDeclaredMethods();
CtMethod<?> method = declaredMethods.stream().reduce((l, r) -> l.getType().isSubtypeOf(r.getType()) ? l : r).orElseThrow();
Expand Down

0 comments on commit b99981e

Please sign in to comment.