< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodHandleInfo.java

Print this page




 136     public static final int
 137         REF_getField                = Constants.REF_getField,
 138         REF_getStatic               = Constants.REF_getStatic,
 139         REF_putField                = Constants.REF_putField,
 140         REF_putStatic               = Constants.REF_putStatic,
 141         REF_invokeVirtual           = Constants.REF_invokeVirtual,
 142         REF_invokeStatic            = Constants.REF_invokeStatic,
 143         REF_invokeSpecial           = Constants.REF_invokeSpecial,
 144         REF_newInvokeSpecial        = Constants.REF_newInvokeSpecial,
 145         REF_invokeInterface         = Constants.REF_invokeInterface;
 146 
 147     /**
 148      * Returns the reference kind of the cracked method handle, which in turn
 149      * determines whether the method handle's underlying member was a constructor, method, or field.
 150      * See the <a href="MethodHandleInfo.html#refkinds">table above</a> for definitions.
 151      * @return the integer code for the kind of reference used to access the underlying member
 152      */
 153     public int getReferenceKind();
 154 
 155     /**
 156      * Returns the class in which the cracked method handle's underlying member was defined.

 157      * @return the declaring class of the underlying member
 158      */
 159     public Class<?> getDeclaringClass();
 160 
 161     /**
 162      * Returns the name of the cracked method handle's underlying member.
 163      * This is {@code "<init>"} if the underlying member was a constructor,
 164      * else it is a simple method name or field name.
 165      * @return the simple name of the underlying member
 166      */
 167     public String getName();
 168 
 169     /**
 170      * Returns the nominal type of the cracked symbolic reference, expressed as a method type.
 171      * If the reference is to a constructor, the return type will be {@code void}.
 172      * If it is to a non-static method, the method type will not mention the {@code this} parameter.
 173      * If it is to a field and the requested access is to read the field,
 174      * the method type will have no parameters and return the field type.
 175      * If it is to a field and the requested access is to write the field,
 176      * the method type will have one parameter of the field type and return {@code void}.




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


< prev index next >