public class SourceManager extends Object
Modifier and Type | Field and Description |
---|---|
static String[] |
GRAALVM_SRC_PACKAGE_PREFIXES
A whitelist of packages prefixes used to pre-filter GraalVM class lookups.
|
static String[] |
JDK_SRC_PACKAGE_PREFIXES
A whitelist of packages prefixes used to pre-filter JDK runtime class lookups.
|
Constructor and Description |
---|
SourceManager() |
Modifier and Type | Method and Description |
---|---|
Path |
findAndCacheSource(jdk.vm.ci.meta.ResolvedJavaType resolvedType,
Class<?> clazz)
Find and cache a source file for a given Java class and return a Path to the file relative to
the source.
|
Path |
getCachePathForSource(jdk.vm.ci.meta.ResolvedJavaType resolvedType)
Get the cache Path of the source file for a given Java class.
|
public static final String[] JDK_SRC_PACKAGE_PREFIXES
public static final String[] GRAALVM_SRC_PACKAGE_PREFIXES
public Path findAndCacheSource(jdk.vm.ci.meta.ResolvedJavaType resolvedType, Class<?> clazz)
resolvedType
- the Java type whose source file should be located and cachedclazz
- the Java class associated with the resolved typepublic Path getCachePathForSource(jdk.vm.ci.meta.ResolvedJavaType resolvedType)
resolvedType
- the Java type whose source file should be located and cachednull
if a source file cannot be found or cached.