Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java @ 22672:1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
author | Tom Rodriguez <tom.rodriguez@oracle.com> |
---|---|
date | Thu, 08 Oct 2015 17:28:41 -0700 |
parents | jvmci/jdk.internal.jvmci.meta/src/jdk/internal/jvmci/meta/ResolvedJavaType.java@ec96f33a101d |
children | 87394b31a42e |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22516
diff
changeset
|
2 * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@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.meta; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
25 import java.lang.annotation.Annotation; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
26 import java.net.URL; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22569
diff
changeset
|
28 import jdk.vm.ci.meta.Assumptions.AssumptionResult; |
19800
3362ba500371
Connect required Assumptions with answer to CHA query
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
18950
diff
changeset
|
29 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 /** |
7671
8beb61af377a
Typo in comment
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7530
diff
changeset
|
31 * Represents a resolved Java type. Types include primitives, objects, {@code void}, and arrays |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
32 * thereof. Types, like fields and methods, are resolved through {@link ConstantPool constant pools} |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
33 * . |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 */ |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
35 public interface ResolvedJavaType extends JavaType, ModifiersProvider { |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 /** |
18361
6ac7e9c85be6
Split getEncoding into two methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
18195
diff
changeset
|
37 * Gets the runtime representation of the Java class object of this type. |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
38 */ |
18361
6ac7e9c85be6
Split getEncoding into two methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
18195
diff
changeset
|
39 JavaConstant getJavaClass(); |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
40 |
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
41 /** |
18361
6ac7e9c85be6
Split getEncoding into two methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
18195
diff
changeset
|
42 * Gets the runtime representation of the "hub" of this type--that is, the closest part of the |
6ac7e9c85be6
Split getEncoding into two methods.
Roland Schatz <roland.schatz@oracle.com>
parents:
18195
diff
changeset
|
43 * type representation which is typically stored in the object header. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 */ |
18362
ea0fbb571466
Use pointer stamps in LoadHub and LoadMethod.
Roland Schatz <roland.schatz@oracle.com>
parents:
18361
diff
changeset
|
45 Constant getObjectHub(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
48 * Checks whether this type has a finalizer method. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
49 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
50 * @return {@code true} if this class has a finalizer |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
52 boolean hasFinalizer(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
53 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
55 * Checks whether this type has any finalizable subclasses so far. Any decisions based on this |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
56 * information require the registration of a dependency, since this information may change. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
57 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 * @return {@code true} if this class has any subclasses with finalizers |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 */ |
19800
3362ba500371
Connect required Assumptions with answer to CHA query
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
18950
diff
changeset
|
60 AssumptionResult<Boolean> hasFinalizableSubclass(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 * Checks whether this type is an interface. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
64 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 * @return {@code true} if this type is an interface |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 boolean isInterface(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 * Checks whether this type is an instance class. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
71 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 * @return {@code true} if this type is an instance class |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 boolean isInstanceClass(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
76 /** |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 * Checks whether this type is an array class. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
78 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 * @return {@code true} if this type is an array class |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
80 */ |
7060
06d5f450f32b
rename: ResolvedJavaType.isArrayClass() -> ResolvedJavaType.isArray()
Doug Simon <doug.simon@oracle.com>
parents:
7059
diff
changeset
|
81 boolean isArray(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 /** |
7059
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
84 * Checks whether this type is primitive. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
85 * |
7059
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
86 * @return {@code true} if this type is primitive |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
87 */ |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
88 boolean isPrimitive(); |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
89 |
e4d9f153934f
removed ResolvedJavaType.toJava() and introduced ResolvedJavaType.isPrimitive()
Doug Simon <doug.simon@oracle.com>
parents:
7057
diff
changeset
|
90 /** |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
91 * {@inheritDoc} |
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
92 * <p> |
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
93 * Only the flags specified in the JVM specification will be included in the returned mask. This |
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
94 * method is identical to {@link Class#getModifiers()} in terms of the value return for this |
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
95 * type. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 */ |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
97 int getModifiers(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 |
22032
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
99 /* |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
100 * The setting of the final bit for types is a bit confusing since arrays are marked as final. |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
101 * This method provides a semantically equivalent test that appropriate for types. |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
102 */ |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
103 default boolean isLeaf() { |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
104 return getElementalType().isFinalFlagSet(); |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
105 } |
d1a41fbfcfd2
Replace ResolvedJavaType.isFinal with more meaningful and correct isLeaf
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22012
diff
changeset
|
106 |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 /** |
11583
69881bec003c
Fix some comment formatting and spelling
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
11520
diff
changeset
|
108 * Checks whether this type is initialized. If a type is initialized it implies that it was |
11520
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
109 * {@link #isLinked() linked} and that the static initializer has run. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
110 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 * @return {@code true} if this type is initialized |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 boolean isInitialized(); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 /** |
6549
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
116 * Initializes this type. |
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
117 */ |
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
118 void initialize(); |
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
119 |
15e04f248d6b
Add functionality to initialize a type
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6539
diff
changeset
|
120 /** |
11520
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
121 * Checks whether this type is linked and verified. When a type is linked the static initializer |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
122 * has not necessarily run. An {@link #isInitialized() initialized} type is always linked. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
123 * |
11520
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
124 * @return {@code true} if this type is linked |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
125 */ |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
126 boolean isLinked(); |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
127 |
7cca436d600b
Add isLinked method to ResolvedJavaType
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
9837
diff
changeset
|
128 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
129 * Determines if this type is either the same as, or is a superclass or superinterface of, the |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
130 * type represented by the specified parameter. This method is identical to |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
131 * {@link Class#isAssignableFrom(Class)} in terms of the value return for this type. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 */ |
7097
6644cecbd3a7
Replace ResolvedJavaType.isAssignableTo with isAssignableFrom to be consistent with java.lang.Class
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7096
diff
changeset
|
133 boolean isAssignableFrom(ResolvedJavaType other); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
134 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 /** |
16491
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
136 * Returns true if this type is exactly the type {@link java.lang.Object}. |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
137 */ |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
138 default boolean isJavaLangObject() { |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
139 // Removed assertion due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=434442 |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22516
diff
changeset
|
140 return getSuperclass() == null && !isInterface() && getJavaKind() == JavaKind.Object; |
16491
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
141 } |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
142 |
4d7a9829315e
moved isJavaLangObject(ResolvedJavaType type) from MetaUtil to be a default method in ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
16476
diff
changeset
|
143 /** |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
144 * Checks whether the specified object is an instance of this type. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
145 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
146 * @param obj the object to test |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
147 * @return {@code true} if the object is an instance of this type |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
148 */ |
18187
9619ba4daf4c
Rename Constant to JavaConstant.
Roland Schatz <roland.schatz@oracle.com>
parents:
18182
diff
changeset
|
149 boolean isInstance(JavaConstant obj); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
150 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
151 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
152 * Returns this type if it is an exact type otherwise returns null. This type is exact if it is |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
153 * void, primitive, final, or an array of a final or primitive type. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
154 * |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
155 * @return this type if it is exact; {@code null} otherwise |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
156 */ |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
157 ResolvedJavaType asExactType(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
158 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
159 /** |
17154
7716c6993546
Stamp: interface types can not be trusted except after explicit runtime checks
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
160 * Gets the super class of this type. If this type represents either the {@code Object} class, |
7716c6993546
Stamp: interface types can not be trusted except after explicit runtime checks
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
161 * an interface, a primitive type, or void, then null is returned. If this object represents an |
7716c6993546
Stamp: interface types can not be trusted except after explicit runtime checks
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
16492
diff
changeset
|
162 * array class then the type object representing the {@code Object} class is returned. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
163 */ |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
164 ResolvedJavaType getSuperclass(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
165 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
166 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
167 * Gets the interfaces implemented or extended by this type. This method is analogous to |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
168 * {@link Class#getInterfaces()} and as such, only returns the interfaces directly implemented |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
169 * or extended by this type. |
6699
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
170 */ |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
171 ResolvedJavaType[] getInterfaces(); |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
172 |
d79098b9db3b
Support for interfaces in the Graal API: Make interfaces implemented by a ResolvedJavaType available; change semantics of ResolvedJavaType.getSuperclass to return null for interfaces (to conform with java.lang.Class); change semantics of ResolvedJavaType.isInstanceClass to return false for interfaces.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6549
diff
changeset
|
173 /** |
18194
b7226cb963c3
Rename ResolvedJavaType.getImplementor() to getSingleImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18193
diff
changeset
|
174 * Gets the single implementor of this type. Calling this method on a non-interface type causes |
b7226cb963c3
Rename ResolvedJavaType.getImplementor() to getSingleImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18193
diff
changeset
|
175 * an exception. |
18195
62d3440228b8
Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18194
diff
changeset
|
176 * <p> |
62d3440228b8
Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18194
diff
changeset
|
177 * If the compiler uses the result of this method for its compilation, the usage must be guarded |
62d3440228b8
Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18194
diff
changeset
|
178 * because the verifier can not guarantee that the assigned type really implements this |
62d3440228b8
Improve javadoc for ResolvedJavaType.getSingleImplementor() and CompilerToVM.getKlassImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18194
diff
changeset
|
179 * interface. Additionally, class loading can invalidate the result of this method. |
18182
e8c54fd622a4
Add ResolvedJavaType.getImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
17156
diff
changeset
|
180 * |
18193
0a17944b7baf
Throw an exception if ResolvedJavaType.getImplementor() is called with a non-interface type.
Josef Eisl <josef.eisl@jku.at>
parents:
18192
diff
changeset
|
181 * @return {@code null} if there is no implementor, the implementor if there is only one, or |
0a17944b7baf
Throw an exception if ResolvedJavaType.getImplementor() is called with a non-interface type.
Josef Eisl <josef.eisl@jku.at>
parents:
18192
diff
changeset
|
182 * {@code this} if there are more than one. |
18182
e8c54fd622a4
Add ResolvedJavaType.getImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
17156
diff
changeset
|
183 */ |
18194
b7226cb963c3
Rename ResolvedJavaType.getImplementor() to getSingleImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
18193
diff
changeset
|
184 ResolvedJavaType getSingleImplementor(); |
18182
e8c54fd622a4
Add ResolvedJavaType.getImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
17156
diff
changeset
|
185 |
e8c54fd622a4
Add ResolvedJavaType.getImplementor().
Josef Eisl <josef.eisl@jku.at>
parents:
17156
diff
changeset
|
186 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
187 * Walks the class hierarchy upwards and returns the least common class that is a superclass of |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
188 * both the current and the given type. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
189 * |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
190 * @return the least common type that is a super type of both the current and the given type, or |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
191 * {@code null} if primitive types are involved. |
4635
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
192 */ |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
193 ResolvedJavaType findLeastCommonAncestor(ResolvedJavaType otherType); |
4635
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
194 |
f35c183f33ce
fixed checkcast when inlining more than one method
Christian Haeubl <christian.haeubl@oracle.com>
parents:
4199
diff
changeset
|
195 /** |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
196 * Attempts to get a leaf concrete subclass of this type. |
7043
947de43c68d6
improved documentation for ResolvedJavaType.findUniqueConcreteSubtype()
Doug Simon <doug.simon@oracle.com>
parents:
7037
diff
changeset
|
197 * <p> |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
198 * For an {@linkplain #isArray() array} type A, the leaf concrete subclass is A if the |
16476
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
199 * {@linkplain #getElementalType() elemental} type of A is final (which includes primitive |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
200 * types). Otherwise {@code null} is returned for A. |
7043
947de43c68d6
improved documentation for ResolvedJavaType.findUniqueConcreteSubtype()
Doug Simon <doug.simon@oracle.com>
parents:
7037
diff
changeset
|
201 * <p> |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
202 * For a non-array type T, the result is the leaf concrete type in the current hierarchy of T. |
7043
947de43c68d6
improved documentation for ResolvedJavaType.findUniqueConcreteSubtype()
Doug Simon <doug.simon@oracle.com>
parents:
7037
diff
changeset
|
203 * <p> |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
204 * A runtime may decide not to manage or walk a large hierarchy and so the result is |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
205 * conservative. That is, a non-null result is guaranteed to be the leaf concrete class in T's |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
206 * hierarchy <b>at the current point in time</b> but a null result does not necessarily imply |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
207 * that there is no leaf concrete class in T's hierarchy. |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
208 * <p> |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
209 * If the compiler uses the result of this method for its compilation, it must register the |
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
210 * {@link AssumptionResult} in its {@link Assumptions} because dynamic class loading can |
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
211 * invalidate the result of this method. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
212 * |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
213 * @return an {@link AssumptionResult} containing the leaf concrete subclass for this type as |
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
214 * described above |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
215 */ |
19801
deab43a789ad
Split LeafType off from ConcreteSubtype
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
19800
diff
changeset
|
216 AssumptionResult<ResolvedJavaType> findLeafConcreteSubtype(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
217 |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
218 ResolvedJavaType getComponentType(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
219 |
16476
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
220 default ResolvedJavaType getElementalType() { |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
221 ResolvedJavaType t = this; |
16492
8853b9304083
made type resolution require an accessing class context
Doug Simon <doug.simon@oracle.com>
parents:
16491
diff
changeset
|
222 while (t.isArray()) { |
16476
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
223 t = t.getComponentType(); |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
224 } |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
225 return t; |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
226 } |
92f75d104b4b
moved getElementalType() from MetaUtil to be a default method in JavaType
Doug Simon <doug.simon@oracle.com>
parents:
15839
diff
changeset
|
227 |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
228 ResolvedJavaType getArrayClass(); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
229 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
230 /** |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
231 * Resolves the method implementation for virtual dispatches on objects of this dynamic type. |
18192
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
232 * This resolution process only searches "up" the class hierarchy of this type. |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
233 * |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
234 * @param method the method to select the implementation of |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
235 * @param callerType the caller or context type used to perform access checks |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
236 * @return the link-time resolved method (might be abstract) or {@code null} if it can not be |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
237 * linked |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
238 */ |
22165
af6cc957bf04
Remove dummy parameter `includeAbstract` from `ResolvedJavaType#resolveMethod()`;
Josef Eisl <josef.eisl@jku.at>
parents:
22054
diff
changeset
|
239 ResolvedJavaMethod resolveMethod(ResolvedJavaMethod method, ResolvedJavaType callerType); |
18192
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
240 |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
241 /** |
660875e586f0
Add ResolvedJavaType.resolveMethod() (get the like-time resolved method).
Josef Eisl <josef.eisl@jku.at>
parents:
18191
diff
changeset
|
242 * Resolves the method implementation for virtual dispatches on objects of this dynamic type. |
11823
6440f50c1ea8
improved documentation and testing for ResolvedJavaType.resolveMethod() (GRAAL-489)
Doug Simon <doug.simon@oracle.com>
parents:
11583
diff
changeset
|
243 * This resolution process only searches "up" the class hierarchy of this type. A broader search |
6440f50c1ea8
improved documentation and testing for ResolvedJavaType.resolveMethod() (GRAAL-489)
Doug Simon <doug.simon@oracle.com>
parents:
11583
diff
changeset
|
244 * that also walks "down" the hierarchy is implemented by |
6440f50c1ea8
improved documentation and testing for ResolvedJavaType.resolveMethod() (GRAAL-489)
Doug Simon <doug.simon@oracle.com>
parents:
11583
diff
changeset
|
245 * {@link #findUniqueConcreteMethod(ResolvedJavaMethod)}. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
246 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
247 * @param method the method to select the implementation of |
15784
fb530b9fa474
ResolvedJavaType.resolveMethod: fix javadoc, add assert in native code. update changelog
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15722
diff
changeset
|
248 * @param callerType the caller or context type used to perform access checks |
11823
6440f50c1ea8
improved documentation and testing for ResolvedJavaType.resolveMethod() (GRAAL-489)
Doug Simon <doug.simon@oracle.com>
parents:
11583
diff
changeset
|
249 * @return the concrete method that would be selected at runtime, or {@code null} if there is no |
6440f50c1ea8
improved documentation and testing for ResolvedJavaType.resolveMethod() (GRAAL-489)
Doug Simon <doug.simon@oracle.com>
parents:
11583
diff
changeset
|
250 * concrete implementation of {@code method} in this type or any of its superclasses |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
251 */ |
18191
839f97696479
Rename ResolvedJavaMethod.resolvedMethod() to resolveConcreteMethod() the reflect its actual behavior.
Josef Eisl <josef.eisl@jku.at>
parents:
18187
diff
changeset
|
252 ResolvedJavaMethod resolveConcreteMethod(ResolvedJavaMethod method, ResolvedJavaType callerType); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
253 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
254 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
255 * Given a {@link ResolvedJavaMethod} A, returns a concrete {@link ResolvedJavaMethod} B that is |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
256 * the only possible unique target for a virtual call on A(). Returns {@code null} if either no |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
257 * such concrete method or more than one such method exists. Returns the method A if A is a |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
258 * concrete method that is not overridden. |
6539
2463eb24b644
Cleanup of Graal API: Rename methods so that it follows the getXxx naming convention and so that they are similar to the names of the java.lang.reflect classes. Remove unused methods.
Christian Wimmer <christian.wimmer@oracle.com>
parents:
6429
diff
changeset
|
259 * <p> |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
260 * If the compiler uses the result of this method for its compilation, it must register an |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
261 * assumption because dynamic class loading can invalidate the result of this method. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
262 * |
7037
dd81042f4eb1
added unit tests for ResolvedJavaType
Doug Simon <doug.simon@oracle.com>
parents:
7015
diff
changeset
|
263 * @param method the method A for which a unique concrete target is searched |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
264 * @return the unique concrete target or {@code null} if no such target exists or assumptions |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
265 * are not supported by this runtime |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
266 */ |
19800
3362ba500371
Connect required Assumptions with answer to CHA query
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
18950
diff
changeset
|
267 AssumptionResult<ResolvedJavaMethod> findUniqueConcreteMethod(ResolvedJavaMethod method); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
268 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
269 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
270 * Returns the instance fields of this class, including |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
271 * {@linkplain ResolvedJavaField#isInternal() internal} fields. A zero-length array is returned |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
272 * for array and primitive types. The order of fields returned by this method is stable. That |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
273 * is, for a single JVM execution the same order is returned each time this method is called. It |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
274 * is also the "natural" order, which means that the JVM would expect the fields in this order |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
275 * if no specific order is given. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
276 * |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
277 * @param includeSuperclasses if true, then instance fields for the complete hierarchy of this |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
278 * type are included in the result |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
279 * @return an array of instance fields |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
280 */ |
6950
41938af2b3d8
modifications to support non-perm-gen changes in HotSpot
Doug Simon <doug.simon@oracle.com>
parents:
6699
diff
changeset
|
281 ResolvedJavaField[] getInstanceFields(boolean includeSuperclasses); |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
282 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
283 /** |
15839
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
284 * Returns the static fields of this class, including |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
285 * {@linkplain ResolvedJavaField#isInternal() internal} fields. A zero-length array is returned |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
286 * for array and primitive types. The order of fields returned by this method is stable. That |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
287 * is, for a single JVM execution the same order is returned each time this method is called. |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
288 */ |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
289 ResolvedJavaField[] getStaticFields(); |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
290 |
2838203d4231
Add method ResolvedJavaType.getStaticFields
Christian Wimmer <christian.wimmer@oracle.com>
parents:
15784
diff
changeset
|
291 /** |
22432
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
292 * Returns all annotations of this class. If no annotations are present, an array of length 0 is |
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
293 * returned. |
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
294 */ |
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
295 Annotation[] getAnnotations(); |
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
296 |
e4f0d819fe22
Add getAnnotations() method to ResolvedJavaType and ResolvedJavaField
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22165
diff
changeset
|
297 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
298 * Returns the annotation for the specified type of this class, if such an annotation is |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
299 * present. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
300 * |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
301 * @param annotationClass the Class object corresponding to the annotation type |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
302 * @return this element's annotation for the specified annotation type if present on this class, |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
303 * else {@code null} |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
304 */ |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
305 <T extends Annotation> T getAnnotation(Class<T> annotationClass); |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
306 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
307 /** |
7530
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
308 * Returns the instance field of this class (or one of its super classes) at the given offset, |
5e3d1a68664e
applied mx eclipseformat to all Java files
Doug Simon <doug.simon@oracle.com>
parents:
7307
diff
changeset
|
309 * or {@code null} if there is no such field. |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
11952
diff
changeset
|
310 * |
7049
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
311 * @param offset the offset of the field to look for |
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
312 * @return the field with the given offset, or {@code null} if there is no such field. |
ccade022ec83
virtualization of unsafeload and unsafestore
Lukas Stadler <lukas.stadler@jku.at>
parents:
7037
diff
changeset
|
313 */ |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22516
diff
changeset
|
314 ResolvedJavaField findInstanceFieldWithOffset(long offset, JavaKind expectedKind); |
7307
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7136
diff
changeset
|
315 |
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7136
diff
changeset
|
316 /** |
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7136
diff
changeset
|
317 * Returns name of source file of this type. |
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7136
diff
changeset
|
318 */ |
dc3e86fd3be1
Introduce cutomization capability for canonicalizer.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
7136
diff
changeset
|
319 String getSourceFileName(); |
7819
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7671
diff
changeset
|
320 |
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7671
diff
changeset
|
321 /** |
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7671
diff
changeset
|
322 * Returns the class file path - if available - of this type, or {@code null}. |
aa022eaf1569
class file path retrieval
Michael Haupt <michael.haupt@oracle.com>
parents:
7671
diff
changeset
|
323 */ |
7828
49921d2ee9ce
class file path retrieval returns URL
Michael Haupt <michael.haupt@oracle.com>
parents:
7819
diff
changeset
|
324 URL getClassFilePath(); |
7829
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
325 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
326 /** |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
327 * Returns {@code true} if the type is a local type. |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
328 */ |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
329 boolean isLocal(); |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
330 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
331 /** |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
332 * Returns {@code true} if the type is a member type. |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
333 */ |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
334 boolean isMember(); |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
335 |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
336 /** |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
337 * Returns the enclosing type of this type, if it exists, or {@code null}. |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
338 */ |
a44887443b0c
support for inner classes (local/member) in meta API
Michael Haupt <michael.haupt@oracle.com>
parents:
7828
diff
changeset
|
339 ResolvedJavaType getEnclosingType(); |
9100
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
340 |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
341 /** |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
342 * Returns an array reflecting all the constructors declared by this type. This method is |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
343 * similar to {@link Class#getDeclaredConstructors()} in terms of returned constructors. |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
344 */ |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
345 ResolvedJavaMethod[] getDeclaredConstructors(); |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
346 |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
347 /** |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
348 * Returns an array reflecting all the methods declared by this type. This method is similar to |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
349 * {@link Class#getDeclaredMethods()} in terms of returned methods. |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
350 */ |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
351 ResolvedJavaMethod[] getDeclaredMethods(); |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
352 |
d24955427b0b
Remove MetaUtil.getMirrorOrFail; Add necessary functionality to the Graal API so that all previous usages of java.lang.Class can now use ResolvedJavaType
Christian Wimmer <christian.wimmer@oracle.com>
parents:
7829
diff
changeset
|
353 /** |
11952
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11823
diff
changeset
|
354 * Returns the {@code <clinit>} method for this class if there is one. |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11823
diff
changeset
|
355 */ |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11823
diff
changeset
|
356 ResolvedJavaMethod getClassInitializer(); |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11823
diff
changeset
|
357 |
c0807f5fdca5
added ResolvedJavaType.getClassInititalizer()
Doug Simon <doug.simon@oracle.com>
parents:
11823
diff
changeset
|
358 /** |
21211 | 359 * Returns true if this type represents an interface and it should be trusted even in places |
17156
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17154
diff
changeset
|
360 * where the JVM verifier would not give any guarantees other than {@link Object}. |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17154
diff
changeset
|
361 */ |
ac6e25901d62
Add trusted interface concept and use it for WordBase, fix a NPE and some tests
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
17154
diff
changeset
|
362 boolean isTrustedInterfaceType(); |
22012
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
363 |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
364 default ResolvedJavaMethod findMethod(String name, Signature signature) { |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
365 for (ResolvedJavaMethod method : getDeclaredMethods()) { |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
366 if (method.getName().equals(name) && method.getSignature().equals(signature)) { |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
367 return method; |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
368 } |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
369 } |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
370 return null; |
53b4acee50f1
Add ResolvedJavaMethod.isSignaturePolymorphic and ResolvedJavaType.findMethod
Gilles Duboscq <gilles.m.duboscq@oracle.com>
parents:
21798
diff
changeset
|
371 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
372 } |