[jboss-cvs] javassist/src/main/javassist ...

Shigeru Chiba chiba at is.titech.ac.jp
Tue Jul 18 11:33:14 EDT 2006


  User: chiba   
  Date: 06/07/18 11:33:14

  Modified:    src/main/javassist      CtBehavior.java CtField.java
                        CtClassType.java CtMember.java CtClass.java
  Log:
  reformatted.
  
  Revision  Changes    Path
  1.30      +25 -13    javassist/src/main/javassist/CtBehavior.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtBehavior.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtBehavior.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- CtBehavior.java	17 Jul 2006 16:48:29 -0000	1.29
  +++ CtBehavior.java	18 Jul 2006 15:33:13 -0000	1.30
  @@ -139,7 +139,7 @@
        * Returns the annotations associated with this method or constructor.
        *
        * @return an array of annotation-type objects.
  -     * @see CtMember#getAnnotations()
  +     * @see #getAvailableAnnotations()
        * @since 3.1
        */
       public Object[] getAnnotations() throws ClassNotFoundException {
  @@ -148,27 +148,32 @@
   
       /**
        * Returns the annotations associated with this method or constructor.
  -     * If any annotations are not on the classpath, they are not returned
  +     * If any annotations are not on the classpath, they are not included
  +     * in the returned array.
        * 
        * @return an array of annotation-type objects.
  -     * @see CtMember#getAnnotations()
  +     * @see #getAnnotations()
        * @since 3.3
        */
       public Object[] getAvailableAnnotations(){
          try{
              return getAnnotations(true);
  -       }catch (ClassNotFoundException e){
  +       }
  +       catch (ClassNotFoundException e){
              throw new RuntimeException("Unexpected exception", e);
          }
       }
   
  -    private Object[] getAnnotations(boolean ignoreNotFound) throws ClassNotFoundException {
  +    private Object[] getAnnotations(boolean ignoreNotFound)
  +       throws ClassNotFoundException
  +    {
          MethodInfo mi = getMethodInfo2();
          AnnotationsAttribute ainfo = (AnnotationsAttribute)
                      mi.getAttribute(AnnotationsAttribute.invisibleTag);  
          AnnotationsAttribute ainfo2 = (AnnotationsAttribute)
                      mi.getAttribute(AnnotationsAttribute.visibleTag);  
  -       return CtClassType.toAnnotationType(ignoreNotFound, getDeclaringClass().getClassPool(),
  +       return CtClassType.toAnnotationType(ignoreNotFound,
  +                                           getDeclaringClass().getClassPool(),
                                              ainfo, ainfo2);
       }
   
  @@ -179,7 +184,8 @@
        * equal to the number of the formal parameters.  If each parameter has no
        * annotation, the elements of the returned array are empty arrays.
        *
  -     * @see CtMember#getAnnotations()
  +     * @see #getAvailableParameterAnnotations()
  +     * @see #getAnnotations()
        * @since 3.1
        */
       public Object[][] getParameterAnnotations() throws ClassNotFoundException {
  @@ -188,30 +194,36 @@
   
       /**
        * Returns the parameter annotations associated with this method or constructor.
  -     * If any annotations are not on the classpath, they are not returned
  +     * If any annotations are not on the classpath, they are not included in the
  +     * returned array.
        * 
        * @return an array of annotation-type objects.  The length of the returned array is
        * equal to the number of the formal parameters.  If each parameter has no
        * annotation, the elements of the returned array are empty arrays.
        *
  -     * @see CtMember#getAnnotations()
  +     * @see #getParameterAnnotations()
  +     * @see #getAvailableAnnotations()
        * @since 3.3
        */
       public Object[][] getAvailableParameterAnnotations(){
           try {
               return getParameterAnnotations(true);
  -        }catch(ClassNotFoundException e) {
  +        }
  +        catch(ClassNotFoundException e) {
               throw new RuntimeException("Unexpected exception", e);
           }
       }
   
  -    Object[][] getParameterAnnotations(boolean ignoreNotFound) throws ClassNotFoundException {
  +    Object[][] getParameterAnnotations(boolean ignoreNotFound)
  +        throws ClassNotFoundException
  +    {
           MethodInfo mi = getMethodInfo2();
           ParameterAnnotationsAttribute ainfo = (ParameterAnnotationsAttribute)
                       mi.getAttribute(ParameterAnnotationsAttribute.invisibleTag);  
           ParameterAnnotationsAttribute ainfo2 = (ParameterAnnotationsAttribute)
                       mi.getAttribute(ParameterAnnotationsAttribute.visibleTag);  
  -        return CtClassType.toAnnotationType(ignoreNotFound, getDeclaringClass().getClassPool(),
  +        return CtClassType.toAnnotationType(ignoreNotFound,
  +                                            getDeclaringClass().getClassPool(),
                                               ainfo, ainfo2, mi);
       }
       
  
  
  
  1.18      +10 -11    javassist/src/main/javassist/CtField.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtField.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtField.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -b -r1.17 -r1.18
  --- CtField.java	17 Jul 2006 16:48:29 -0000	1.17
  +++ CtField.java	18 Jul 2006 15:33:13 -0000	1.18
  @@ -237,7 +237,7 @@
        * Returns the annotations associated with this field.
        *
        * @return an array of annotation-type objects.
  -     * @see CtMember#getAnnotations()
  +     * @see #getAvailableAnnotations()
        * @since 3.1
        */
       public Object[] getAnnotations() throws ClassNotFoundException {
  @@ -246,19 +246,18 @@
   
       /**
        * Returns the annotations associated with this field.
  -     * If any annotations are not on the classpath, they are not returned
  +     * If any annotations are not on the classpath, they are not included
  +     * in the returned array.
        *
        * @return an array of annotation-type objects.
  -     * @see CtMember#getAnnotations()
  +     * @see #getAnnotations()
        * @since 3.3
        */
       public Object[] getAvailableAnnotations(){
  -       try
  -       {
  +        try {
              return getAnnotations(true);
          }
  -       catch (ClassNotFoundException e)
  -       {
  +        catch (ClassNotFoundException e) {
              throw new RuntimeException("Unexpected exception", e);
          }
       }
  
  
  
  1.52      +26 -23    javassist/src/main/javassist/CtClassType.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtClassType.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtClassType.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -b -r1.51 -r1.52
  --- CtClassType.java	17 Jul 2006 16:48:29 -0000	1.51
  +++ CtClassType.java	18 Jul 2006 15:33:13 -0000	1.52
  @@ -417,17 +417,17 @@
       }
   
       public Object[] getAvailableAnnotations(){
  -       try
  -       {
  +       try {
              return getAnnotations(true);
          }
  -       catch (ClassNotFoundException e)
  -       {
  +       catch (ClassNotFoundException e) {
              throw new RuntimeException("Unexpected exception ", e);
          }
       }
   
  -    private Object[] getAnnotations(boolean ignoreNotFound) throws ClassNotFoundException {
  +    private Object[] getAnnotations(boolean ignoreNotFound)
  +        throws ClassNotFoundException
  +    {
          ClassFile cf = getClassFile2();
          AnnotationsAttribute ainfo = (AnnotationsAttribute)
                      cf.getAttribute(AnnotationsAttribute.invisibleTag);  
  @@ -436,8 +436,10 @@
          return toAnnotationType(ignoreNotFound, getClassPool(), ainfo, ainfo2);
       }
   
  -    static Object[] toAnnotationType(boolean ignoreNotFound, ClassPool cp, AnnotationsAttribute a1,
  -                                     AnnotationsAttribute a2) throws ClassNotFoundException {
  +    static Object[] toAnnotationType(boolean ignoreNotFound, ClassPool cp,
  +                             AnnotationsAttribute a1, AnnotationsAttribute a2)
  +        throws ClassNotFoundException
  +    {
           Annotation[] anno1, anno2;
           int size1, size2;
   
  @@ -474,23 +476,24 @@
              for (int i = 0 ; i < size1 ; i++){
                 try{
                    annotations.add(toAnnoType(anno1[i], cp));
  -              }catch(ClassNotFoundException e){
                 }
  +              catch(ClassNotFoundException e){}
              }
  -           for (int j = 0; j < size2; j++)
  -           {
  +           for (int j = 0; j < size2; j++) {
                 try{
                    annotations.add(toAnnoType(anno2[j], cp));
  -              }catch(ClassNotFoundException e){
                 }
  +              catch(ClassNotFoundException e){}
              }
              
              return annotations.toArray();
           }
       }
   
  -    static Object[][] toAnnotationType(boolean ignoreNotFound, ClassPool cp, ParameterAnnotationsAttribute a1,
  -                                       ParameterAnnotationsAttribute a2, MethodInfo minfo)
  +    static Object[][] toAnnotationType(boolean ignoreNotFound, ClassPool cp,
  +                                       ParameterAnnotationsAttribute a1,
  +                                       ParameterAnnotationsAttribute a2,
  +                                       MethodInfo minfo)
           throws ClassNotFoundException
       {
           int numParameters = 0;
  @@ -537,14 +540,14 @@
                   for (int j = 0 ; j < size1 ; j++){
                       try{
                           annotations.add(toAnnoType(anno1[j], cp));
  -                    }catch(ClassNotFoundException e){
                       }
  +                    catch(ClassNotFoundException e){}
                   }
                   for (int j = 0; j < size2; j++){
                       try{
                           annotations.add(toAnnoType(anno2[j], cp));
  -                    }catch(ClassNotFoundException e){
                       }
  +                    catch(ClassNotFoundException e){}
                   }
                     
                   result[i] = annotations.toArray();
  
  
  
  1.16      +8 -7      javassist/src/main/javassist/CtMember.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtMember.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtMember.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -b -r1.15 -r1.16
  --- CtMember.java	17 Jul 2006 17:43:27 -0000	1.15
  +++ CtMember.java	18 Jul 2006 15:33:13 -0000	1.16
  @@ -158,16 +158,17 @@
   
       /**
        * Returns the annotations associated with this member.
  -     * For example, if an annotation <code>@Author</code> is associated
  -     * with this member, the returned array contains an <code>Author</code>
  -     * object.  The member values can be obtained by calling methods on
  -     * the <code>Author</code> object.
  -     * If any annotations are not on the classpath, they are not returned
  +     * This method is equivalent to <code>getAnnotations()</code>
  +     * except that, if any annotations are not on the classpath,
  +     * they are not included in the returned array.
        *
        * @return an array of annotation-type objects.
  -     * @see CtClass#getAnnotations()
  +     * @see #getAnnotations()
  +     * @see CtClass#getAvailableAnnotations()
  +     * @since 3.3
        */
  -    public abstract Object[] getAvailableAnnotations() throws ClassNotFoundException;
  +    public abstract Object[] getAvailableAnnotations()
  +        throws ClassNotFoundException;
   
   
       /**
  
  
  
  1.74      +6 -5      javassist/src/main/javassist/CtClass.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CtClass.java
  ===================================================================
  RCS file: /cvsroot/jboss/javassist/src/main/javassist/CtClass.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -b -r1.73 -r1.74
  --- CtClass.java	17 Jul 2006 16:48:29 -0000	1.73
  +++ CtClass.java	18 Jul 2006 15:33:13 -0000	1.74
  @@ -474,6 +474,7 @@
        * the <code>Author</code> object.
        *
        * @return an array of annotation-type objects.
  +     * @see CtMember#getAnnotations()
        * @since 3.1
        */
       public Object[] getAnnotations() throws ClassNotFoundException {
  @@ -482,13 +483,13 @@
   
       /**
        * Returns the annotations associated with this class.
  -     * For example, if an annotation <code>@Author</code> is associated
  -     * with this class, the returned array contains an <code>Author</code>
  -     * object.  The member values can be obtained by calling methods on
  -     * the <code>Author</code> object. If any annotations are not on the
  -     * classpath, they are not returned
  +     * This method is equivalent to <code>getAnnotations()</code>
  +     * except that, if any annotations are not on the classpath,
  +     * they are not included in the returned array.
        *
        * @return an array of annotation-type objects.
  +     * @see #getAnnotations()
  +     * @see CtMember#getAvailableAnnotations()
        * @since 3.3
        */
       public Object[] getAvailableAnnotations(){
  
  
  



More information about the jboss-cvs-commits mailing list