You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by vs...@apache.org on 2007/10/13 01:38:58 UTC

svn commit: r584326 [7/7] - in /maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java: doc/ src/ src/symtab/ src/util/ src/xref/

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/VariableDef.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/VariableDef.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/VariableDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/VariableDef.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.symtab;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.symtab;
 
 import org.apache.log4j.Logger;
 
@@ -32,8 +33,10 @@
  *
  * @version $Id: $
  */
-public class VariableDef extends Definition
-        implements TypedDef, Externalizable {
+public class VariableDef
+    extends Definition
+    implements TypedDef, Externalizable
+{
 
     /** Logger for this class  */
     private static final Logger log = Logger.getLogger( VariableDef.class );
@@ -52,7 +55,8 @@
     /**
      * Default constructor needs to be public for deserialization.
      */
-    public VariableDef() {
+    public VariableDef()
+    {
     }
 
     /**
@@ -63,12 +67,13 @@
      * @param type
      * @param parentScope
      */
-    VariableDef(String name, // the variable's name
-                Occurrence occ, // where it was defined
-                ClassDef type, // the type of the variable
-                ScopedDef parentScope) {    // which scope owns it
+    VariableDef( String name, // the variable's name
+                 Occurrence occ, // where it was defined
+                 ClassDef type, // the type of the variable
+                 ScopedDef parentScope )
+    { // which scope owns it
 
-        super(name, occ, parentScope);
+        super( name, occ, parentScope );
 
         this.type = type;
     }
@@ -76,50 +81,51 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.TypedDef#getType()
      */
-    public Definition getType() {
+    public Definition getType()
+    {
         return type;
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#generateReferences(java.io.FileWriter)
      */
-    public void generateReferences(FileWriter output) {
+    public void generateReferences( FileWriter output )
+    {
 
         String linkString;
         String linkFileName;
 
-        try {
-            output.write("<p class=\"variableReflist\">");
+        try
+        {
+            output.write( "<p class=\"variableReflist\">" );
 
-            String nameString =
-                    "<p class=\"variableReflistHeader\">Variable: <a name="
-                    + getName() + " href=" + getSourceName() + "#"
-                    + getClassScopeName() + ">" + getName() + "</a></p>";
+            String nameString = "<p class=\"variableReflistHeader\">Variable: <a name=" + getName() + " href="
+                + getSourceName() + "#" + getClassScopeName() + ">" + getName() + "</a></p>";
 
-            output.write(nameString);
+            output.write( nameString );
 
             JavaVector v = getReferences();
             Enumeration e = v.elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 Occurrence o = (Occurrence) e.nextElement();
 
-                if (o != null) {
-                    linkFileName = getOccurrencePath(o) + o.getLinkReference();
-                    linkString = "<p class=\"variableRefItem\"><a href="
-                            + linkFileName + ">" + getName() + " in "
-                            + o.getPackageName() + "."
-                            + o.getClassName() + "." + o.getMethodName()
-                            + " (" + o.getFile().getName() + ":"
-                            + Integer.toString(o.getLine())
-                            + ")</a></p>\n";
+                if ( o != null )
+                {
+                    linkFileName = getOccurrencePath( o ) + o.getLinkReference();
+                    linkString = "<p class=\"variableRefItem\"><a href=" + linkFileName + ">" + getName() + " in "
+                        + o.getPackageName() + "." + o.getClassName() + "." + o.getMethodName() + " ("
+                        + o.getFile().getName() + ":" + Integer.toString( o.getLine() ) + ")</a></p>\n";
 
-                    output.write(linkString);
+                    output.write( linkString );
                 }
             }
 
-            output.write("</p>");
-        } catch (IOException e) {
+            output.write( "</p>" );
+        }
+        catch ( IOException e )
+        {
             log.error( "IOException: " + e.getMessage(), e );
         }
     }
@@ -127,41 +133,42 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#generateTags(org.apache.maven.jxr.java.src.symtab.HTMLTagContainer)
      */
-    public void generateTags(HTMLTagContainer tagList) {
+    public void generateTags( HTMLTagContainer tagList )
+    {
 
-        String nameString = "<a class=\"varDef\" name=" + getClassScopeName()
-                + " href=" + getRefName() + "#"
-                + getClassScopeName() + ">" + getName() + "</a>";
+        String nameString = "<a class=\"varDef\" name=" + getClassScopeName() + " href=" + getRefName() + "#"
+            + getClassScopeName() + ">" + getName() + "</a>";
 
         // generate tag for this method
-        if (getOccurrence() == null) {
+        if ( getOccurrence() == null )
+        {
             return;
         }
 
-        HTMLTag t = new HTMLTag(getOccurrence(), getName(), nameString);
+        HTMLTag t = new HTMLTag( getOccurrence(), getName(), nameString );
 
-        tagList.addElement(t);
+        tagList.addElement( t );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#getOccurrenceTag(org.apache.maven.jxr.java.src.symtab.Occurrence)
      */
-    public HTMLTag getOccurrenceTag(Occurrence occ) {
+    public HTMLTag getOccurrenceTag( Occurrence occ )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("getOccurrenceTag(Occurrence) - Occurrence occ=" + occ);
+            log.debug( "getOccurrenceTag(Occurrence) - Occurrence occ=" + occ );
         }
 
         String linkString;
         String linkFileName;
 
-        linkFileName = getRelativePath(occ) + getSourceName();
-        linkString = "<a class=\"varRef\" title=\"" + getType().getName()
-                + "\" " + "href=" + linkFileName + "#"
-                + getClassScopeName() + ">" + getName() + "</a>";
+        linkFileName = getRelativePath( occ ) + getSourceName();
+        linkString = "<a class=\"varRef\" title=\"" + getType().getName() + "\" " + "href=" + linkFileName + "#"
+            + getClassScopeName() + ">" + getName() + "</a>";
 
-        HTMLTag t = new HTMLTag(occ, getName(), linkString);
+        HTMLTag t = new HTMLTag( occ, getName(), linkString );
 
         return t;
     }
@@ -169,53 +176,60 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#resolveTypes(org.apache.maven.jxr.java.src.symtab.SymbolTable)
      */
-    void resolveTypes(SymbolTable symbolTable) {
+    void resolveTypes( SymbolTable symbolTable )
+    {
 
-        if ((type != null) && (type instanceof DummyClass)) {
+        if ( ( type != null ) && ( type instanceof DummyClass ) )
+        {
 
             // resolve the type of the variable
-            ClassDef newType = symbolTable.lookupDummy(type);
+            ClassDef newType = symbolTable.lookupDummy( type );
 
-            if (newType != null) {
-                newType.addReference(type.getOccurrence());
+            if ( newType != null )
+            {
+                newType.addReference( type.getOccurrence() );
 
                 type = newType;
             }
         }
 
-        super.resolveTypes(symbolTable);
+        super.resolveTypes( symbolTable );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#getClassScopeName()
      */
-    String getClassScopeName() {
+    String getClassScopeName()
+    {
 
         String result;
         Definition parentScope = getParentScope();
         Definition grandParentScope = parentScope.getParentScope();
 
-        if (parentScope instanceof MethodDef)                 // method variable
+        if ( parentScope instanceof MethodDef ) // method variable
         {
-            Definition greatGrandParentScope =
-                    grandParentScope.getParentScope();
+            Definition greatGrandParentScope = grandParentScope.getParentScope();
 
-            if (greatGrandParentScope instanceof ClassDef)    // inner class
+            if ( greatGrandParentScope instanceof ClassDef ) // inner class
+            {
+                result = greatGrandParentScope.getName() + "." + grandParentScope.getName();
+            }
+            else
             {
-                result = greatGrandParentScope.getName() + "."
-                        + grandParentScope.getName();
-            } else {
                 result = grandParentScope.getName();
             }
 
             result += "." + parentScope.getName();
-        } else                                                // class variable
+        }
+        else
+        // class variable
         {
-            if (grandParentScope instanceof ClassDef)         // inner class
+            if ( grandParentScope instanceof ClassDef ) // inner class
+            {
+                result = grandParentScope.getName() + "." + parentScope.getName();
+            }
+            else
             {
-                result = grandParentScope.getName() + "."
-                        + parentScope.getName();
-            } else {
                 result = parentScope.getName();
             }
         }
@@ -228,56 +242,64 @@
     /**
      * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
      */
-    public void writeExternal(ObjectOutput out) throws java.io.IOException {
+    public void writeExternal( ObjectOutput out )
+        throws java.io.IOException
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("writeExternal(ObjectOutput) - persisting VariableDef "+getQualifiedName());
+            log.debug( "writeExternal(ObjectOutput) - persisting VariableDef " + getQualifiedName() );
         }
 
-        out.writeObject(getName());
+        out.writeObject( getName() );
 
         Definition parentScopeOut = getParentScope();
 
-        if (!(parentScopeOut instanceof MethodDef)) {
-            parentScopeOut = new ClassDefProxy((ClassDef) parentScopeOut);
+        if ( !( parentScopeOut instanceof MethodDef ) )
+        {
+            parentScopeOut = new ClassDefProxy( (ClassDef) parentScopeOut );
         }
 
-        out.writeObject(parentScopeOut);
-        out.writeObject(getOccurrence());
+        out.writeObject( parentScopeOut );
+        out.writeObject( getOccurrence() );
 
         ClassDef typeOut;
 
-        if (type instanceof DummyClass) {
+        if ( type instanceof DummyClass )
+        {
             typeOut = type;
-        } else {
-            typeOut = new ClassDefProxy(type);
+        }
+        else
+        {
+            typeOut = new ClassDefProxy( type );
         }
 
-        out.writeObject(typeOut);
+        out.writeObject( typeOut );
     }
 
     /**
      * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
      */
-    public void readExternal(ObjectInput in)
-            throws java.io.IOException, ClassNotFoundException {
-
-        setName((String) in.readObject());
-        SymbolTable.startReadExternal("VariableDef " + getName());
-        setParentScope((ScopedDef) in.readObject());
-        setOccurrence((Occurrence) in.readObject());
+    public void readExternal( ObjectInput in )
+        throws java.io.IOException, ClassNotFoundException
+    {
+
+        setName( (String) in.readObject() );
+        SymbolTable.startReadExternal( "VariableDef " + getName() );
+        setParentScope( (ScopedDef) in.readObject() );
+        setOccurrence( (Occurrence) in.readObject() );
 
         type = (ClassDef) in.readObject();
 
-        setupFileNames();    // TBD: still need this?
+        setupFileNames(); // TBD: still need this?
         SymbolTable.endReadExternal();
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#accept(org.apache.maven.jxr.java.src.symtab.Visitor)
      */
-    public void accept(Visitor visitor) {
-        visitor.visit(this);
+    public void accept( Visitor visitor )
+    {
+        visitor.visit( this );
     }
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Visitor.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Visitor.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Visitor.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Visitor.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.symtab;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,40 +16,40 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.symtab;
 
 /**
  * All visitors implement this public.
  *
  * @version $Id: $
  */
-public interface Visitor {
+public interface Visitor
+{
 
     /**
      * Method visit
      *
      * @param def
      */
-    public void visit(PackageDef def);
+    public void visit( PackageDef def );
 
     /**
      * Method visit
      *
      * @param def
      */
-    public void visit(ClassDef def);
+    public void visit( ClassDef def );
 
     /**
      * Method visit
      *
      * @param def
      */
-    public void visit(MethodDef def);
+    public void visit( MethodDef def );
 
     /**
      * Method visit
      *
      * @param def
      */
-    public void visit(VariableDef def);
+    public void visit( VariableDef def );
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSCollections.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSCollections.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSCollections.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSCollections.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.util;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.util;
 
 import java.util.Comparator;
 import java.util.Enumeration;
@@ -25,7 +26,8 @@
  *
  * @version $Id: $
  */
-public class JSCollections {
+public class JSCollections
+{
 
     /**
      * Method sortEnumeration
@@ -33,46 +35,52 @@
      * @param unsortedItems
      * @return
      */
-    public static Vector sortEnumeration(Enumeration unsortedItems) {
+    public static Vector sortEnumeration( Enumeration unsortedItems )
+    {
 
         Object element;
         Vector sortedItems;
         JSComparable value;
 
-        if (unsortedItems == null) {
-            return (null);
+        if ( unsortedItems == null )
+        {
+            return ( null );
         }
 
         sortedItems = new Vector();
 
-        while (unsortedItems.hasMoreElements()) {
+        while ( unsortedItems.hasMoreElements() )
+        {
             element = unsortedItems.nextElement();
 
-            if (element instanceof JSComparable == false) {
-                return (null);
+            if ( element instanceof JSComparable == false )
+            {
+                return ( null );
             }
 
             value = (JSComparable) element;
 
-            sortedItems.addElement(value);
+            sortedItems.addElement( value );
         }
 
         Object[] a = new Object[sortedItems.size()];
 
-        for (int i = 0; i < a.length; i++) {
-            a[i] = sortedItems.elementAt(i);
+        for ( int i = 0; i < a.length; i++ )
+        {
+            a[i] = sortedItems.elementAt( i );
         }
 
         QSComparator compare = new QSComparator();
 
-        QuickSort.sort(a, compare);
+        QuickSort.sort( a, compare );
         sortedItems.removeAllElements();
 
-        for (int i = 0; i < a.length; i++) {
-            sortedItems.addElement(a[i]);
+        for ( int i = 0; i < a.length; i++ )
+        {
+            sortedItems.addElement( a[i] );
         }
 
-        return (sortedItems);
+        return ( sortedItems );
     }
 
     /**
@@ -81,23 +89,26 @@
      * @param unsortedItems
      * @return
      */
-    public static Object[] sortVector(Vector unsortedItems) {
+    public static Object[] sortVector( Vector unsortedItems )
+    {
 
-        if (unsortedItems == null) {
-            return (null);
+        if ( unsortedItems == null )
+        {
+            return ( null );
         }
 
         Object[] a = new Object[unsortedItems.size()];
 
-        for (int i = 0; i < a.length; i++) {
-            a[i] = unsortedItems.elementAt(i);
+        for ( int i = 0; i < a.length; i++ )
+        {
+            a[i] = unsortedItems.elementAt( i );
         }
 
         QSComparator compare = new QSComparator();
 
-        QuickSort.sort(a, compare);
+        QuickSort.sort( a, compare );
 
-        return (a);
+        return ( a );
     }
 }
 
@@ -107,7 +118,9 @@
  *
  * @version $Id: $
  */
-class QSComparator implements Comparator {
+class QSComparator
+    implements Comparator
+{
 
     /**
      * Method compare
@@ -116,8 +129,9 @@
      * @param b
      * @return
      */
-    public int compare(Object a, Object b) {
-        return (((JSComparable) a).compareTo((JSComparable) b));
+    public int compare( Object a, Object b )
+    {
+        return ( ( (JSComparable) a ).compareTo( (JSComparable) b ) );
     }
 
     /**
@@ -127,9 +141,11 @@
      * @param b
      * @return
      */
-    public boolean equals(Object a, Object b) {
+    public boolean equals( Object a, Object b )
+    {
 
-        if (((JSComparable) a).compareTo((JSComparable) b) == 0) {
+        if ( ( (JSComparable) a ).compareTo( (JSComparable) b ) == 0 )
+        {
             return true;
         }
 

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSComparable.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSComparable.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSComparable.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/JSComparable.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.util;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -5,29 +7,29 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.util;
 
 /**
  * Interface JSComparable
- * 
+ *
  * @version $Id: $
  */
-public interface JSComparable {
+public interface JSComparable
+{
 
     /**
      * Method compareTo
-     * 
-     * @param o 
-     * @return 
+     *
+     * @param o
+     * @return
      */
-    public int compareTo(Object o);
+    public int compareTo( Object o );
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/QuickSort.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/QuickSort.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/QuickSort.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/QuickSort.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.util;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.util;
 
 import java.util.Comparator;
 
@@ -29,7 +30,8 @@
  *
  * @version $Id: $
  */
-public class QuickSort {
+public class QuickSort
+{
 
     /**
      * Sort array of Objects using the QuickSort algorithm.
@@ -39,9 +41,11 @@
      * @param hi  The current upper bound.
      * @param cmp A Comparator to compare two elements.
      */
-    public static void quickSort(Object s[], int lo, int hi, Comparator cmp) {
+    public static void quickSort( Object s[], int lo, int hi, Comparator cmp )
+    {
 
-        if (lo >= hi) {
+        if ( lo >= hi )
+        {
             return;
         }
 
@@ -49,9 +53,10 @@
          * Use median-of-three(lo, mid, hi) to pick a partition.  Also
          * swap them into relative order while we are at it.
          */
-        int mid = (lo + hi) / 2;
+        int mid = ( lo + hi ) / 2;
 
-        if (cmp.compare(s[lo], s[mid]) > 0) {
+        if ( cmp.compare( s[lo], s[mid] ) > 0 )
+        {
 
             // Swap.
             Object tmp = s[lo];
@@ -60,7 +65,8 @@
             s[mid] = tmp;
         }
 
-        if (cmp.compare(s[mid], s[hi]) > 0) {
+        if ( cmp.compare( s[mid], s[hi] ) > 0 )
+        {
 
             // Swap .
             Object tmp = s[mid];
@@ -68,7 +74,8 @@
             s[mid] = s[hi];
             s[hi] = tmp;
 
-            if (cmp.compare(s[lo], s[mid]) > 0) {
+            if ( cmp.compare( s[lo], s[mid] ) > 0 )
+            {
 
                 // Swap.
                 Object tmp2 = s[lo];
@@ -85,22 +92,27 @@
         int right = hi - 1;
 
         // If there are three or fewer elements, we are done.
-        if (left >= right) {
+        if ( left >= right )
+        {
             return;
         }
 
         Object partition = s[mid];
 
-        for (; ;) {
-            while (cmp.compare(s[right], partition) > 0) {
+        for ( ;; )
+        {
+            while ( cmp.compare( s[right], partition ) > 0 )
+            {
                 --right;
             }
 
-            while ((left < right) && (cmp.compare(s[left], partition) <= 0)) {
+            while ( ( left < right ) && ( cmp.compare( s[left], partition ) <= 0 ) )
+            {
                 ++left;
             }
 
-            if (left < right) {
+            if ( left < right )
+            {
 
                 // Swap.
                 Object tmp = s[left];
@@ -109,13 +121,15 @@
                 s[right] = tmp;
 
                 --right;
-            } else {
+            }
+            else
+            {
                 break;
             }
         }
 
-        quickSort(s, lo, left, cmp);
-        quickSort(s, left + 1, hi, cmp);
+        quickSort( s, lo, left, cmp );
+        quickSort( s, left + 1, hi, cmp );
     }
 
     /**
@@ -124,7 +138,8 @@
      * @param data An Object[].
      * @param cmp  A Comparator to compare two elements.
      */
-    public static void sort(Object[] data, Comparator cmp) {
-        quickSort(data, 0, data.length - 1, cmp);
+    public static void sort( Object[] data, Comparator cmp )
+    {
+        quickSort( data, 0, data.length - 1, cmp );
     }
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SkipCRInputStream.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SkipCRInputStream.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SkipCRInputStream.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SkipCRInputStream.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.util;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.util;
 
 import java.io.BufferedInputStream;
 import java.io.IOException;
@@ -25,15 +26,18 @@
  *
  * @version $Id: $
  */
-public class SkipCRInputStream extends BufferedInputStream {
+public class SkipCRInputStream
+    extends BufferedInputStream
+{
 
     /**
      * Constructor SkipCRInputStream
      *
      * @param s
      */
-    public SkipCRInputStream(InputStream s) {
-        super(s);
+    public SkipCRInputStream( InputStream s )
+    {
+        super( s );
     }
 
     /**
@@ -42,18 +46,22 @@
      * @param s
      * @param size
      */
-    public SkipCRInputStream(InputStream s, int size) {
-        super(s, size);
+    public SkipCRInputStream( InputStream s, int size )
+    {
+        super( s, size );
     }
 
     /**
      * @see java.io.BufferedInputStream#read()
      */
-    public int read() throws IOException {
+    public int read()
+        throws IOException
+    {
 
         int c = super.read();
 
-        if (c == 13) {
+        if ( c == 13 )
+        {
             return super.read();
         }
 

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SortableString.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SortableString.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SortableString.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/util/SortableString.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.util;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,21 +16,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.util;
 
 /**
  * Class SortableString
  *
  * @version $Id: $
  */
-public class SortableString implements JSComparable {
+public class SortableString
+    implements JSComparable
+{
 
     /**
      * Method getString
      *
      * @return
      */
-    public String getString() {
+    public String getString()
+    {
         return _s;
     }
 
@@ -37,15 +41,17 @@
      *
      * @param s
      */
-    public SortableString(String s) {
+    public SortableString( String s )
+    {
         _s = s;
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.util.JSComparable#compareTo(java.lang.Object)
      */
-    public int compareTo(Object o) {
-        return _s.compareTo(((SortableString) o).getString());
+    public int compareTo( Object o )
+    {
+        return _s.compareTo( ( (SortableString) o ).getString() );
     }
 
     /** Field _s */

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/FileListener.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/FileListener.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/FileListener.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/FileListener.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.xref;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.xref;
 
 /**
  * Somebody that wants to know about each file that the
@@ -22,12 +23,13 @@
  *
  * @version $Id: $
  */
-public interface FileListener {
+public interface FileListener
+{
 
     /**
      * Called each time a new file is processed.
      *
      * @param path The absolute path of the file that's currently  being processed.
      */
-    public void notify(String path);
+    public void notify( String path );
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/JavaToken.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/JavaToken.java?rev=584326&r1=584325&r2=584326&view=diff
==============================================================================
--- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/JavaToken.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/xref/JavaToken.java Fri Oct 12 16:37:59 2007
@@ -1,3 +1,5 @@
+package org.apache.maven.jxr.java.src.xref;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -14,7 +16,6 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.xref;
 
 import java.io.File;
 
@@ -26,7 +27,9 @@
  *
  * @version $Id: $
  */
-public class JavaToken extends antlr.CommonToken {
+public class JavaToken
+    extends antlr.CommonToken
+{
 
     // ==========================================================================
     // ==  Class Variables
@@ -59,14 +62,16 @@
     /**
      * @see antlr.CommonToken#getColumn()
      */
-    public int getColumn() {
+    public int getColumn()
+    {
         return column;
     }
 
     /**
      * @see antlr.CommonToken#setColumn(int)
      */
-    public void setColumn(int c) {
+    public void setColumn( int c )
+    {
         column = c;
     }
 
@@ -75,7 +80,8 @@
      *
      * @return
      */
-    public String getPackageName() {
+    public String getPackageName()
+    {
         return packageName;
     }
 
@@ -84,11 +90,15 @@
      *
      * @param name
      */
-    public void setPackageName(String name) {
+    public void setPackageName( String name )
+    {
 
-        if (name != null) {
+        if ( name != null )
+        {
             packageName = name.intern();
-        } else {
+        }
+        else
+        {
             packageName = null;
         }
     }
@@ -98,7 +108,8 @@
      *
      * @return
      */
-    public String getClassName() {
+    public String getClassName()
+    {
         return className;
     }
 
@@ -107,11 +118,15 @@
      *
      * @param name
      */
-    public void setClassName(String name) {
+    public void setClassName( String name )
+    {
 
-        if (name != null) {
+        if ( name != null )
+        {
             className = name.intern();
-        } else {
+        }
+        else
+        {
             className = null;
         }
     }
@@ -121,7 +136,8 @@
      *
      * @return
      */
-    public String getMethodName() {
+    public String getMethodName()
+    {
         return methodName;
     }
 
@@ -130,11 +146,15 @@
      *
      * @param name
      */
-    public void setMethodName(String name) {
+    public void setMethodName( String name )
+    {
 
-        if (name != null) {
+        if ( name != null )
+        {
             methodName = name.intern();
-        } else {
+        }
+        else
+        {
             methodName = null;
         }
     }
@@ -146,7 +166,8 @@
     /**
      * Constructor JavaToken
      */
-    public JavaToken() {
+    public JavaToken()
+    {
     }
 
     /**
@@ -154,22 +175,26 @@
      *
      * @param t
      */
-    public JavaToken(JavaToken t) {
+    public JavaToken( JavaToken t )
+    {
 
         column = t.getColumn();
         file = t.getFile();
         packageName = t.getPackageName();
         paramCount = t.getParamCount();
 
-        this.setLine(t.getLine());
+        this.setLine( t.getLine() );
 
-        if (t.getText() != null) {
-            this.setText(t.getText().intern());
-        } else {
-            this.setText(null);
+        if ( t.getText() != null )
+        {
+            this.setText( t.getText().intern() );
+        }
+        else
+        {
+            this.setText( null );
         }
 
-        this.setType(t.getType());
+        this.setType( t.getType() );
     }
 
     /**
@@ -177,7 +202,8 @@
      *
      * @return
      */
-    public File getFile() {
+    public File getFile()
+    {
         return file;
     }
 
@@ -187,7 +213,8 @@
      *
      * @return
      */
-    public int getParamCount() {
+    public int getParamCount()
+    {
         return paramCount;
     }
 
@@ -196,7 +223,8 @@
      *
      * @param file
      */
-    public void setFile(File file) {
+    public void setFile( File file )
+    {
         this.file = file;
     }
 
@@ -205,17 +233,18 @@
      *
      * @param count
      */
-    public void setParamCount(int count) {
+    public void setParamCount( int count )
+    {
         paramCount = count;
     }
 
     /**
      * @see antlr.CommonToken#toString()
      */
-    public String toString() {
+    public String toString()
+    {
 
-        return "[\"" + getText() + "\",type:<" + getType() + ">,line:"
-                + getLine() + ",col:" + getColumn() + ",file:"
-                + getFile().getName() + "]";
+        return "[\"" + getText() + "\",type:<" + getType() + ">,line:" + getLine() + ",col:" + getColumn() + ",file:"
+            + getFile().getName() + "]";
     }
 }