Use the Reporting tool
Table of contents
- Introduction
- Pre-requisites
- Navigate to the Report page
- Write a query to search for deprecated classes
- Save and/or export results
Introduction
With the Reporting tool, you can query scanned data to find patterns of relationships between nodes. A useful first example might be identifying classes in a Java application that are marked as deprecated.
Pre-requisites
This guide covers a simple example of querying for @Deprecated
annotations in a Java project. In order to try it
yourself, you will need to scan a Java project.
You will also need to create a Workspace that contains the Java project you scanned.
Navigate to the Report page
- Click on "Search" in the left hand navigation (you may already be on this page, as it is the default landing page).
- Select the workspace with your Java project in the Application header (In this example it is called "salary-app").
- At the top of the Search page, click on the "Reporting" tab, next to the "Search" tab.
Write a query to search for deprecated classes
-
Fill in a minimum set of fields to run an initial query
-
Narrow your query to a "source" application, by selecting your application from the list under "Within applications" in the "source" column.
- Under the "source" column, add "ClassEntity" to the "With Types" selector.
- Under the "relationship" column, add "ANNOTATED_BY" to the "With Types" selector.
- Under the "target" column, add "InterfaceEntity" to the "With Types" selector.
- Under both the "source" and "target" columns, select 'identity' and 'name' from the "Select Fields" inputs.
You should see an initial result set. To narrow the Results to Deprecated fields, Type "Deprecated" into the filter "target identity" column.
Save and/or export results
Once the query is tuned to your satisfaction, save it by clicking on the "Save As" button.
You can also export and download the full results of the query as a CSV file.