import java.util.ArrayList; import java.util.Arrays; import java.util.List; public aspect RepositoryAspect { Object around(): execution(* JpaRepository.save*(..)) { System.out.println(thisJoinPoint); return proceed(); } public static void main(String[] args) { new RepositoryImpl().saveAll(Arrays.asList("One", "Two", "Three")); } } interface CrudRepository { Iterable saveAll(Iterable entities); } /* interface JpaRepository extends CrudRepository { @Override List saveAll(Iterable entities); } */ class RepositoryImpl implements JpaRepository { @Override public List saveAll(Iterable entities) { List entityList = new ArrayList<>(); entities.iterator().forEachRemaining(entityList::add); System.out.println("Saving " + entityList); return entityList; } }