< prev index next >
src/java.base/share/classes/java/lang/reflect/Field.java
Print this page
rev 56290 : 8230648: Replace @exception tag with @throws in java.base
Summary: Minor coding style update of javadoc tag in any file in java.base
Reviewed-by: prappo, lancea
@@ -391,19 +391,19 @@
* to be extracted
* @return the value of the represented field in object
* {@code obj}; primitive values are wrapped in an appropriate
* object before being returned
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof).
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
public Object get(Object obj)
@@ -421,22 +421,22 @@
*
* @param obj the object to extract the {@code boolean} value
* from
* @return the value of the {@code boolean} field
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code boolean} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -455,22 +455,22 @@
*
* @param obj the object to extract the {@code byte} value
* from
* @return the value of the {@code byte} field
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code byte} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -491,22 +491,22 @@
*
* @param obj the object to extract the {@code char} value
* from
* @return the value of the field converted to type {@code char}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code char} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -527,22 +527,22 @@
*
* @param obj the object to extract the {@code short} value
* from
* @return the value of the field converted to type {@code short}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code short} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -563,22 +563,22 @@
*
* @param obj the object to extract the {@code int} value
* from
* @return the value of the field converted to type {@code int}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code int} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -599,22 +599,22 @@
*
* @param obj the object to extract the {@code long} value
* from
* @return the value of the field converted to type {@code long}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code long} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -635,22 +635,22 @@
*
* @param obj the object to extract the {@code float} value
* from
* @return the value of the field converted to type {@code float}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code float} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -671,22 +671,22 @@
*
* @param obj the object to extract the {@code double} value
* from
* @return the value of the field converted to type {@code double}
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is inaccessible.
- * @exception IllegalArgumentException if the specified object is not
+ * @throws IllegalArgumentException if the specified object is not
* an instance of the class or interface declaring the
* underlying field (or a subclass or implementor
* thereof), or if the field value cannot be
* converted to the type {@code double} by a
* widening conversion.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#get
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -752,20 +752,20 @@
*
* @param obj the object whose field should be modified
* @param value the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
public void set(Object obj, Object value)
@@ -787,20 +787,20 @@
*
* @param obj the object whose field should be modified
* @param z the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -823,20 +823,20 @@
*
* @param obj the object whose field should be modified
* @param b the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -859,20 +859,20 @@
*
* @param obj the object whose field should be modified
* @param c the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -895,20 +895,20 @@
*
* @param obj the object whose field should be modified
* @param s the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -931,20 +931,20 @@
*
* @param obj the object whose field should be modified
* @param i the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -967,20 +967,20 @@
*
* @param obj the object whose field should be modified
* @param l the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -1003,20 +1003,20 @@
*
* @param obj the object whose field should be modified
* @param f the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
@@ -1039,20 +1039,20 @@
*
* @param obj the object whose field should be modified
* @param d the new value for the field of {@code obj}
* being modified
*
- * @exception IllegalAccessException if this {@code Field} object
+ * @throws IllegalAccessException if this {@code Field} object
* is enforcing Java language access control and the underlying
* field is either inaccessible or final.
- * @exception IllegalArgumentException if the specified object is not an
+ * @throws IllegalArgumentException if the specified object is not an
* instance of the class or interface declaring the underlying
* field (or a subclass or implementor thereof),
* or if an unwrapping conversion fails.
- * @exception NullPointerException if the specified object is null
+ * @throws NullPointerException if the specified object is null
* and the field is an instance field.
- * @exception ExceptionInInitializerError if the initialization provoked
+ * @throws ExceptionInInitializerError if the initialization provoked
* by this method fails.
* @see Field#set
*/
@CallerSensitive
@ForceInline // to ensure Reflection.getCallerClass optimization
< prev index next >