annotate jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/FieldUniverse.java @ 24137:6523380966cd

Merge.
author Doug Simon <doug.simon@oracle.com>
date Fri, 19 May 2017 14:05:50 +0200
parents 1bbd4a7c274b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 /*
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 * accompanied this code).
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 *
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 * or visit www.oracle.com if you need additional information or have any
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 * questions.
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 */
22672
1bbd4a7c274b Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22569
diff changeset
23 package jdk.vm.ci.runtime.test;
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
24
22569
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22054
diff changeset
25 import java.lang.reflect.Field;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22054
diff changeset
26 import java.util.HashMap;
ec96f33a101d updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents: 22054
diff changeset
27 import java.util.Map;
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28
22672
1bbd4a7c274b Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents: 22569
diff changeset
29 import jdk.vm.ci.meta.ResolvedJavaField;
22054
0e095e2c24e2 Rename com.oracle.jvmci to jdk.internal.jvmci
twisti
parents: 21798
diff changeset
30
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 /**
21556
48c1ebd24120 renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents: 21555
diff changeset
32 * Context for field related tests.
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 */
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34 public class FieldUniverse extends TypeUniverse {
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
36 public static final Map<Field, ResolvedJavaField> fields = new HashMap<>();
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37
21663
381ab4105afe moved com.oracle.graal.java.test to com.oracle.jvmci.runtime.test
Doug Simon <doug.simon@oracle.com>
parents: 21556
diff changeset
38 {
15040
288c23143d47 Fix most raw type references.
Josef Eisl <josef.eisl@jku.at>
parents: 13818
diff changeset
39 for (Class<?> c : classes) {
13818
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 for (Field f : c.getDeclaredFields()) {
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 ResolvedJavaField field = metaAccess.lookupJavaField(f);
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42 fields.put(f, field);
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
45 }
d2f520f46180 added more unit tests for meta.api, discovering and fixing an issue with HotSpotResolvedJavaField.getModifiers() in the process
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46 }