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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static 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.
-
-
-
Method Detail
-
resolveClassFromBinaryName
@Nullable JClassSymbol resolveClassFromBinaryName(@NonNull String binaryName)
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.
-
resolveClassFromCanonicalName
default @Nullable JClassSymbol resolveClassFromCanonicalName(@NonNull String canonicalName)
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
static SymbolResolver layer(SymbolResolver first, SymbolResolver... others)
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.
-
-