< prev index next >

src/jdk.internal.vm.compiler/share/classes/org.graalvm.compiler.options.processor/src/org/graalvm/compiler/options/processor/OptionProcessor.java

Print this page

        

@@ -392,10 +392,13 @@
                 OptionsInfo options = map.get(topDeclaringType);
                 if (options == null) {
                     options = new OptionsInfo(topDeclaringType);
                     map.put(topDeclaringType, options);
                 }
+                if (!element.getEnclosingElement().getSimpleName().toString().endsWith("Options")) {
+                    processingEnv.getMessager().printMessage(Kind.ERROR, "Option declaring classes must have a name that ends with 'Options'", element.getEnclosingElement());
+                }
                 processElement(element, options);
             }
         }
 
         boolean ok = true;
< prev index next >