hotspot/src/share/vm/classfile/jimage.hpp
changeset 37490 fd089d3f8cb3
parent 37489 b2812e811d0d
child 42609 601fb6316b0c
--- a/hotspot/src/share/vm/classfile/jimage.hpp	Mon Apr 25 09:59:07 2016 -0300
+++ b/hotspot/src/share/vm/classfile/jimage.hpp	Mon Apr 25 09:59:43 2016 -0300
@@ -179,3 +179,20 @@
 
 typedef void (*JImageResourceIterator_t)(JImageFile* jimage,
         JImageResourceVisitor_t visitor, void* arg);
+
+/*
+ * JIMAGE_ResourcePath- Given an open image file, a location reference, a buffer
+ * and a maximum buffer size, copy the path of the resource into the buffer.
+ * Returns false if not a valid location reference.
+ *
+ * Ex.
+ *   JImageLocationRef location = ...
+ *   char path[JIMAGE_MAX_PATH];
+ *    (*JImageResourcePath)(image, location, path, JIMAGE_MAX_PATH);
+ */
+extern "C" bool JIMAGE_ResourcePath(JImageFile* image, JImageLocationRef locationRef,
+                                    char* path, size_t max);
+
+typedef bool (*JImage_ResourcePath_t)(JImageFile* jimage, JImageLocationRef location,
+        char* buffer, jlong size);
+