diff graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java @ 9986:4f542ceb5fed

added VerifyHotSpotOptionsPhase to ensure that global state is not initialized from options prior to command line parsing
author Doug Simon <doug.simon@oracle.com>
date Tue, 11 Jun 2013 01:31:47 +0200
parents af909f4b80a9
children 582b3d24c6ad
line wrap: on
line diff
--- a/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java	Tue Jun 11 01:18:57 2013 +0200
+++ b/graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionDescriptor.java	Tue Jun 11 01:31:47 2013 +0200
@@ -32,14 +32,16 @@
     protected final Class type;
     protected final String help;
     protected final OptionValue<?> option;
-    protected final String location;
+    protected final Class<?> declaringClass;
+    protected final String fieldName;
 
-    public OptionDescriptor(String name, Class type, String help, String location, OptionValue<?> option) {
+    public OptionDescriptor(String name, Class type, String help, Class<?> declaringClass, String fieldName, OptionValue<?> option) {
         this.name = name;
         this.type = type;
         this.help = help;
         this.option = option;
-        this.location = location;
+        this.declaringClass = declaringClass;
+        this.fieldName = fieldName;
     }
 
     /**
@@ -71,11 +73,18 @@
         return option;
     }
 
+    public Class<?> getDeclaringClass() {
+        return declaringClass;
+    }
+
+    public String getFieldName() {
+        return fieldName;
+    }
+
     /**
      * Gets a description of the location where this option is stored.
      */
     public String getLocation() {
-        return location;
-
+        return getDeclaringClass().getName() + "." + getFieldName();
     }
 }