Update of /cvsroot/xdoclet/xjavadoc/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28232/xjavadoc/test

Modified Files:
        Hello.java 
Added Files:
        Hello2.java Goodbye2.java 
Log Message:
Support Java5. From Anton Adamansky in XJD-41.

--- NEW FILE: Hello2.java ---
// no package

import java.io.*;
import java.rmi.*;
import java.rmi.Remote;
import annotation.TestAnnotation;

/**
 * Bla bla
 * yadda yadda
 * @foo:bar
 *beer="good"
 *         tea="bad"
 *
 * @my:name this program is called ${name} guess why
 * @my:version version="${name} version is ${version}"
 *
 */
class Hello2 extends javax.swing.text.TextAction<DS, C extends CI, ?> 
implements javax.swing.event.MouseInputListener, Remote<T>, Serializable {


      public enum Planet {
        MERCURY (3.303e+23, 2.4397e6),
        VENUS   (4.869e+24, 6.0518e6),
        EARTH   (5.976e+24, 6.37814e6),
        MARS    (6.421e+23, 3.3972e6),
        JUPITER (1.9e+27,   7.1492e7),
        SATURN  (5.688e+26, 6.0268e7),
        URANUS  (8.686e+25, 2.5559e7),
        NEPTUNE (1.024e+26, 2.4746e7),
        PLUTO   (1.27e+22,  1.137e6),

        PLUS   { double eval(double x, double y) { return x + y; } },
        MINUS  { double eval(double x, double y) { return x - y; } },
        TIMES  { double eval(double x, double y) { return x * y; } },
        DIVIDE { double eval(double x, double y) { return x / y; } }

        ;

        abstract double eval(double x, double y);


        private final double mass;   // in kilograms
        private final double radius; // in meters
        Planet(double mass, double radius) {
            this.mass = mass;
            this.radius = radius;
        }
        private double mass()   { return mass; }
        private double radius() { return radius; }

        // universal gravitational constant  (m3 kg-1 s-2)
        public static final double G = 6.67300E-11;

        double surfaceGravity() {
            return G * mass / (radius * radius);
        }
        double surfaceWeight(double otherMass) {
            return otherMass * surfaceGravity();
        }
    };



   private List lst2 = new ArrayList();

   private static final List<String> lst = new ArrayList<String>();

   private static final List<String> lst3 = new ArrayList();

   private Map<String, List> map  = new HashMap();

   private Map<String, List> map  = new HashMap<String, List>();


   enum MyEnu {
        One,
        Two,
        Three
   };


        /**
         * This shouldn't be the first sentence.This one should be.
         * Is everything OK?
         */
         @MyAnnotation()
        public void firstMethod()
        {

            for (int i = 0; i < 10; ++i) {
                ;
            }

            List items = new ArrayList();
            for (Object item : items) {
                System.out.println("Has item");
            }


        }; // The spec says semicolon is illegal here, but javac accepts it, 
and xjavadoc will too.



        @TestAnnotation()
        private List<Map> getMapList() {
        return null;
        }

        private Map<String, ?> getMap(List<String> params, Map<Integer, Object> 
map) {
            return new HashMap<List, Map>(111);
        }


        public void testVaArgs(Object... args) {
                    
        }



  //    public Map hm = new HashMap();

   /**
    * Braba papa, barba mama, baraba brother, barba sister
    */
   private final String privateField = "barba papa";

   protected final String protectedField;

   public final String publicField;

         /**
         * Blabla. Do you like Norwegian letters? æøåÆØÅ.
         *
         * @foo
         */
        public Hello2() {
        }

                /**
         * Yadda yadda
         *
         * @bar
         */
        Hello( File f ) {
        }

        protected Hello( String f ) throws java.io.IOException, 
InvalidDefinitionException {
        }
                        // what can you do about thiis comment?

        /**
         * This is getNonsense.
         *
         * @star:wars is="a crappy movie"
         * but="I went to see it anyway"
         *
         * @empty:tag
         */
        public InputStream getNonsense() {
                return null;
        }

        /**
         * Mr. Jones
         *
         * @more testdata, bla bla
         * @maybe this="is" only="testdata"
         */
        protected void whatever( String[] s[], int i) {
                //assert true;
                //assert true:"blabla";
        }

    /**
        * What Ever
            * @more howdy, bla bla
* @numbers one="two" three="four"
          */
        private void whatever( String[] s, int i ) {
        }


        Long noComment(     ) {
        }

        public void setInner(InnerClass inner) {
        }

        public class InnerClass extends java.lang.Object {

           private final String doodoo = "doodoo";

                private String justForFun() {
                        return "justForFun";
                }
        }

    public void methodBlockInnerClass() {
        class MethodInnerClass extends Object
        {
            /**
            * What Ever
                * @more howdy, bla bla
        * @numbers one="two" three="four"
              */
            public void haha() {
                System.out.println("haha");
            }
        }
                MethodInnerClass methodInner = new MethodInnerClass();
        methodInner.haha();
        }
}

class OldFashioned {
   private String blah;

   public class InnerInOldFashioned {
      private String duh;
   }





}
--- NEW FILE: Goodbye2.java ---
// no package

import java.io.*;
import java.rmi.*;
import java.rmi.Remote;

// import a class with an inner class. it should be resolved corresctly
import hanoi.Processor;

/**
 * Bla bla
 * yadda yadda
 * @foo:bar
 *beer="good"
 *         tea="bad"
 *
 */
class Goodbye2 extends Hello2 {

// 2 methods here, one of them overrides one from superclass

        private String gaga;

        /**
         * This overrides a method from Hello
         *
         * @titi toto="tata"
         */
        public InputStream getNonsense() {
                return null;
        }

        private void newMethod() {}

        public Processor.Next gotThis() {
                return null;
        }
}
Index: Hello.java
===================================================================
RCS file: /cvsroot/xdoclet/xjavadoc/test/Hello.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** Hello.java  4 Mar 2003 23:49:36 -0000       1.25
--- Hello.java  10 Jun 2005 11:52:58 -0000      1.26
***************
*** 16,20 ****
   *
   */
! class Hello extends javax.swing.text.TextAction implements 
javax.swing.event.MouseInputListener, Remote, Serializable {
  
        /**
--- 16,22 ----
   *
   */
! class Hello extends javax.swing.text.TextAction<T, G> implements 
javax.swing.event.MouseInputListener, Remote, Serializable {
!       
! 
  
        /**
***************
*** 26,29 ****
--- 28,34 ----
        }; // The spec says semicolon is illegal here, but javac accepts it, 
and xjavadoc will too.
  
+ 
+   //  public Map hm = new HashMap();
+ 
     /**
      * Braba papa, barba mama, baraba brother, barba sister
***************
*** 32,35 ****
--- 37,41 ----
  
     protected final String protectedField;
+ 
     public final String publicField;
  
***************
*** 73,78 ****
         */
        protected void whatever( String[] s[], int i) {
!               assert true;
!               assert true:"blabla";
        }
  
--- 79,84 ----
         */
        protected void whatever( String[] s[], int i) {
!               //assert true;
!               //assert true:"blabla";
        }
  



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
xdoclet-devel mailing list
xdoclet-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to