Interface SymbolResolver
public interface SymbolResolver
Resolves symbols from their global name. This abstracts over whether
we're looking on a classpath, in a file tree, in a serialized index, etc.
-
Method Summary
Modifier and TypeMethodDescriptionstatic SymbolResolver
layer
(SymbolResolver first, SymbolResolver... others) Produce a symbol resolver that asks the given resolvers in order.void
logStats()
Called at the end of the analysis in order to log out statistics of the resolved symbols.@Nullable JClassSymbol
resolveClassFromBinaryName
(@NonNull String binaryName) Resolves a class symbol from its canonical name.default @Nullable JClassSymbol
resolveClassFromCanonicalName
(@NonNull String canonicalName) Resolves a class symbol from its canonical name.@Nullable JModuleSymbol
resolveModule
(@NonNull String moduleName)
-
Method Details
-
resolveClassFromBinaryName
Resolves a class symbol from its canonical name. Periods ('.') will not be interpreted as nested-class separators, so this performs at most one classloader lookup. Note that external symbol resolvers do not need to implement lookup for primitive types, for local and anonymous classes, or for array classes. This is handled by the AST implementation or by the type system. Looking up such symbols is undefined behaviour. -
resolveModule
- Since:
- 7.5.0
-
resolveClassFromCanonicalName
Resolves a class symbol from its canonical name. Periods ('.') may be interpreted as nested-class separators, so for n segments, this performs at most n classloader lookups. -
layer
Produce a symbol resolver that asks the given resolvers in order.- Parameters:
first
- First resolverothers
- Rest of the resolvers
-
logStats
void logStats()Called at the end of the analysis in order to log out statistics of the resolved symbols.
-