Class JavaSourceSetCompat

java.lang.Object
org.openrewrite.java.internal.JavaSourceSetCompat

public final class JavaSourceSetCompat extends Object
Compatibility shim for JavaSourceSet.findClasspathType(java.lang.String) and JavaSourceSet.classpathTypesInPackage(java.lang.String), which were added in rewrite-java 8.82.0.

Recipe code that ships with rewrite-java ≥ 8.82 may call those methods directly only if it can require an equally-new host. Recipes that may run on older hosts should route through this shim, which probes for the methods at class-init time and falls back to a streaming scan on the existing

invalid reference
JavaSourceSet#getClasspath()
when they are absent.

Once 8.82.0 is the established CLI/SaaS floor for all consumers, the call sites can be inlined back to direct method invocations and this class deleted.