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 [5/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/JavaStack.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/JavaStack.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/JavaStack.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/JavaStack.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;
 
@@ -24,7 +25,9 @@
  *
  * @version $Id: $
  */
-class JavaStack extends java.util.Stack {
+class JavaStack
+    extends java.util.Stack
+{
 
     private static final long serialVersionUID = -3104650488343130699L;
 
@@ -38,7 +41,8 @@
     /**
      * A constructor for the Java stack
      */
-    JavaStack() {
+    JavaStack()
+    {
     }
 
     /**
@@ -46,14 +50,17 @@
      *
      * @return
      */
-    Definition findTopmostClass() {
+    Definition findTopmostClass()
+    {
 
         // unfortunately, the enumeration of a stack returns it
         // in the reverse order in which we want to traverse it...
         // So we must walk manually...
-        for (int i = size() - 1; i > -1; i--) {
-            if ((elementAt(i)) instanceof ClassDef) {
-                return (Definition) elementAt(i);
+        for ( int i = size() - 1; i > -1; i-- )
+        {
+            if ( ( elementAt( i ) ) instanceof ClassDef )
+            {
+                return (Definition) elementAt( i );
             }
         }
 
@@ -68,8 +75,9 @@
      * @param type
      * @return
      */
-    Definition lookup(String name, Class type) {
-        return lookup(name, -1, type);
+    Definition lookup( String name, Class type )
+    {
+        return lookup( name, -1, type );
     }
 
     /**
@@ -80,34 +88,37 @@
      * @param type
      * @return
      */
-    Definition lookup(String name, int numParams, Class type) {
+    Definition lookup( String name, int numParams, Class type )
+    {
 
         // unfortunately, the enumeration of a stack returns it
         // in the reverse order in which we want to traverse it...
         // So we must walk manually...
-        for (int i = size() - 1; i > -1; i--) {
-            Definition ld = (Definition) elementAt(i);
+        for ( int i = size() - 1; i > -1; i-- )
+        {
+            Definition ld = (Definition) elementAt( i );
 
-            if (log.isDebugEnabled())
+            if ( log.isDebugEnabled() )
             {
-                log.debug("lookup(String, int, Class) - looking in "+ld.getName());
+                log.debug( "lookup(String, int, Class) - looking in " + ld.getName() );
             }
 
-            Definition d = ld.lookup(name, numParams, type);
+            Definition d = ld.lookup( name, numParams, type );
 
-            if (d != null) {
+            if ( d != null )
+            {
 
-                if (log.isDebugEnabled())
+                if ( log.isDebugEnabled() )
                 {
-                    log.debug("lookup(String, int, Class) - returning "+d+" type="+type);
+                    log.debug( "lookup(String, int, Class) - returning " + d + " type=" + type );
                 }
                 return d;
             }
         }
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("lookup(String, int, Class) - returning null");
+            log.debug( "lookup(String, int, Class) - returning null" );
         }
         return null;
     }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/JavaVector.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/JavaVector.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/JavaVector.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/JavaVector.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,12 +16,10 @@
  * 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;
 import org.apache.maven.jxr.java.src.xref.JavaToken;
 
-
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.ObjectInput;
@@ -33,8 +33,10 @@
  *
  * @version $Id: $
  */
-public class JavaVector extends java.util.Vector
-        implements java.io.Externalizable {
+public class JavaVector
+    extends java.util.Vector
+    implements java.io.Externalizable
+{
 
     /** Logger for this class  */
     private static final Logger log = Logger.getLogger( JavaVector.class );
@@ -56,7 +58,8 @@
     /**
      * Constructor to create a new Java vector
      */
-    public JavaVector() {
+    public JavaVector()
+    {
         super();
     }
 
@@ -65,12 +68,14 @@
      *
      * @param o
      */
-    public void addElement(Definition o) {
+    public void addElement( Definition o )
+    {
 
-        super.addElement(o);
+        super.addElement( o );
 
-        if (o == null) {
-            throw new IllegalArgumentException("null element added to vector");
+        if ( o == null )
+        {
+            throw new IllegalArgumentException( "null element added to vector" );
         }
     }
 
@@ -80,14 +85,17 @@
      * @param name
      * @return
      */
-    public Definition getElement(String name) {
+    public Definition getElement( String name )
+    {
 
         Enumeration e = elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Definition d = (Definition) e.nextElement();
 
-            if (d.getName().equals(name)) {
+            if ( d.getName().equals( name ) )
+            {
                 return d;
             }
         }
@@ -100,12 +108,14 @@
      *
      * @param tagList
      */
-    void generateTags(HTMLTagContainer tagList) {
+    void generateTags( HTMLTagContainer tagList )
+    {
 
         Enumeration e = elements();
 
-        while (e.hasMoreElements()) {
-            ((Taggable) e.nextElement()).generateTags(tagList);
+        while ( e.hasMoreElements() )
+        {
+            ( (Taggable) e.nextElement() ).generateTags( tagList );
         }
     }
 
@@ -114,17 +124,20 @@
      *
      * @param output
      */
-    void generateReferences(FileWriter output) {
+    void generateReferences( FileWriter output )
+    {
 
         Enumeration e = elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Object element = e.nextElement();
 
-            if (element instanceof Definition) {
+            if ( element instanceof Definition )
+            {
                 Definition d = (Definition) element;
 
-                d.generateReferences(output);
+                d.generateReferences( output );
             }
         }
     }
@@ -134,52 +147,54 @@
      *
      * @param symbolTable
      */
-    public void resolveRefs(SymbolTable symbolTable) {
+    public void resolveRefs( SymbolTable symbolTable )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("resolveRefs(SymbolTable) - SymbolTable symbolTable=" + symbolTable);
+            log.debug( "resolveRefs(SymbolTable) - SymbolTable symbolTable=" + symbolTable );
         }
 
-        if (!resolvingRefs) {
+        if ( !resolvingRefs )
+        {
             resolvingRefs = true;
 
             // resolve each element in the list
             Enumeration e = elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 JavaToken t = (JavaToken) e.nextElement();
 
-                if (log.isDebugEnabled())
+                if ( log.isDebugEnabled() )
                 {
-                    log.debug("resolveRefs(SymbolTable) - resolve "+t.getText()+" file="+t.getFile().getAbsolutePath()+":"+t.getLine());
+                    log.debug( "resolveRefs(SymbolTable) - resolve " + t.getText() + " file="
+                        + t.getFile().getAbsolutePath() + ":" + t.getLine() );
                 }
 
-                Definition d = symbolTable.lookup(t.getText(),
-                        t.getParamCount(), null);
+                Definition d = symbolTable.lookup( t.getText(), t.getParamCount(), null );
 
-                if (d == null) {
-                    d = symbolTable.findPackage(t.getText());
+                if ( d == null )
+                {
+                    d = symbolTable.findPackage( t.getText() );
                 }
 
-                if (d != null) {
+                if ( d != null )
+                {
 
-                    if (log.isDebugEnabled())
+                    if ( log.isDebugEnabled() )
                     {
-                        log.debug("resolveRefs(SymbolTable) - Found reference:"+d.getQualifiedName());
+                        log.debug( "resolveRefs(SymbolTable) - Found reference:" + d.getQualifiedName() );
                     }
-                    d.addReference(new Occurrence(t.getFile(), t.getLine(),
-                            t.getColumn(),
-                            t.getPackageName(),
-                            t.getClassName(),
-                            t.getMethodName()));
-                    d.resolveRefs(symbolTable);
+                    d.addReference( new Occurrence( t.getFile(), t.getLine(), t.getColumn(), t.getPackageName(), t
+                        .getClassName(), t.getMethodName() ) );
+                    d.resolveRefs( symbolTable );
                 }
                 else
                 {
-                    if (log.isDebugEnabled())
+                    if ( log.isDebugEnabled() )
                     {
-                        log.debug("resolveRefs(SymbolTable) - Could not resolve "+t.getText());
+                        log.debug( "resolveRefs(SymbolTable) - Could not resolve " + t.getText() );
                     }
                 }
             }
@@ -191,37 +206,44 @@
      *
      * @param symbolTable
      */
-    public void resolveTypes(SymbolTable symbolTable) {
+    public void resolveTypes( SymbolTable symbolTable )
+    {
 
-        if (!resolvingTypes) {
+        if ( !resolvingTypes )
+        {
             resolvingTypes = true;
 
             Enumeration e = elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 Definition d = (Definition) e.nextElement();
 
-                if (d instanceof DummyClass) {
-                    String pkg = ((DummyClass) d).getPackage();
+                if ( d instanceof DummyClass )
+                {
+                    String pkg = ( (DummyClass) d ).getPackage();
 
-                    if (log.isDebugEnabled())
+                    if ( log.isDebugEnabled() )
                     {
-                        log.debug("resolveTypes(SymbolTable) - resolving pkg="+pkg+" name="+d.getName());
+                        log.debug( "resolveTypes(SymbolTable) - resolving pkg=" + pkg + " name=" + d.getName() );
                     }
-                    Definition newD = symbolTable.lookupDummy(d);
+                    Definition newD = symbolTable.lookupDummy( d );
 
-                    if (newD != null) {
+                    if ( newD != null )
+                    {
 
-                        if (log.isDebugEnabled())
+                        if ( log.isDebugEnabled() )
                         {
-                            log.debug("resolveTypes(SymbolTable) - resolved pkg="+pkg+" name="+d.getName());
+                            log.debug( "resolveTypes(SymbolTable) - resolved pkg=" + pkg + " name=" + d.getName() );
                         }
-                        newD.addReference(d.getOccurrence());
-                        removeElement(d);
-                        addElement(newD);
+                        newD.addReference( d.getOccurrence() );
+                        removeElement( d );
+                        addElement( newD );
                     }
-                } else {
-                    d.resolveTypes(symbolTable);
+                }
+                else
+                {
+                    d.resolveTypes( symbolTable );
                 }
             }
         }
@@ -230,36 +252,39 @@
     /**
      * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
      */
-    public void writeExternal(ObjectOutput out) throws IOException {
+    public void writeExternal( ObjectOutput out )
+        throws IOException
+    {
 
         Vector vOut = new Vector();
         Enumeration e = elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Definition d = (Definition) e.nextElement();
 
-            if ((d instanceof ClassDef)
-                    && !((d instanceof ClassDefProxy)
-                    || (d instanceof PrimitiveDef)
-                    || (d instanceof DummyClass))) {
-                d = new ClassDefProxy((ClassDef) d);
+            if ( ( d instanceof ClassDef )
+                && !( ( d instanceof ClassDefProxy ) || ( d instanceof PrimitiveDef ) || ( d instanceof DummyClass ) ) )
+            {
+                d = new ClassDefProxy( (ClassDef) d );
             }
 
-            vOut.addElement(d);
+            vOut.addElement( d );
         }
 
-        out.writeObject(vOut);
+        out.writeObject( vOut );
     }
 
     /**
      * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
      */
-    public void readExternal(ObjectInput in)
-            throws IOException, ClassNotFoundException {
+    public void readExternal( ObjectInput in )
+        throws IOException, ClassNotFoundException
+    {
 
         Vector v = (Vector) in.readObject();
 
-        addAll(v);
+        addAll( v );
     }
 
     /**
@@ -268,14 +293,16 @@
      *
      * @param visitor
      */
-    public void accept(Visitor visitor) {
+    public void accept( Visitor visitor )
+    {
 
         Enumeration enumList = elements();
 
-        while (enumList.hasMoreElements()) {
+        while ( enumList.hasMoreElements() )
+        {
             Definition def = (Definition) enumList.nextElement();
 
-            def.accept(visitor);
+            def.accept( visitor );
         }
     }
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/LabelDef.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/LabelDef.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/LabelDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/LabelDef.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,14 +16,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.maven.jxr.java.src.symtab;
 
 /**
  * A label that appears in the source file.
  *
  * @version $Id: $
  */
-class LabelDef extends Definition {
+class LabelDef
+    extends Definition
+{
 
     private static final long serialVersionUID = -2054703202457275137L;
 
@@ -36,16 +39,18 @@
      * @param occ
      * @param parentScope
      */
-    LabelDef(String name, // name of the label
-             Occurrence occ, // where it was defined
-             ScopedDef parentScope) {    // scope containing the def
-        super(name, occ, parentScope);
+    LabelDef( String name, // name of the label
+              Occurrence occ, // where it was defined
+              ScopedDef parentScope )
+    { // scope containing the def
+        super( name, occ, parentScope );
     }
 
     /**
      * @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 )
+    {
 
         // state that this is a label
         // System.out.println(getQualifiedName() + " (Label) " + getDef());
@@ -56,7 +61,8 @@
     /**
      * @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 )
+    {
         return null;
     }
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/MethodDef.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/MethodDef.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/MethodDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/MethodDef.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;
 
@@ -31,7 +32,10 @@
  *
  * @version $Id: $
  */
-public class MethodDef extends ScopedDef implements TypedDef, Externalizable {
+public class MethodDef
+    extends ScopedDef
+    implements TypedDef, Externalizable
+{
 
     /** Logger for this class  */
     private static final Logger log = Logger.getLogger( MethodDef.class );
@@ -62,7 +66,8 @@
     /**
      * Default constructor needs to be public for deserialization.
      */
-    public MethodDef() {
+    public MethodDef()
+    {
     }
 
     /**
@@ -73,13 +78,13 @@
      * @param type
      * @param parentScope
      */
-    MethodDef(String name, // the name of the method
-              Occurrence occ, // where it was defined
-              ClassDef type, // the return type of the method
-              ScopedDef parentScope)    // which scope owns it
+    MethodDef( String name, // the name of the method
+               Occurrence occ, // where it was defined
+               ClassDef type, // the return type of the method
+               ScopedDef parentScope ) // which scope owns it
     {
 
-        super(name, occ, parentScope);
+        super( name, occ, parentScope );
 
         this.type = type;
     }
@@ -93,17 +98,21 @@
      * @param type
      * @param parentScope
      */
-    MethodDef(String name, // the name of the method
-              String className, // className (for constructor methods)
-              Occurrence occ, // where it was defined
-              ClassDef type, // the return type of the method
-              ScopedDef parentScope) {    // which scope owns it
+    MethodDef( String name, // the name of the method
+               String className, // className (for constructor methods)
+               Occurrence occ, // where it was defined
+               ClassDef type, // the return type of the method
+               ScopedDef parentScope )
+    { // which scope owns it
 
-        this(name, occ, type, parentScope);
+        this( name, occ, type, parentScope );
 
-        if (className != null) {
+        if ( className != null )
+        {
             this.className = className.intern();
-        } else {
+        }
+        else
+        {
             this.className = className;
         }
     }
@@ -113,7 +122,8 @@
      *
      * @return
      */
-    public Vector getParameters() {
+    public Vector getParameters()
+    {
         return parameters;
     }
 
@@ -122,7 +132,8 @@
      *
      * @return
      */
-    public Vector getExceptions() {
+    public Vector getExceptions()
+    {
         return exceptions;
     }
 
@@ -131,7 +142,8 @@
      *
      * @return
      */
-    public String getClassName() {
+    public String getClassName()
+    {
         return className;
     }
 
@@ -140,13 +152,15 @@
      *
      * @param excep
      */
-    void add(ClassDef excep) {
+    void add( ClassDef excep )
+    {
 
-        if (exceptions == null) {    // lazy instantiation
+        if ( exceptions == null )
+        { // lazy instantiation
             exceptions = new JavaVector();
         }
 
-        exceptions.addElement(excep);
+        exceptions.addElement( excep );
     }
 
     /**
@@ -154,13 +168,15 @@
      *
      * @param param
      */
-    void add(VariableDef param) {
+    void add( VariableDef param )
+    {
 
-        if (parameters == null) {    // lazy instantiation
+        if ( parameters == null )
+        { // lazy instantiation
             parameters = new JavaVector();
         }
 
-        parameters.addElement(param);
+        parameters.addElement( param );
     }
 
     /**
@@ -168,23 +184,28 @@
      *
      * @return
      */
-    String getFullName() {
+    String getFullName()
+    {
 
-        if (_uniqueMethodString != null) {
-            return (_uniqueMethodString);
+        if ( _uniqueMethodString != null )
+        {
+            return ( _uniqueMethodString );
         }
 
         _uniqueMethodString = getName() + "(";
 
-        if (parameters != null) {
+        if ( parameters != null )
+        {
             Enumeration e = parameters.elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 VariableDef d = (VariableDef) e.nextElement();
 
                 _uniqueMethodString += d.getType().getName();
 
-                if (e.hasMoreElements()) {
+                if ( e.hasMoreElements() )
+                {
                     _uniqueMethodString += ",";
                 }
             }
@@ -192,7 +213,7 @@
 
         _uniqueMethodString += ")";
 
-        return (_uniqueMethodString);
+        return ( _uniqueMethodString );
     }
 
     /**
@@ -200,9 +221,11 @@
      *
      * @return
      */
-    int getParamCount() {
+    int getParamCount()
+    {
 
-        if (parameters == null) {
+        if ( parameters == null )
+        {
             return 0;
         }
 
@@ -212,7 +235,8 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.TypedDef#getType()
      */
-    public Definition getType() {
+    public Definition getType()
+    {
         return type;
     }
 
@@ -224,31 +248,37 @@
      * @param type
      * @return
      */
-    Definition lookup(String name, int numParams, Class type) {
+    Definition lookup( String name, int numParams, Class type )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("lookup(String, int, Class) - String name=" + name);
-            log.debug("lookup(String, int, Class) - String numParams=" + numParams);
+            log.debug( "lookup(String, int, Class) - String name=" + name );
+            log.debug( "lookup(String, int, Class) - String numParams=" + numParams );
         }
 
-        if (numParams == -1) {
+        if ( numParams == -1 )
+        {
 
             // look for it in the method's scope
-            Definition d = super.lookup(name, numParams, type);
+            Definition d = super.lookup( name, numParams, type );
 
-            if (d != null) {
+            if ( d != null )
+            {
                 return d;
             }
 
             // otherwise, look in the parameters for the method
-            if (parameters != null) {
+            if ( parameters != null )
+            {
                 Enumeration e = parameters.elements();
 
-                while (e.hasMoreElements()) {
+                while ( e.hasMoreElements() )
+                {
                     d = (Definition) e.nextElement();
 
-                    if (d.getName().equals(name) && d.isA(type)) {
+                    if ( d.getName().equals( name ) && d.isA( type ) )
+                    {
                         return d;
                     }
                 }
@@ -261,49 +291,49 @@
     /**
      * @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;
         String methodName = getName();
 
-        if ((methodName != null)
-                && (methodName.indexOf("~constructor~") >= 0)) {
+        if ( ( methodName != null ) && ( methodName.indexOf( "~constructor~" ) >= 0 ) )
+        {
             methodName = this.className;
         }
 
-        try {
-            output.write("<p class=\"methodReflist\">");
+        try
+        {
+            output.write( "<p class=\"methodReflist\">" );
 
-            String nameString =
-                    "<p class=\"methodReflistHeader\">Method: <a name="
-                    + getFullName() + " href=" + getSourceName() + "#"
-                    + getClassScopeName() + ">" + getFullName() + "</a></p>";
+            String nameString = "<p class=\"methodReflistHeader\">Method: <a name=" + getFullName() + " href="
+                + getSourceName() + "#" + getClassScopeName() + ">" + getFullName() + "</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=\"methodRefItem\"><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=\"methodRefItem\"><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 );
         }
     }
@@ -311,68 +341,72 @@
     /**
      * @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 methodName = getName();
 
-        if ((methodName != null)
-                && (methodName.indexOf("~constructor~") >= 0)) {
+        if ( ( methodName != null ) && ( methodName.indexOf( "~constructor~" ) >= 0 ) )
+        {
             methodName = this.className;
         }
 
-        if ((methodName != null) && (methodName.indexOf("~class-init~") >= 0)) {
+        if ( ( methodName != null ) && ( methodName.indexOf( "~class-init~" ) >= 0 ) )
+        {
             methodName = "";
         }
 
-        String nameString = "<a class=\"methodDef\" name="
-                + getClassScopeName() + " href=" + getRefName()
-                + "#" + getClassScopeName() + ">" + methodName
-                + "</a>";
+        String nameString = "<a class=\"methodDef\" name=" + getClassScopeName() + " href=" + getRefName() + "#"
+            + getClassScopeName() + ">" + methodName + "</a>";
 
         // generate tag for this method
-        if (getOccurrence() == null) {
+        if ( getOccurrence() == null )
+        {
             return;
         }
 
-        HTMLTag t = new HTMLTag(getOccurrence(), methodName, nameString);
+        HTMLTag t = new HTMLTag( getOccurrence(), methodName, nameString );
 
-        tagList.addElement(t);
+        tagList.addElement( t );
 
-        if(parameters != null) {
-            parameters.generateTags(tagList);
+        if ( parameters != null )
+        {
+            parameters.generateTags( tagList );
         }
 
-        if(elements != null){
-            elements.tagElements(tagList);
+        if ( elements != null )
+        {
+            elements.tagElements( tagList );
         }
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.ScopedDef#getOccurrenceTag(org.apache.maven.jxr.java.src.symtab.Occurrence)
      */
-    public HTMLTag getOccurrenceTag(Occurrence occ) {
+    public HTMLTag getOccurrenceTag( Occurrence occ )
+    {
 
         String methodName = getName();
         String linkString;
         String linkFileName;
 
-        if ((methodName != null)
-                && (methodName.indexOf("~constructor~") >= 0)) {
+        if ( ( methodName != null ) && ( methodName.indexOf( "~constructor~" ) >= 0 ) )
+        {
             methodName = this.className;
         }
 
-        if ((methodName != null) && (methodName.indexOf("~class-init~") >= 0)) {
+        if ( ( methodName != null ) && ( methodName.indexOf( "~class-init~" ) >= 0 ) )
+        {
             methodName = "";
         }
 
         String definerName = getOccurrence().getClassName();
 
-        linkFileName = getRelativePath(occ) + getSourceName();
-        linkString = "<a class=\"methodRef\" title=\"" + definerName + "\" "
-                + "href=" + linkFileName + "#" + getClassScopeName()
-                + ">" + methodName + "</a>";
+        linkFileName = getRelativePath( occ ) + getSourceName();
+        linkString = "<a class=\"methodRef\" title=\"" + definerName + "\" " + "href=" + linkFileName + "#"
+            + getClassScopeName() + ">" + methodName + "</a>";
 
-        HTMLTag t = new HTMLTag(occ, methodName, linkString);
+        HTMLTag t = new HTMLTag( occ, methodName, linkString );
 
         return t;
     }
@@ -380,35 +414,40 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.ScopedDef#resolveTypes(org.apache.maven.jxr.java.src.symtab.SymbolTable)
      */
-    void resolveTypes(SymbolTable symbolTable) {
+    void resolveTypes( SymbolTable symbolTable )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("resolveTypes(SymbolTable) - SymbolTable symbolTable=" + symbolTable);
+            log.debug( "resolveTypes(SymbolTable) - SymbolTable symbolTable=" + symbolTable );
         }
 
         // if we have parameters and/or exceptions, resolve them
-        if (parameters != null) {
-            parameters.resolveTypes(symbolTable);
+        if ( parameters != null )
+        {
+            parameters.resolveTypes( symbolTable );
         }
 
-        if (exceptions != null) {
-            exceptions.resolveTypes(symbolTable);
+        if ( exceptions != null )
+        {
+            exceptions.resolveTypes( symbolTable );
         }
 
         // if we have a return type, resolve it
-        if ((type != null) && (type instanceof DummyClass)) {
-            ClassDef newType = symbolTable.lookupDummy(type);
+        if ( ( type != null ) && ( type instanceof DummyClass ) )
+        {
+            ClassDef newType = symbolTable.lookupDummy( type );
 
-            if (newType != null) {
-                newType.addReference(type.getOccurrence());
+            if ( newType != null )
+            {
+                newType.addReference( type.getOccurrence() );
 
                 type = newType;
             }
         }
 
         // perform resolution for our superclass
-        super.resolveTypes(symbolTable);
+        super.resolveTypes( symbolTable );
     }
 
     /**
@@ -416,23 +455,27 @@
      *
      * @param exceptions
      */
-    void setExceptions(JavaVector exceptions) {
+    void setExceptions( JavaVector exceptions )
+    {
         this.exceptions = exceptions;
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#getClassScopeName()
      */
-    String getClassScopeName() {
+    String getClassScopeName()
+    {
 
         String result;
         Definition parentScope = getParentScope();
         Definition grandParentScope = parentScope.getParentScope();
 
-        if (grandParentScope instanceof ClassDef)    // inner class
+        if ( grandParentScope instanceof ClassDef ) // inner class
         {
             result = grandParentScope.getName() + "." + parentScope.getName();
-        } else {
+        }
+        else
+        {
             result = parentScope.getName();
         }
 
@@ -444,33 +487,37 @@
     /**
      * @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
+    {
 
-        out.writeObject(getName());
-        out.writeObject(getParentScope());
-        out.writeObject(getOccurrence());
+        out.writeObject( getName() );
+        out.writeObject( getParentScope() );
+        out.writeObject( getOccurrence() );
 
         ClassDef typeOut = type;
 
-        if ((type != null) && !(type instanceof DummyClass)) {
-            typeOut = new ClassDefProxy(type);
+        if ( ( type != null ) && !( type instanceof DummyClass ) )
+        {
+            typeOut = new ClassDefProxy( type );
         }
 
-        out.writeObject(typeOut);
-        out.writeObject(exceptions);
-        out.writeObject(parameters);
+        out.writeObject( typeOut );
+        out.writeObject( exceptions );
+        out.writeObject( parameters );
     }
 
     /**
      * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
      */
-    public void readExternal(ObjectInput in)
-            throws ClassNotFoundException, IOException {
+    public void readExternal( ObjectInput in )
+        throws ClassNotFoundException, IOException
+    {
 
-        setName((String) in.readObject());
-        SymbolTable.startReadExternal("MethodDef " + getName());
-        setParentScope((ScopedDef) in.readObject());
-        setOccurrence((Occurrence) in.readObject());
+        setName( (String) in.readObject() );
+        SymbolTable.startReadExternal( "MethodDef " + getName() );
+        setParentScope( (ScopedDef) in.readObject() );
+        setOccurrence( (Occurrence) in.readObject() );
 
         type = (ClassDef) in.readObject();
         exceptions = (JavaVector) in.readObject();
@@ -483,22 +530,24 @@
     /**
      * @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);
-        elements.accept(visitor);
+    public void accept( Visitor visitor )
+    {
+        visitor.visit( this );
+        elements.accept( visitor );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#toString()
      */
-    public String toString() {
+    public String toString()
+    {
 
-        String str = getClass().getName() + " [" + getQualifiedName()
-                + "]";
+        String str = getClass().getName() + " [" + getQualifiedName() + "]";
         JavaHashtable ht = getElements();
         Enumeration e = ht.elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Definition d = (Definition) e.nextElement();
 
             str += "\n        " + d;

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/MultiDef.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/MultiDef.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/MultiDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/MultiDef.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 java.io.FileWriter;
 import java.util.Enumeration;
@@ -27,7 +28,9 @@
  *
  * @version $Id: $
  */
-public class MultiDef extends Definition {
+public class MultiDef
+    extends Definition
+{
 
     private static final long serialVersionUID = -4453495874767512434L;
 
@@ -52,9 +55,10 @@
      * @param name
      * @param oldDef
      */
-    MultiDef(String name, // the name of the definition
-             Definition oldDef) {    // a standing def with its name
-        this(name, oldDef.getOccurrence(), oldDef.getParentScope());
+    MultiDef( String name, // the name of the definition
+              Definition oldDef )
+    { // a standing def with its name
+        this( name, oldDef.getOccurrence(), oldDef.getParentScope() );
     }
 
     /**
@@ -64,11 +68,12 @@
      * @param occ
      * @param parentScope
      */
-    MultiDef(String name, // the name of the definition
-             Occurrence occ, // where it was defined
-             ScopedDef parentScope) {    // the overall symbol table
+    MultiDef( String name, // the name of the definition
+              Occurrence occ, // where it was defined
+              ScopedDef parentScope )
+    { // the overall symbol table
 
-        super(name, occ, parentScope);
+        super( name, occ, parentScope );
 
         // Create the list to store the definitions
         defs = new JavaVector();
@@ -79,36 +84,42 @@
      *
      * @param def
      */
-    void addDef(Definition def) {
-        defs.addElement(def);
+    void addDef( Definition def )
+    {
+        defs.addElement( def );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#lookup(java.lang.String, int, java.lang.Class)
      */
-    Definition lookup(String name, // the name to locate
-                      int numParams, // number of params
-                      Class type) {
+    Definition lookup( String name, // the name to locate
+                       int numParams, // number of params
+                       Class type )
+    {
 
         // note that the name isn't used...  all definitions contained
         // by the MultiDef have the same name
         // walk through the list of symbols
         Enumeration e = defs.elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Definition d = (Definition) e.nextElement();
 
             // If the symbol is a method and it has the same number of
             // parameters as what we are calling, assume it's the match
-            if ((d instanceof MethodDef) && d.isA(type)) {
-                if (((MethodDef) d).getParamCount() == numParams) {
+            if ( ( d instanceof MethodDef ) && d.isA( type ) )
+            {
+                if ( ( (MethodDef) d ).getParamCount() == numParams )
+                {
                     return d;
                 }
             }
 
             // otherwise, if it's not a method, AND we're not looking for
             // a method, return the definition found.
-            else if ((numParams == -1) && d.isA(type)) {
+            else if ( ( numParams == -1 ) && d.isA( type ) )
+            {
                 return d;
             }
         }
@@ -120,15 +131,17 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#generateTags(org.apache.maven.jxr.java.src.symtab.HTMLTagContainer)
      */
-    public void generateTags(HTMLTagContainer tagList) {
-        defs.generateTags(tagList);
+    public void generateTags( HTMLTagContainer tagList )
+    {
+        defs.generateTags( tagList );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#generateReferences(java.io.FileWriter)
      */
-    public void generateReferences(FileWriter output) {
-        defs.generateReferences(output);
+    public void generateReferences( FileWriter output )
+    {
+        defs.generateReferences( output );
     }
 
     /**
@@ -136,16 +149,18 @@
      *
      * @return
      */
-    public Vector getDefs() {
+    public Vector getDefs()
+    {
         return defs;
     }
 
     /**
      * @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 )
+    {
 
-        defs.resolveTypes(symbolTable);    // resolve all the definitions
+        defs.resolveTypes( symbolTable ); // resolve all the definitions
 
         // DO NOT resolve anything else! (ie don't call super.resolveTypes() )
         // this is just a placeholder for a group of symbols with the same name
@@ -154,21 +169,24 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#resolveRefs(org.apache.maven.jxr.java.src.symtab.SymbolTable)
      */
-    void resolveRefs(SymbolTable symbolTable) {
+    void resolveRefs( SymbolTable symbolTable )
+    {
 
         Enumeration e = defs.elements();
 
-        while (e.hasMoreElements()) {
+        while ( e.hasMoreElements() )
+        {
             Definition d = (Definition) e.nextElement();
 
-            d.resolveRefs(symbolTable);
+            d.resolveRefs( symbolTable );
         }
     }
 
     /**
      * @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 )
+    {
         return null;
     }
 }

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Occurrence.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/Occurrence.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/Occurrence.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/Occurrence.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 java.io.File;
 import java.io.IOException;
@@ -26,7 +27,9 @@
  *
  * @version $Id: $
  */
-public class Occurrence implements java.io.Externalizable {
+public class Occurrence
+    implements java.io.Externalizable
+{
 
     // ==========================================================================
     // ==  Class Variables
@@ -62,7 +65,8 @@
      *
      * @return
      */
-    public int getLine() {
+    public int getLine()
+    {
         return line;
     }
 
@@ -71,7 +75,8 @@
      *
      * @return
      */
-    public int getColumn() {
+    public int getColumn()
+    {
         return column;
     }
 
@@ -80,7 +85,8 @@
      *
      * @return
      */
-    public File getFile() {
+    public File getFile()
+    {
         return file;
     }
 
@@ -89,7 +95,8 @@
      *
      * @return
      */
-    public String getPackageName() {
+    public String getPackageName()
+    {
         return _packageName;
     }
 
@@ -98,7 +105,8 @@
      *
      * @return
      */
-    public String getClassName() {
+    public String getClassName()
+    {
         return _className;
     }
 
@@ -107,7 +115,8 @@
      *
      * @return
      */
-    public String getMethodName() {
+    public String getMethodName()
+    {
         return _methodName;
     }
 
@@ -116,7 +125,8 @@
      *
      * @return
      */
-    public Definition getDefinition() {
+    public Definition getDefinition()
+    {
         return _myDefinition;
     }
 
@@ -125,11 +135,15 @@
      *
      * @param packageName
      */
-    public void setPackageName(String packageName) {
+    public void setPackageName( String packageName )
+    {
 
-        if (packageName != null) {
+        if ( packageName != null )
+        {
             _packageName = packageName.intern();
-        } else {
+        }
+        else
+        {
             _packageName = packageName;
         }
     }
@@ -139,11 +153,15 @@
      *
      * @param className
      */
-    public void setClassName(String className) {
+    public void setClassName( String className )
+    {
 
-        if (className != null) {
+        if ( className != null )
+        {
             _className = className.intern();
-        } else {
+        }
+        else
+        {
             _className = className;
         }
     }
@@ -153,11 +171,15 @@
      *
      * @param methodName
      */
-    public void setMethodName(String methodName) {
+    public void setMethodName( String methodName )
+    {
 
-        if (methodName != null) {
+        if ( methodName != null )
+        {
             _methodName = methodName.intern();
-        } else {
+        }
+        else
+        {
             _methodName = methodName;
         }
     }
@@ -167,7 +189,8 @@
      *
      * @param def
      */
-    public void setDefinition(Definition def) {
+    public void setDefinition( Definition def )
+    {
         _myDefinition = def;
     }
 
@@ -176,17 +199,19 @@
      *
      * @return
      */
-    public HTMLTag getOccurrenceTag() {
+    public HTMLTag getOccurrenceTag()
+    {
 
         Definition def = getDefinition();
 
-        return def.getOccurrenceTag(this);
+        return def.getOccurrenceTag( this );
     }
 
     /**
      * Default constructor is public for serialization
      */
-    public Occurrence() {
+    public Occurrence()
+    {
     }
 
     /**
@@ -195,7 +220,8 @@
      * @param file
      * @param line
      */
-    Occurrence(File file, int line) {
+    Occurrence( File file, int line )
+    {
         this.file = file;
         this.line = line;
     }
@@ -207,9 +233,10 @@
      * @param line
      * @param column
      */
-    Occurrence(File file, int line, int column) {
+    Occurrence( File file, int line, int column )
+    {
 
-        this(file, line);
+        this( file, line );
 
         this.column = column;
     }
@@ -222,13 +249,17 @@
      * @param column
      * @param packageName
      */
-    Occurrence(File file, int line, int column, String packageName) {
+    Occurrence( File file, int line, int column, String packageName )
+    {
 
-        this(file, line, column);
+        this( file, line, column );
 
-        if (packageName != null) {
+        if ( packageName != null )
+        {
             _packageName = packageName.intern();
-        } else {
+        }
+        else
+        {
             _packageName = packageName;
         }
     }
@@ -243,20 +274,26 @@
      * @param className
      * @param methodName
      */
-    Occurrence(File file, int line, int column, String packageName,
-               String className, String methodName) {
+    Occurrence( File file, int line, int column, String packageName, String className, String methodName )
+    {
 
-        this(file, line, column, packageName);
+        this( file, line, column, packageName );
 
-        if (className != null) {
+        if ( className != null )
+        {
             _className = className.intern();
-        } else {
+        }
+        else
+        {
             _className = className;
         }
 
-        if (methodName != null) {
+        if ( methodName != null )
+        {
             _methodName = methodName.intern();
-        } else {
+        }
+        else
+        {
             _methodName = methodName;
         }
     }
@@ -266,15 +303,16 @@
      *
      * @return
      */
-    public String getLinkReference() {
+    public String getLinkReference()
+    {
 
         String name = getFile().getName();
 
-        name = name.replace('.', '_');
+        name = name.replace( '.', '_' );
         name = name + ".html";
-        name = name + "#" + Integer.toString(line);
+        name = name + "#" + Integer.toString( line );
 
-        return (name);
+        return ( name );
     }
 
     /**
@@ -282,40 +320,45 @@
      *
      * @return
      */
-    public String getLocation() {
+    public String getLocation()
+    {
         return "[" + file + ":" + line + ":" + column + "]";
     }
 
     /**
      * @see java.lang.Object#toString()
      */
-    public String toString() {
+    public String toString()
+    {
         return "Occurrence [" + file + "," + line + "," + column + "]";
     }
 
     /**
      * @see java.io.Externalizable#writeExternal(java.io.ObjectOutput)
      */
-    public void writeExternal(ObjectOutput out) throws IOException {
-
-        out.writeObject(file.getAbsolutePath());
-        out.writeInt(line);
-        out.writeInt(column);
-        out.writeObject(_packageName);
-        out.writeObject(_className);
-        out.writeObject(_methodName);
-        out.writeObject(_myDefinition);
+    public void writeExternal( ObjectOutput out )
+        throws IOException
+    {
+
+        out.writeObject( file.getAbsolutePath() );
+        out.writeInt( line );
+        out.writeInt( column );
+        out.writeObject( _packageName );
+        out.writeObject( _className );
+        out.writeObject( _methodName );
+        out.writeObject( _myDefinition );
     }
 
     /**
      * @see java.io.Externalizable#readExternal(java.io.ObjectInput)
      */
-    public void readExternal(ObjectInput in)
-            throws IOException, ClassNotFoundException {
+    public void readExternal( ObjectInput in )
+        throws IOException, ClassNotFoundException
+    {
 
         String filepath = (String) in.readObject();
 
-        file = new File(filepath);
+        file = new File( filepath );
         line = in.readInt();
         column = in.readInt();
         _packageName = (String) in.readObject();

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/PackageDef.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/PackageDef.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/PackageDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/PackageDef.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;
 
@@ -33,7 +34,10 @@
  *
  * @version $Id: $
  */
-public class PackageDef extends ScopedDef implements java.io.Serializable {
+public class PackageDef
+    extends ScopedDef
+    implements java.io.Serializable
+{
 
     private static final long serialVersionUID = 5247243972234423013L;
 
@@ -51,52 +55,57 @@
      * @param occ
      * @param parentScope
      */
-    PackageDef(String name, // the name of the package
-               Occurrence occ, // where it was defined (NULL)
-               ScopedDef parentScope) {    // which scope owns it
+    PackageDef( String name, // the name of the package
+                Occurrence occ, // where it was defined (NULL)
+                ScopedDef parentScope )
+    { // which scope owns it
 
-        super(name, occ, parentScope);
+        super( name, occ, parentScope );
 
-        String relPath = name.replace('.', File.separatorChar);
+        String relPath = name.replace( '.', File.separatorChar );
 
         persistedDefs = new Hashtable();
 
         // HACK -- because java.lang PackageDef is created in SymbolTable constructor!
-        if (!name.equals("java.lang")) {
-            File outputDir =
-                    new File(SymbolTable.getSymbolTable().getOutDirPath()
-                    + File.separatorChar + relPath);
+        if ( !name.equals( "java.lang" ) )
+        {
+            File outputDir = new File( SymbolTable.getSymbolTable().getOutDirPath() + File.separatorChar + relPath );
 
-            if (log.isDebugEnabled())
+            if ( log.isDebugEnabled() )
             {
-                log.debug("PackageDef(String, Occurrence, ScopedDef) - checking for def files in "+outputDir.getAbsolutePath());
+                log.debug( "PackageDef(String, Occurrence, ScopedDef) - checking for def files in "
+                    + outputDir.getAbsolutePath() );
             }
 
-            FilenameFilter filter = new FilenameFilter() {
+            FilenameFilter filter = new FilenameFilter()
+            {
 
-                public boolean accept(File dir, String defName) {
-                    return defName.endsWith(".def");
+                public boolean accept( File dir, String defName )
+                {
+                    return defName.endsWith( ".def" );
                 }
             };
-            File[] files = outputDir.listFiles(filter);
+            File[] files = outputDir.listFiles( filter );
 
-            if (files != null) {
+            if ( files != null )
+            {
 
-                if (log.isDebugEnabled())
+                if ( log.isDebugEnabled() )
                 {
-                    log.debug("PackageDef(String, Occurrence, ScopedDef) - def files are:");
+                    log.debug( "PackageDef(String, Occurrence, ScopedDef) - def files are:" );
                 }
-                for (int i = 0; i < files.length; i++) {
+                for ( int i = 0; i < files.length; i++ )
+                {
                     String filename = files[i].getName();
 
-                    String className = filename.substring(0, filename.length()
-                            - ".def".length());
+                    String className = filename.substring( 0, filename.length() - ".def".length() );
 
-                    if (log.isDebugEnabled())
+                    if ( log.isDebugEnabled() )
                     {
-                        log.debug("PackageDef(String, Occurrence, ScopedDef) - filename="+filename+", className="+className);
+                        log.debug( "PackageDef(String, Occurrence, ScopedDef) - filename=" + filename + ", className="
+                            + className );
                     }
-                    persistedDefs.put(className, files[i]);
+                    persistedDefs.put( className, files[i] );
                 }
             }
         }
@@ -107,7 +116,8 @@
      *
      * @return
      */
-    public Hashtable getDefinitions() {
+    public Hashtable getDefinitions()
+    {
         return getElements();
     }
 
@@ -116,10 +126,11 @@
      *
      * @param path
      */
-    public void persistDefinitions(String path) {
-        if (log.isDebugEnabled())
+    public void persistDefinitions( String path )
+    {
+        if ( log.isDebugEnabled() )
         {
-            log.debug("persistDefinitions(String) - String path=" + path);
+            log.debug( "persistDefinitions(String) - String path=" + path );
         }
 
         Enumeration e;
@@ -127,38 +138,41 @@
         String newPath;
         File currentFile = null;
 
-        if (hasElements()) {
+        if ( hasElements() )
+        {
             JavaHashtable ht = getElements();
 
             e = ht.elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 d = (Definition) e.nextElement();
                 newPath = path + File.separatorChar + d.getPackagePath();
 
-                if (!((d instanceof ClassDefProxy)
-                        || (d instanceof DummyClass))) {
-                    try {
-                        String fileName = newPath + File.separatorChar
-                                + d.getName() + ".def";
+                if ( !( ( d instanceof ClassDefProxy ) || ( d instanceof DummyClass ) ) )
+                {
+                    try
+                    {
+                        String fileName = newPath + File.separatorChar + d.getName() + ".def";
 
-                        currentFile = new File(fileName);
+                        currentFile = new File( fileName );
 
-                        new File(currentFile.getParent()).mkdirs();
+                        new File( currentFile.getParent() ).mkdirs();
 
-                        if (log.isDebugEnabled())
+                        if ( log.isDebugEnabled() )
                         {
-                            log.debug("persistDefinitions(String) - Writing "+currentFile.getAbsolutePath());
+                            log.debug( "persistDefinitions(String) - Writing " + currentFile.getAbsolutePath() );
                         }
-                        FileOutputStream fos =
-                                new FileOutputStream(currentFile);
-                        ObjectOutputStream output = new ObjectOutputStream(fos);
+                        FileOutputStream fos = new FileOutputStream( currentFile );
+                        ObjectOutputStream output = new ObjectOutputStream( fos );
 
-                        output.writeObject(d);
+                        output.writeObject( d );
                         output.flush();
                         output.close();
                         fos.close();
-                    } catch (Exception ex) {
+                    }
+                    catch ( Exception ex )
+                    {
                         log.error( "Exception: " + ex.getMessage(), ex );
                     }
                 }
@@ -171,11 +185,12 @@
      *
      * @param path
      */
-    public void persistReferences(String path) {
+    public void persistReferences( String path )
+    {
 
-        ReferencePersistor rp = new ReferencePersistor(path);
+        ReferencePersistor rp = new ReferencePersistor( path );
 
-        accept(rp);
+        accept( rp );
 
         // Enumeration enumList = getElements().elements();
         // while (enumList.hasMoreElements()) {
@@ -190,12 +205,14 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#accept(org.apache.maven.jxr.java.src.symtab.Visitor)
      */
-    public void accept(Visitor visitor) {
+    public void accept( Visitor visitor )
+    {
 
-        visitor.visit(this);
+        visitor.visit( this );
 
-        if (elements != null) {
-            elements.accept(visitor);
+        if ( elements != null )
+        {
+            elements.accept( visitor );
         }
     }
 
@@ -259,7 +276,8 @@
      *
      * @return
      */
-    public Vector generateClassList() {
+    public Vector generateClassList()
+    {
 
         Enumeration e;
         Definition d;
@@ -269,8 +287,9 @@
         String tagText;
 
         // List all classes in this package
-        if (hasElements()) {
-            tagList = new Vector(2);
+        if ( hasElements() )
+        {
+            tagList = new Vector( 2 );
 
             JavaHashtable ht = getElements();
 
@@ -279,52 +298,56 @@
             String baseName;
             String link;
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 d = (Definition) e.nextElement();
 
-                if (d instanceof ClassDef) {
+                if ( d instanceof ClassDef )
+                {
                     o = d.getOccurrence();
 
-                    SymbolTable.addFileClassDef(o.getFile(), (ClassDef) d);
+                    SymbolTable.addFileClassDef( o.getFile(), (ClassDef) d );
 
                     baseName = o.getFile().getName();
-                    baseName = baseName.substring(0, baseName.lastIndexOf("."));
+                    baseName = baseName.substring( 0, baseName.lastIndexOf( "." ) );
                     link = baseName + "_java.html";
 
-                    if (!baseName.equals(d.getName())) {
+                    if ( !baseName.equals( d.getName() ) )
+                    {
                         link += "#" + o.getLine();
                     }
 
-                    tagText = "<p class=\"classListItem\"><a href=\"" + link
-                            + "\"" + "TARGET=\"classFrame\">" + d.getName()
-                            + "</a></p>";
-                    tag = new ClassTag(((ClassDef) d).getScopedClassName(),
-                            tagText);
+                    tagText = "<p class=\"classListItem\"><a href=\"" + link + "\"" + "TARGET=\"classFrame\">"
+                        + d.getName() + "</a></p>";
+                    tag = new ClassTag( ( (ClassDef) d ).getScopedClassName(), tagText );
 
-                    tagList.addElement(tag);
-                    ((ClassDef) d).generateClassList(tagList);
+                    tagList.addElement( tag );
+                    ( (ClassDef) d ).generateClassList( tagList );
                 }
             }
         }
 
-        return (tagList);
+        return ( tagList );
     }
 
     /**
      * @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 )
+    {
 
         // if we found any definitions in this package, report them
-        if (hasElements()) {
-            tagElements(tagList);
+        if ( hasElements() )
+        {
+            tagElements( tagList );
         }
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.ScopedDef#getOccurrenceTag(org.apache.maven.jxr.java.src.symtab.Occurrence)
      */
-    public HTMLTag getOccurrenceTag(Occurrence occ) {
+    public HTMLTag getOccurrenceTag( Occurrence occ )
+    {
         return null;
     }
 
@@ -333,43 +356,48 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#lookup(java.lang.String, java.lang.Class)
      */
-    Definition lookup(String name, Class type) {
+    Definition lookup( String name, Class type )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("lookup(String, Class) - String name=" + name);
+            log.debug( "lookup(String, Class) - String name=" + name );
         }
 
-        Definition result = super.lookup(name, type);
+        Definition result = super.lookup( name, type );
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("lookup(String, Class) - result=" + result);
+            log.debug( "lookup(String, Class) - result=" + result );
         }
-        if ((result == null) || (result instanceof DummyClass)) {
+        if ( ( result == null ) || ( result instanceof DummyClass ) )
+        {
 
-            if (log.isDebugEnabled())
+            if ( log.isDebugEnabled() )
             {
-                log.debug("lookup(String, Class) - " + getName() + ": PackageDef.lookup(\"" + name + "\", \""
-                    + type.getName() + "\") returned " + ( result == null ? "null" : result.getClass().getName() ));
+                log.debug( "lookup(String, Class) - " + getName() + ": PackageDef.lookup(\"" + name + "\", \""
+                    + type.getName() + "\") returned " + ( result == null ? "null" : result.getClass().getName() ) );
             }
-            ClassDef classDef = ClassDef.findLoadedClass(getName(), name);
+            ClassDef classDef = ClassDef.findLoadedClass( getName(), name );
 
-            if (classDef == null) {
-                classDef = loadClassDef(name);
+            if ( classDef == null )
+            {
+                classDef = loadClassDef( name );
             }
 
-            if (classDef != null) {
-                result = new ClassDefProxy(classDef);
+            if ( classDef != null )
+            {
+                result = new ClassDefProxy( classDef );
 
-                elements.put(name, result);
+                elements.put( name, result );
             }
         }
 
-        if (result == null) {
-            if (log.isDebugEnabled())
+        if ( result == null )
+        {
+            if ( log.isDebugEnabled() )
             {
-                log.debug("lookup(String, Class) - not found: "+name);
+                log.debug( "lookup(String, Class) - not found: " + name );
             }
         }
         return result;
@@ -381,27 +409,32 @@
      * @param name
      * @return
      */
-    public ClassDef loadClassDef(String name) {
+    public ClassDef loadClassDef( String name )
+    {
 
         ClassDef result = null;
-        File defFile = (File) persistedDefs.get(name);
+        File defFile = (File) persistedDefs.get( name );
 
-        if (defFile != null) {
-            try {
+        if ( defFile != null )
+        {
+            try
+            {
                 if ( log.isInfoEnabled() )
                 {
-                    log.info( "loading " + name + " from " + defFile);
+                    log.info( "loading " + name + " from " + defFile );
                 }
 
-                FileInputStream fis = new FileInputStream(defFile);
-                ObjectInputStream ois = new ObjectInputStream(fis);
+                FileInputStream fis = new FileInputStream( defFile );
+                ObjectInputStream ois = new ObjectInputStream( fis );
 
                 result = (ClassDef) ois.readObject();
 
                 ois.close();
                 fis.close();
 
-            } catch (Exception ex) {
+            }
+            catch ( Exception ex )
+            {
                 log.error( "Exception: " + ex.getMessage(), ex );
             }
         }
@@ -415,8 +448,9 @@
      * @param out
      * @throws java.io.IOException
      */
-    private void writeObject(ObjectOutputStream out)
-            throws java.io.IOException {
+    private void writeObject( ObjectOutputStream out )
+        throws java.io.IOException
+    {
 
         JavaHashtable saveElements = elements;
 
@@ -431,17 +465,20 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Definition#toString()
      */
-    public String toString() {
+    public String toString()
+    {
 
         String str = "------- Package -------\n";
 
         str += super.toString() + "\n";
 
-        if (hasElements()) {
+        if ( hasElements() )
+        {
             JavaHashtable ht = getElements();
             Enumeration e = ht.elements();
 
-            while (e.hasMoreElements()) {
+            while ( e.hasMoreElements() )
+            {
                 Definition d = (Definition) e.nextElement();
 
                 str += d.toString() + "\n";

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/PrimitiveDef.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/PrimitiveDef.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/PrimitiveDef.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/PrimitiveDef.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;
 
 /**
  * Definition of a primitive type. We subclass ClassDef here as a shortcut
@@ -26,7 +27,9 @@
  *
  * @version $Id: $
  */
-class PrimitiveDef extends ClassDef {
+class PrimitiveDef
+    extends ClassDef
+{
 
     // ==========================================================================
     // ==  Methods
@@ -39,16 +42,18 @@
      * @param superClass
      * @param parentScope
      */
-    PrimitiveDef(String name, // the name of the primitive
-                 ClassDef superClass, // the superclass (if applicable)
-                 ScopedDef parentScope) {    // which scope owns it
-        super(name, null, superClass, null, parentScope);
+    PrimitiveDef( String name, // the name of the primitive
+                  ClassDef superClass, // the superclass (if applicable)
+                  ScopedDef parentScope )
+    { // which scope owns it
+        super( name, null, superClass, null, parentScope );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.ClassDef#generateTags(org.apache.maven.jxr.java.src.symtab.HTMLTagContainer)
      */
-    public void generateTags(HTMLTagContainer tagList) {
+    public void generateTags( HTMLTagContainer tagList )
+    {
 
         /*
          *   out.println(getName() + " (Primitive type)");

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/ReferencePersistor.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/ReferencePersistor.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/ReferencePersistor.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/ReferencePersistor.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,7 +33,9 @@
  *
  * @version $Id: $
  */
-public class ReferencePersistor implements Visitor, ReferenceTypes {
+public class ReferencePersistor
+    implements Visitor, ReferenceTypes
+{
 
     /** Logger for this class  */
     private static final Logger log = Logger.getLogger( ReferencePersistor.class );
@@ -40,16 +43,19 @@
     /**
      * @param outDirPath the root of the output directory tree
      */
-    public ReferencePersistor(String outDirPath) {
+    public ReferencePersistor( String outDirPath )
+    {
         this.outDirPath = outDirPath;
     }
 
     /**
      * Call this after traversal completes.
      */
-    public void done() {
+    public void done()
+    {
 
-        if (pw != null) {
+        if ( pw != null )
+        {
             closeWriters();
         }
 
@@ -61,38 +67,42 @@
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Visitor#visit(org.apache.maven.jxr.java.src.symtab.PackageDef)
      */
-    public void visit(PackageDef def) {
+    public void visit( PackageDef def )
+    {
 
-        if (pw != null) {
+        if ( pw != null )
+        {
             closeWriters();
         }
 
-        String finalDirPath = outDirPath + File.separatorChar
-                + def.getName().replace('.', File.separatorChar);
+        String finalDirPath = outDirPath + File.separatorChar + def.getName().replace( '.', File.separatorChar );
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("visit(PackageDef) - String finalDirPath=" + finalDirPath);
+            log.debug( "visit(PackageDef) - String finalDirPath=" + finalDirPath );
         }
 
-        File dir = new File(finalDirPath);
+        File dir = new File( finalDirPath );
 
         dir.mkdirs();
 
         filePath = finalDirPath + File.separatorChar + "references.txt";
 
-        try {
+        try
+        {
             boolean append = true;
 
-            fw = new FileWriter(filePath, append);
-        } catch (IOException ex) {
+            fw = new FileWriter( filePath, append );
+        }
+        catch ( IOException ex )
+        {
             log.error( "IOException: " + ex.getMessage(), ex );
 
-            fw = null;    // TBD: fix this hack
+            fw = null; // TBD: fix this hack
         }
 
-        bw = new BufferedWriter(fw);
-        pw = new PrintWriter(bw);
+        bw = new BufferedWriter( fw );
+        pw = new PrintWriter( bw );
 
         // ReferentFileClass - name of class whose .java file this referent lives in.
         // ReferentType -- Class Method, or Variable
@@ -103,8 +113,8 @@
         // Referent's URL in referent list is {ReferentFileClass}_java_ref.html#{ReferentTag}
         // Referent class's name in package list is {ReferentClass}
         //
-        pw.println(
-                "# ReferentFileClass | ReferentClass | ReferentType | ReferentTag | ReferringPackage | ReferringClass | ReferringMethod | ReferringFile | ReferringLineNumber");
+        pw
+            .println( "# ReferentFileClass | ReferentClass | ReferentType | ReferentTag | ReferringPackage | ReferringClass | ReferringMethod | ReferringFile | ReferringLineNumber" );
     }
 
     /**
@@ -113,107 +123,118 @@
      * @param def
      * @return
      */
-    private String getReferentFileClass(Definition def) {
+    private String getReferentFileClass( Definition def )
+    {
 
-        String temp = def.getOccurrence().getFile().getName();    // HACK!
+        String temp = def.getOccurrence().getFile().getName(); // HACK!
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("getReferentFileClass(Definition) - name="+def.getClassScopeName()+" temp="+temp);
+            log.debug( "getReferentFileClass(Definition) - name=" + def.getClassScopeName() + " temp=" + temp );
         }
 
-        return temp.substring(0, temp.length() - ".java".length());
+        return temp.substring( 0, temp.length() - ".java".length() );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Visitor#visit(org.apache.maven.jxr.java.src.symtab.ClassDef)
      */
-    public void visit(ClassDef def) {
+    public void visit( ClassDef def )
+    {
 
-        if (def instanceof PrimitiveDef) {
+        if ( def instanceof PrimitiveDef )
+        {
             return;
         }
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("visit(ClassDef) - " + def.getName()+" is defined in "+def.getOccurrence().getFile().getName());
-            log.debug("visit(ClassDef) - persist "+def.getName());
+            log.debug( "visit(ClassDef) - " + def.getName() + " is defined in "
+                + def.getOccurrence().getFile().getName() );
+            log.debug( "visit(ClassDef) - persist " + def.getName() );
         }
 
-        String referentFileClass = getReferentFileClass(def);
+        String referentFileClass = getReferentFileClass( def );
         String referentTag = def.getClassScopeName();
         String referentClass;
 
-        if (def.getParentScope() instanceof ClassDef)    // inner class
+        if ( def.getParentScope() instanceof ClassDef ) // inner class
         {
             String parentScopeName = def.getParentScope().getName();
 
             referentClass = parentScopeName + "." + def.getName();
-        } else {
+        }
+        else
+        {
             referentClass = def.getName();
         }
 
-        persist(referentFileClass, CLASS_REF, referentTag, referentClass, def);
+        persist( referentFileClass, CLASS_REF, referentTag, referentClass, def );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Visitor#visit(org.apache.maven.jxr.java.src.symtab.MethodDef)
      */
-    public void visit(MethodDef def) {
+    public void visit( MethodDef def )
+    {
 
         String referentClass;
-        String referentFileClass = getReferentFileClass(def);
+        String referentFileClass = getReferentFileClass( def );
         String referentTag = def.getClassScopeName();
         Definition parentScope = def.getParentScope();
         Definition grandParentScope = parentScope.getParentScope();
 
-        if (grandParentScope instanceof ClassDef)    // inner class
+        if ( grandParentScope instanceof ClassDef ) // inner class
+        {
+            referentClass = grandParentScope.getName() + "." + parentScope.getName();
+        }
+        else
         {
-            referentClass = grandParentScope.getName() + "."
-                    + parentScope.getName();
-        } else {
             referentClass = parentScope.getName();
         }
 
-        persist(referentFileClass, METHOD_REF, referentTag, referentClass, def);
+        persist( referentFileClass, METHOD_REF, referentTag, referentClass, def );
     }
 
     /**
      * @see org.apache.maven.jxr.java.src.symtab.Visitor#visit(org.apache.maven.jxr.java.src.symtab.VariableDef)
      */
-    public void visit(VariableDef def) {
+    public void visit( VariableDef def )
+    {
 
         String referentClass;
-        String referentFileClass = getReferentFileClass(def);
+        String referentFileClass = getReferentFileClass( def );
         String referentTag = def.getClassScopeName();
         Definition parentScope = def.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
+            {
+                referentClass = greatGrandParentScope.getName() + "." + grandParentScope.getName();
+            }
+            else
             {
-                referentClass = greatGrandParentScope.getName() + "."
-                        + grandParentScope.getName();
-            } else {
                 referentClass = grandParentScope.getName();
             }
-        } else                                                // class variable
+        }
+        else
+        // class variable
         {
-            if (grandParentScope instanceof ClassDef)         // inner class
+            if ( grandParentScope instanceof ClassDef ) // inner class
+            {
+                referentClass = grandParentScope.getName() + "." + parentScope.getName();
+            }
+            else
             {
-                referentClass = grandParentScope.getName() + "."
-                        + parentScope.getName();
-            } else {
                 referentClass = parentScope.getName();
             }
         }
 
-        persist(referentFileClass, VARIABLE_REF, referentTag, referentClass,
-                def);
+        persist( referentFileClass, VARIABLE_REF, referentTag, referentClass, def );
     }
 
     /**
@@ -225,31 +246,32 @@
      * @param referentClass
      * @param def
      */
-    private void persist(String referentFileClass, String referentType,
-                         String referentTag, String referentClass,
-                         Definition def) {
+    private void persist( String referentFileClass, String referentType, String referentTag, String referentClass,
+                          Definition def )
+    {
 
-        if (log.isDebugEnabled())
+        if ( log.isDebugEnabled() )
         {
-            log.debug("persist(String, String, String, String, Definition) - String referentFileClass=" + referentFileClass);
-            log.debug("persist(String, String, String, String, Definition) - String referentType=" + referentType);
+            log.debug( "persist(String, String, String, String, Definition) - String referentFileClass="
+                + referentFileClass );
+            log.debug( "persist(String, String, String, String, Definition) - String referentType=" + referentType );
         }
 
         JavaVector refs = def.getReferences();
 
-        if (refs != null) {
+        if ( refs != null )
+        {
             Enumeration enumList = refs.elements();
 
-            while (enumList.hasMoreElements()) {
+            while ( enumList.hasMoreElements() )
+            {
                 Occurrence occ = (Occurrence) enumList.nextElement();
 
-                persist(referentFileClass, referentType, referentTag,
-                        referentClass, occ);
+                persist( referentFileClass, referentType, referentTag, referentClass, occ );
             }
         }
 
-        persist(referentFileClass, referentType, referentTag, referentClass,
-                def.getOccurrence());
+        persist( referentFileClass, referentType, referentTag, referentClass, def.getOccurrence() );
     }
 
     /**
@@ -261,40 +283,44 @@
      * @param referentClass
      * @param occ
      */
-    private void persist(String referentFileClass, String referentType,
-                         String referentTag, String referentClass,
-                         Occurrence occ) {
-
-        pw.print(referentFileClass);
-        pw.print("|");
-        pw.print(referentClass);
-        pw.print("|");
-        pw.print(referentTag);
-        pw.print("|");
-        pw.print(referentType);
-        pw.print("|");
-        pw.print(occ.getPackageName());
-        pw.print("|");
-        pw.print(occ.getClassName());
-        pw.print("|");
-        pw.print(occ.getMethodName());
-        pw.print("|");
-        pw.print(occ.getFile().getName());
-        pw.print("|");
-        pw.println(occ.getLine());
+    private void persist( String referentFileClass, String referentType, String referentTag, String referentClass,
+                          Occurrence occ )
+    {
+
+        pw.print( referentFileClass );
+        pw.print( "|" );
+        pw.print( referentClass );
+        pw.print( "|" );
+        pw.print( referentTag );
+        pw.print( "|" );
+        pw.print( referentType );
+        pw.print( "|" );
+        pw.print( occ.getPackageName() );
+        pw.print( "|" );
+        pw.print( occ.getClassName() );
+        pw.print( "|" );
+        pw.print( occ.getMethodName() );
+        pw.print( "|" );
+        pw.print( occ.getFile().getName() );
+        pw.print( "|" );
+        pw.println( occ.getLine() );
     }
 
     /**
      * Method closeWriters
      */
-    private void closeWriters() {
+    private void closeWriters()
+    {
 
-        try {
+        try
+        {
             pw.close();
             bw.close();
             fw.close();
-        } catch (IOException ex) {
-            log.error( "Hell has frozen over.", ex);
+        }
+        catch ( IOException ex )
+        {
+            log.error( "Hell has frozen over.", ex );
         }
     }
 

Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/ReferenceTypes.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/ReferenceTypes.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/ReferenceTypes.java (original)
+++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/src/symtab/ReferenceTypes.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
@@ -5,23 +7,23 @@
  * 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.symtab;
 
 /**
  * Interface ReferenceTypes
- * 
+ *
  * @version $Id: $
  */
-public interface ReferenceTypes {
+public interface ReferenceTypes
+{
 
     /** Field CLASS_REF */
     public static final String CLASS_REF = "Class";