Find files that have at least one use of a type

Apache 2.0

Marks files that have at least one occurrence of a type, even if the name of that type doesn't appear in the source code.

org.openrewrite.java.search.HasType

Required

A fully-qualified type name, that is used to find matching type references. Supports glob expressions. java..* finds every type from every subpackage of the java package.

Optional

checkAssignabilityBoolean

When enabled, find type references that are assignable to the provided type.

mod run . --recipe=org.openrewrite.java.search.HasType \ -P fullyQualifiedTypeName=java.util.List

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