Module uses type

Apache 2.0

Intended to be used primarily as a precondition for other recipes, this recipe checks if a module uses a specified type. Only files belonging to modules that use the specified type are marked with a SearchResult marker. This is more specific than UsesType which only marks the files that directly use the type.

org.openrewrite.java.search.ModuleUsesType

Required

A fully-qualified type name, optionally with a * wildcard to match any type in a package or .. to match types in subpackages as well.

Optional

includeImplicitBoolean

When enabled, implicit usages of types (such as through method return types and parameter types) will also be considered. Default is false.

mod run . --recipe=org.openrewrite.java.search.ModuleUsesType \ -P fullyQualifiedTypeName='org.springframework..*'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.