Skip to main content

Find reachable methods

io.moderne.azul.search.FindReachableMethods

Find all methods defined in the repository's source code that are reachable.

Recipe source

This recipe is only available to users of Moderne.

This recipe is available under the Moderne Proprietary License.

Options

TypeNameDescriptionExample
URLazulUrl'Azul Intelligence Cloud endpoint.https://YOUR_ENDPOINT.azul.com
StringazulApiKeyAPI key used to make REST requests to Azul Intelligence Cloud.your-api-key

Example

Parameters
ParameterValue
azulUrlURI.create(requireNonNull(properties.getProperty("azul.url"))).toURL()
azulApiKeyrequireNonNull(properties.getProperty("azul.key"))
Before
package io.moderne.api.gateway;
import java.security.Principal;
public class AuthenticationHelper {
public void getUserDetails(Principal principal) {
System.out.println("details");
}
}
After
package io.moderne.api.gateway;
import java.security.Principal;
public class AuthenticationHelper {
public void /*~~(11/23/2024 17:37:41)~~>*/getUserDetails(Principal principal) {
System.out.println("details");
}
}

Usage

This recipe has required configuration parameters and can only be run by users of Moderne. To run this recipe, you will need to provide the Moderne CLI run command with the required options. Or, if you'd like to create a declarative recipe, please see the below example of a rewrite.yml file:

rewrite.yml
---
type: specs.openrewrite.org/v1beta/recipe
name: com.yourorg.FindReachableMethodsExample
displayName: Find reachable methods example
recipeList:
- io.moderne.azul.search.FindReachableMethods:
azulUrl: https://YOUR_ENDPOINT.azul.com
azulApiKey: your-api-key

You will need to have configured the Moderne CLI on your machine before you can run the following command.

shell
mod run . --recipe FindReachableMethods --recipe-option "azulUrl=https://YOUR_ENDPOINT.azul.com" --recipe-option "azulApiKey=your-api-key"

If the recipe is not available locally, then you can install it using:

mod config recipes jar install org.openrewrite.recipe:rewrite-azul:0.2.0

See how this recipe works across multiple open-source repositories

Run this recipe on OSS repos at scale with the Moderne SaaS.

The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.

Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.

Data Tables

Reachable methods

io.moderne.azul.table.ReachableMethods

Methods in a repository's source code that are reachable. This data table does not contain information about reachability in libraries.

Column NameDescription
Class nameThe fully qualified name of the class that is reachable.
Method nameThe name of the method that is reachable along with its argument types.
Last usedThe date and time when the method was last used.
AppEnvThe 'AppEnv' as defined by Azul Intelligence Cloud.