Package org.openrewrite.java.internal
Class JavaSourceSetCompat
java.lang.Object
org.openrewrite.java.internal.JavaSourceSetCompat
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
when they are absent.
invalid reference
JavaSourceSet#getClasspath()
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.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Stream<JavaType.FullyQualified> classpathTypesInPackage(JavaSourceSet jss, String packageName) static Optional<JavaType.FullyQualified> findClasspathType(JavaSourceSet jss, String fqn)
-
Method Details
-
findClasspathType
-
classpathTypesInPackage
public static Stream<JavaType.FullyQualified> classpathTypesInPackage(JavaSourceSet jss, String packageName)
-