138 REF_invokeSpecial = Constants.REF_invokeSpecial,
139 REF_newInvokeSpecial = Constants.REF_newInvokeSpecial,
140 REF_invokeInterface = Constants.REF_invokeInterface;
141
142 /**
143 * Returns the reference kind of the cracked method handle, which in turn
144 * determines whether the method handle's underlying member was a constructor, method, or field.
145 * See the <a href="MethodHandleInfo.html#refkinds">table above</a> for definitions.
146 * @return the integer code for the kind of reference used to access the underlying member
147 */
148 public int getReferenceKind();
149
150 /**
151 * Returns the class in which the cracked method handle's underlying member was defined.
152 * @return the declaring class of the underlying member
153 */
154 public Class<?> getDeclaringClass();
155
156 /**
157 * Returns the name of the cracked method handle's underlying member.
158 * This is {@code "<init>"} if the underlying member was a constructor,
159 * else it is a simple method name or field name.
160 * @return the simple name of the underlying member
161 */
162 public String getName();
163
164 /**
165 * Returns the nominal type of the cracked symbolic reference, expressed as a method type.
166 * If the reference is to a constructor, the return type will be {@code void}.
167 * If it is to a non-static method, the method type will not mention the {@code this} parameter.
168 * If it is to a field and the requested access is to read the field,
169 * the method type will have no parameters and return the field type.
170 * If it is to a field and the requested access is to write the field,
171 * the method type will have one parameter of the field type and return {@code void}.
172 * <p>
173 * Note that original direct method handle may include a leading {@code this} parameter,
174 * or (in the case of a constructor) will replace the {@code void} return type
175 * with the constructed class.
176 * The nominal type does not include any {@code this} parameter,
177 * and (in the case of a constructor) will return {@code void}.
178 * @return the type of the underlying member, expressed as a method type
|
138 REF_invokeSpecial = Constants.REF_invokeSpecial,
139 REF_newInvokeSpecial = Constants.REF_newInvokeSpecial,
140 REF_invokeInterface = Constants.REF_invokeInterface;
141
142 /**
143 * Returns the reference kind of the cracked method handle, which in turn
144 * determines whether the method handle's underlying member was a constructor, method, or field.
145 * See the <a href="MethodHandleInfo.html#refkinds">table above</a> for definitions.
146 * @return the integer code for the kind of reference used to access the underlying member
147 */
148 public int getReferenceKind();
149
150 /**
151 * Returns the class in which the cracked method handle's underlying member was defined.
152 * @return the declaring class of the underlying member
153 */
154 public Class<?> getDeclaringClass();
155
156 /**
157 * Returns the name of the cracked method handle's underlying member.
158 * This is {@code "<init>"} if the underlying member was a constructor,
159 * else it is a simple method name or field name.
160 * @return the simple name of the underlying member
161 */
162 public String getName();
163
164 /**
165 * Returns the nominal type of the cracked symbolic reference, expressed as a method type.
166 * If the reference is to a constructor, the return type will be {@code void}.
167 * If it is to a non-static method, the method type will not mention the {@code this} parameter.
168 * If it is to a field and the requested access is to read the field,
169 * the method type will have no parameters and return the field type.
170 * If it is to a field and the requested access is to write the field,
171 * the method type will have one parameter of the field type and return {@code void}.
172 * <p>
173 * Note that original direct method handle may include a leading {@code this} parameter,
174 * or (in the case of a constructor) will replace the {@code void} return type
175 * with the constructed class.
176 * The nominal type does not include any {@code this} parameter,
177 * and (in the case of a constructor) will return {@code void}.
178 * @return the type of the underlying member, expressed as a method type
|