Currently there is no way to find out where a ResolvedJavaType comes from. Java's concept of classloaders as the origin of the classes it loads and unloads has no representation in JVMCI yet.
These concepts should be added as the following methods on ResolvedJavaType:
/**
* Returns equivalent of `Class.getProtectionDomain().getCodeSource().getLocation()`.
*/
URL getCodeLocation();
/**
* Gets an opaque handle to the ClassLoader for this type.
*/
JavaConstant getLoader();
/**
* Checks whether this type is a {@link Record}.
* @return true if this type is a {@link Record}
*/
boolean isRecord();
These concepts should be added as the following methods on ResolvedJavaType:
/**
* Returns equivalent of `Class.getProtectionDomain().getCodeSource().getLocation()`.
*/
URL getCodeLocation();
/**
* Gets an opaque handle to the ClassLoader for this type.
*/
JavaConstant getLoader();
/**
* Checks whether this type is a {@link Record}.
* @return true if this type is a {@link Record}
*/
boolean isRecord();