-
Notifications
You must be signed in to change notification settings - Fork 30
Finding Types
Jon Schneider edited this page Nov 28, 2016
·
1 revision
You can locate the use of types anywhere in source code (excluding imports) with:
Tr.CompilationUnit cu = parser.parse(a)
List<NameTree> cu.refactor().findType("java.util.List");
Specifically, this finds types in:
- Annotations
- Array types
- Class declarations - in extends and implements clauses
- Method declarations - in return types and throws clauses
- Method invocations - in static method targets and type parameters
- Multi-catch statements
- Variable and multi-variable declarations
- New arrays
- New classes
- Parameterized types
- Type casts
- Bounded wildcards