1 /*
2 * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
85 * class. A negative result does not mean this type is not resolved with respect to
86 * {@code accessingClass}. That can only be determined by
87 * {@linkplain HotSpotJVMCIRuntime#lookupType(String, HotSpotResolvedObjectType, boolean)
88 * re-resolving} the type.
89 */
90 boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass);
91
92 /**
93 * Gets the metaspace Klass boxed in a {@link JavaConstant}.
94 */
95 Constant klass();
96
97 boolean isPrimaryType();
98
99 int superCheckOffset();
100
101 long prototypeMarkWord();
102
103 int layoutHelper();
104
105 long getFingerprint();
106
107 @Override
108 HotSpotResolvedObjectType getEnclosingType();
109
110 @Override
111 ResolvedJavaMethod getClassInitializer();
112
113 /**
114 * Checks whether this type is an unsafe anonymous class.
115 *
116 * @return {@code true} if this type is an unsafe anonymous class
117 */
118 boolean isUnsafeAnonymous();
119
120 /**
121 * Checks whether this type is an unsafe anonymous class.
122 * This method is here to maintain compatibility with JDK11.
123 *
124 * @return {@code true} if this type is an unsafe anonymous class
125 */
126 default boolean isAnonymous() {
127 return isUnsafeAnonymous();
128 }
129
130 }
|
1 /*
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
85 * class. A negative result does not mean this type is not resolved with respect to
86 * {@code accessingClass}. That can only be determined by
87 * {@linkplain HotSpotJVMCIRuntime#lookupType(String, HotSpotResolvedObjectType, boolean)
88 * re-resolving} the type.
89 */
90 boolean isDefinitelyResolvedWithRespectTo(ResolvedJavaType accessingClass);
91
92 /**
93 * Gets the metaspace Klass boxed in a {@link JavaConstant}.
94 */
95 Constant klass();
96
97 boolean isPrimaryType();
98
99 int superCheckOffset();
100
101 long prototypeMarkWord();
102
103 int layoutHelper();
104
105 @Override
106 HotSpotResolvedObjectType getEnclosingType();
107
108 @Override
109 ResolvedJavaMethod getClassInitializer();
110
111 /**
112 * Checks whether this type is an unsafe anonymous class.
113 *
114 * @return {@code true} if this type is an unsafe anonymous class
115 */
116 boolean isUnsafeAnonymous();
117
118 /**
119 * Checks whether this type is an unsafe anonymous class.
120 * This method is here to maintain compatibility with JDK11.
121 *
122 * @return {@code true} if this type is an unsafe anonymous class
123 */
124 default boolean isAnonymous() {
125 return isUnsafeAnonymous();
126 }
127
128 /**
129 * Gets the fingerprint for this type.
130 *
131 * @return the value of the fingerprint ({@code 0} for arrays and synthetic classes or if the VM
132 * does not support fingerprints)
133 */
134 long getFingerprint();
135 }
|