jdk/src/share/classes/java/lang/reflect/Executable.java
changeset 19838 e2815bcfacf0
parent 18775 fa61a37ed42b
child 20481 2735b307d256
equal deleted inserted replaced
19837:6f1c611fb72c 19838:e2815bcfacf0
   426     public boolean isSynthetic() {
   426     public boolean isSynthetic() {
   427         return Modifier.isSynthetic(getModifiers());
   427         return Modifier.isSynthetic(getModifiers());
   428     }
   428     }
   429 
   429 
   430     /**
   430     /**
   431      * Returns an array of arrays that represent the annotations on
   431      * Returns an array of arrays of {@code Annotation}s that
   432      * the formal parameters, in declaration order, of the executable
   432      * represent the annotations on the formal parameters, in
   433      * represented by this object. (Returns an array of length zero if
   433      * declaration order, of the {@code Executable} represented by
   434      * the underlying executable is parameterless.  If the executable has
   434      * this object.  Synthetic and mandated parameters (see
   435      * one or more parameters, a nested array of length zero is
   435      * explanation below), such as the outer "this" parameter to an
   436      * returned for each parameter with no annotations.) The
   436      * inner class constructor will be represented in the returned
   437      * annotation objects contained in the returned arrays are
   437      * array.  If the executable has no parameters (meaning no formal,
   438      * serializable.  The caller of this method is free to modify the
   438      * no synthetic, and no mandated parameters), a zero-length array
   439      * returned arrays; it will have no effect on the arrays returned
   439      * will be returned.  If the {@code Executable} has one or more
   440      * to other callers.
   440      * parameters, a nested array of length zero is returned for each
   441      *
   441      * parameter with no annotations. The annotation objects contained
   442      * @return an array of arrays that represent the annotations on the formal
   442      * in the returned arrays are serializable.  The caller of this
   443      *    parameters, in declaration order, of the executable represented by this
   443      * method is free to modify the returned arrays; it will have no
   444      *    object
   444      * effect on the arrays returned to other callers.
       
   445      *
       
   446      * A compiler may add extra parameters that are implicitly
       
   447      * declared in source ("mandated"), as well as parameters that
       
   448      * are neither implicitly nor explicitly declared in source
       
   449      * ("synthetic") to the parameter list for a method.  See {@link
       
   450      * java.lang.reflect.Parameter} for more information.
       
   451      *
       
   452      * @see java.lang.reflect.Parameter
       
   453      * @see java.lang.reflect.Parameter#getAnnotations
       
   454      * @return an array of arrays that represent the annotations on
       
   455      *    the formal and implicit parameters, in declaration order, of
       
   456      *    the executable represented by this object
   445      */
   457      */
   446     public abstract Annotation[][] getParameterAnnotations();
   458     public abstract Annotation[][] getParameterAnnotations();
   447 
   459 
   448     Annotation[][] sharedGetParameterAnnotations(Class<?>[] parameterTypes,
   460     Annotation[][] sharedGetParameterAnnotations(Class<?>[] parameterTypes,
   449                                                  byte[] parameterAnnotations) {
   461                                                  byte[] parameterAnnotations) {