String (MavenProject project, boolean test, boolean source) { if (test) { return source ? project.getTestSourceLevel() : project.getTestTargetLevel(); } else { return source ? project.getSourceLevel() : project.getTargetLevel(); } }