openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r418401 [29/32] - in /incubator/openjpa/trunk: openjpa-lib/ openjpa-lib/src/main/java/org/apache/openjpa/lib/ant/ openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ openjpa-lib/src/main/java/org/apache/openjpa/lib/jdbc/ openjpa-lib/src/...
Date Fri, 30 Jun 2006 22:37:29 GMT
Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/ReturnInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/ReturnInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/ReturnInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/ReturnInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,25 +12,19 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
 import java.util.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>Returns a value (or void) from a method.</p>
- *
- *  @author Abe White
+ * Returns a value(or void) from a method.
+ * 
+ * @author Abe White
  */
 public class ReturnInstruction extends TypedInstruction {
     private static final Class[][] _mappings = new Class[][] {
-            { byte.class, int.class },
-            { char.class, int.class },
-            { short.class, int.class },
-            { boolean.class, int.class },
-        };
+        { byte.class, int.class }, { char.class, int.class },
+        { short.class, int.class }, { boolean.class, int.class }, };
 
     ReturnInstruction(Code owner) {
         super(owner);
@@ -47,22 +38,16 @@
         switch (getOpcode()) {
         case Constants.IRETURN:
             return int.class.getName();
-
         case Constants.LRETURN:
             return long.class.getName();
-
         case Constants.FRETURN:
             return float.class.getName();
-
         case Constants.DRETURN:
             return double.class.getName();
-
         case Constants.ARETURN:
             return Object.class.getName();
-
         case Constants.RETURN:
             return void.class.getName();
-
         default:
             return null;
         }
@@ -70,29 +55,22 @@
 
     public TypedInstruction setType(String type) {
         type = mapType(type, _mappings, true);
-
-        if (type == null) {
-            return (TypedInstruction) setOpcode(Constants.NOP);
-        }
+        if (type == null)
+            return(TypedInstruction) setOpcode(Constants.NOP);
 
         switch (type.charAt(0)) {
         case 'i':
-            return (TypedInstruction) setOpcode(Constants.IRETURN);
-
+            return(TypedInstruction) setOpcode(Constants.IRETURN);
         case 'l':
-            return (TypedInstruction) setOpcode(Constants.LRETURN);
-
+            return(TypedInstruction) setOpcode(Constants.LRETURN);
         case 'f':
-            return (TypedInstruction) setOpcode(Constants.FRETURN);
-
+            return(TypedInstruction) setOpcode(Constants.FRETURN);
         case 'd':
-            return (TypedInstruction) setOpcode(Constants.DRETURN);
-
+            return(TypedInstruction) setOpcode(Constants.DRETURN);
         case 'v':
-            return (TypedInstruction) setOpcode(Constants.RETURN);
-
+            return(TypedInstruction) setOpcode(Constants.RETURN);
         default:
-            return (TypedInstruction) setOpcode(Constants.ARETURN);
+            return(TypedInstruction) setOpcode(Constants.ARETURN);
         }
     }
 
@@ -100,7 +78,6 @@
         switch (getOpcode()) {
         case Constants.NOP:
             return 0;
-
         default:
             return -1;
         }
@@ -111,11 +88,9 @@
         case Constants.RETURN:
         case Constants.NOP:
             return 0;
-
         case Constants.LRETURN:
         case Constants.DRETURN:
             return -2;
-
         default:
             return -1;
         }

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SourceFile.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SourceFile.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SourceFile.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SourceFile.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,17 +12,14 @@
  */
 package serp.bytecode;
 
+import java.io.*;
 import serp.bytecode.lowlevel.*;
-
 import serp.bytecode.visitor.*;
 
-import java.io.*;
-
-
 /**
- *  <p>Attribute naming the source file for this class.</p>
- *
- *  @author Abe White
+ * Attribute naming the source file for this class.
+ * 
+ * @author Abe White
  */
 public class SourceFile extends Attribute {
     int _sourceFileIndex = 0;
@@ -39,78 +33,68 @@
     }
 
     /**
-     *  Return the index into the class {@link ConstantPool} of the
-     *  {@link UTF8Entry} naming the source file for this class, or 0 if
-     *  not set.
+     * Return the index into the class {@link ConstantPool} of the
+     * {@link UTF8Entry} naming the source file for this class, or 0 if not set.
      */
     public int getFileIndex() {
         return _sourceFileIndex;
     }
 
     /**
-     *  Set the index into the class {@link ConstantPool} of the
-     *  {@link UTF8Entry} naming the source file for this class.
+     * Set the index into the class {@link ConstantPool} of the
+     * {@link UTF8Entry} naming the source file for this class.
      */
     public void setFileIndex(int sourceFileIndex) {
-        if (sourceFileIndex < 0) {
+        if (sourceFileIndex < 0)
             sourceFileIndex = 0;
-        }
-
         _sourceFileIndex = sourceFileIndex;
     }
 
     /**
-     *  Return the name of the source file, or null if not set.
+     * Return the name of the source file, or null if not set.
      */
     public String getFileName() {
-        if (_sourceFileIndex == 0) {
+        if (_sourceFileIndex == 0)
             return null;
-        }
-
-        return ((UTF8Entry) getPool().getEntry(_sourceFileIndex)).getValue();
+        return((UTF8Entry) getPool().getEntry(_sourceFileIndex)).getValue();
     }
 
     /**
-     *  Return the file object for the source file, or null if not set.
-     *
-     *  @param dir                the directory of the file, or null
+     * Return the file object for the source file, or null if not set.
+     * 
+     * @param dir the directory of the file, or null
      */
     public File getFile(File dir) {
         String name = getFileName();
-
-        if (name == null) {
+        if (name == null)
             return null;
-        }
-
         return new File(dir, name);
     }
 
     /**
-     *  Set the name of the source file.  The name should be the file name
-     *  only; it should not include the path to the file.
-      */
+     * Set the name of the source file. The name should be the file name
+     * only; it should not include the path to the file.
+     */
     public void setFile(String name) {
-        if (name == null) {
+        if (name == null)
             setFileIndex(0);
-        } else {
+        else
             setFileIndex(getPool().findUTF8Entry(name, true));
-        }
     }
 
     /**
-     *  Set the source file.  Note that only the file name is recorded;
-     *  the path to the file is discarded.
+     * Set the source file. Note that only the file name is recorded;
+     * the path to the file is discarded.
      */
     public void setFile(File file) {
-        if (file == null) {
+        if (file == null)
             setFile((String) null);
-        } else {
+        else
             setFile(file.getName());
-        }
     }
 
     /**
-      *  Set the file name from the current class name plus the .java extension.
+     * Set the file name from the current class name plus the .java extension.
      */
     public void setFromClassName() {
         setFile(((BCClass) getOwner()).getClassName() + ".java");

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StackInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StackInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StackInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StackInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -16,19 +13,17 @@
 package serp.bytecode;
 
 import serp.bytecode.lowlevel.*;
-
 import serp.bytecode.visitor.*;
 
-
 /**
- *  <p>Represents an instruction that manipulates the stack of the current
- *  frame.  Using the {@link #setType} methods is a hint about the type being
- *  manipulated that might cause this instruction to use the wide version
- *  of the opcode it represents (if manipulating a long or double).  This
- *  saves the developer from having to decide at compile time whether to
- *  use <code>pop</code> or <code>pop2</code>, etc.</p>
- *
- *  @author Abe White
+ * Represents an instruction that manipulates the stack of the current
+ * frame. Using the {@link #setType} methods is a hint about the type being
+ * manipulated that might cause this instruction to use the wide version
+ * of the opcode it represents(if manipulating a long or double). This
+ * saves the developer from having to decide at compile time whether to
+ * use <code>pop</code> or <code>pop2</code>, etc.
+ * 
+ * @author Abe White
  */
 public class StackInstruction extends TypedInstruction {
     StackInstruction(Code owner, int opcode) {
@@ -43,28 +38,24 @@
         switch (getOpcode()) {
         case Constants.POP:
             return -1;
-
         case Constants.POP2:
             return -2;
-
         case Constants.DUP:
         case Constants.DUPX1:
         case Constants.DUPX2:
             return 1;
-
         case Constants.DUP2:
         case Constants.DUP2X1:
         case Constants.DUP2X2:
             return 2;
-
         default:
             return 0;
         }
     }
 
     /**
-     *  This method will always return null; use {@link #isWide} to determine
-     *  if this is pop2, dup2, etc.
+     * This method will always return null; use {@link #isWide} to determine
+     * if this is pop2, dup2, etc.
      */
     public String getTypeName() {
         return null;
@@ -72,14 +63,13 @@
 
     public TypedInstruction setType(String type) {
         type = getProject().getNameCache().getExternalForm(type, false);
-
-        return setWide(long.class.getName().equals(type) ||
-            double.class.getName().equals(type));
+        return setWide(long.class.getName().equals(type)
+            || double.class.getName().equals(type));
     }
 
     /**
-     *  Return whether to use the wide form of the current opcode for
-     *  operations on longs or doubles.
+     * Return whether to use the wide form of the current opcode for
+     * operations on longs or doubles.
      */
     public boolean isWide() {
         switch (getOpcode()) {
@@ -88,85 +78,44 @@
         case Constants.DUP2X1:
         case Constants.DUP2X2:
             return true;
-
         default:
             return false;
         }
     }
 
     /**
-     *  Set whether to use the wide form of the current opcode for operations
-     *  on longs or doubles.
-     *
-     *  @return this instruction, for method chaining
+     * Set whether to use the wide form of the current opcode for operations
+     * on longs or doubles.
+     * 
+     * @return this instruction, for method chaining
      */
     public StackInstruction setWide(boolean wide) {
         switch (getOpcode()) {
         case Constants.POP:
-
-            if (wide) {
-                setOpcode(Constants.POP2);
-            }
-
+            if (wide) setOpcode(Constants.POP2);
             break;
-
         case Constants.POP2:
-
-            if (!wide) {
-                setOpcode(Constants.POP);
-            }
-
+            if (!wide) setOpcode(Constants.POP);
             break;
-
         case Constants.DUP:
-
-            if (wide) {
-                setOpcode(Constants.DUP2);
-            }
-
+            if (wide) setOpcode(Constants.DUP2);
             break;
-
         case Constants.DUP2:
-
-            if (!wide) {
-                setOpcode(Constants.DUP);
-            }
-
+            if (!wide) setOpcode(Constants.DUP);
             break;
-
         case Constants.DUPX1:
-
-            if (wide) {
-                setOpcode(Constants.DUP2X1);
-            }
-
+            if (wide) setOpcode(Constants.DUP2X1);
             break;
-
         case Constants.DUP2X1:
-
-            if (!wide) {
-                setOpcode(Constants.DUPX1);
-            }
-
+            if (!wide) setOpcode(Constants.DUPX1);
             break;
-
         case Constants.DUPX2:
-
-            if (wide) {
-                setOpcode(Constants.DUP2X2);
-            }
-
+            if (wide) setOpcode(Constants.DUP2X2);
             break;
-
         case Constants.DUP2X2:
-
-            if (!wide) {
-                setOpcode(Constants.DUPX2);
-            }
-
+            if (!wide) setOpcode(Constants.DUPX2);
             break;
         }
-
         return this;
     }
 

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/State.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/State.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/State.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/State.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,192 +12,190 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.lowlevel.*;
-
 import java.util.*;
-
+import serp.bytecode.lowlevel.*;
 
 /**
- *  <p>The State type is extended by various concrete types to change
- *  the behavior of a {@link BCClass}.  All methods in this base
- *  implementation throw an {@link UnsupportedOperationException}</p>
- *
- *  @author Abe White
+ * The State type is extended by various concrete types to change
+ * the behavior of a {@link BCClass}. All methods in this base
+ * implementation throw an {@link UnsupportedOperationException}
+ * 
+ * @author Abe White
  */
 class State {
     /**
-     *  A singleton instance of this type that can be used to make a
-     *  class invalid.
+     * A singleton instance of this type that can be used to make a
+     * class invalid.
      */
     public static final State INVALID = new State();
 
     /**
-     *  Return the magic number of the bytecode class.
+     * Return the magic number of the bytecode class.
      */
     public int getMagic() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the magic number of the bytecode class.
+     * Set the magic number of the bytecode class.
      */
     public void setMagic(int magic) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the major number of the bytecode class.
+     * Return the major number of the bytecode class.
      */
     public int getMajorVersion() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the major version of the bytecode class.
+     * Set the major version of the bytecode class.
      */
     public void setMajorVersion(int major) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the minor number of the bytecode class.
+     * Return the minor number of the bytecode class.
      */
     public int getMinorVersion() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the minor version of the bytecode class.
+     * Set the minor version of the bytecode class.
      */
     public void setMinorVersion(int minor) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the access flags of the bytecode class.
+     * Return the access flags of the bytecode class.
      */
     public int getAccessFlags() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the access flags of the bytecode class.
+     * Set the access flags of the bytecode class.
      */
     public void setAccessFlags(int access) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link ConstantPool} index of the {@link ClassEntry}
-     *  for this class, or 0 if none.
+     * Return the {@link ConstantPool} index of the {@link ClassEntry}
+     * for this class, or 0 if none.
      */
     public int getIndex() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the {@link ConstantPool} index of the {@link ClassEntry}
-     *  for this class.
+     * Set the {@link ConstantPool} index of the {@link ClassEntry}
+     * for this class.
      */
     public void setIndex(int index) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link ConstantPool} index of the {@link ClassEntry}
-     *  for the superclass of this class, or 0 if none.
+     * Return the {@link ConstantPool} index of the {@link ClassEntry}
+     * for the superclass of this class, or 0 if none.
      */
     public int getSuperclassIndex() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Set the {@link ConstantPool} index of the {@link ClassEntry}
-     *  for the superclass of this class.  Throws
-     *  {@link UnsupportedOperationException} by default.
+     * Set the {@link ConstantPool} index of the {@link ClassEntry}
+     * for the superclass of this class. Throws
+     * {@link UnsupportedOperationException} by default.
      */
     public void setSuperclassIndex(int index) {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link ConstantPool} indexes of the {@link ClassEntry}s
-     *  for the indexes of this class, or empty collection if none.  If the
-     *  state does not support changing the interfaces, the returned
-     *  collection should be immutable.
+     * Return the {@link ConstantPool} indexes of the {@link ClassEntry}s
+     * for the indexes of this class, or empty collection if none. If the
+     * state does not support changing the interfaces, the returned
+     * collection should be immutable.
      */
     public Collection getInterfacesHolder() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link BCField}s of this class, or empty collection if none.
-     *  If the state does not support changing the fields, the returned
-     *  collection should be immutable.
+     * Return the {@link BCField}s of this class, or empty collection if none.
+     * If the state does not support changing the fields, the returned
+     * collection should be immutable.
      */
     public Collection getFieldsHolder() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link BCMethod}s of this class, or empty collection if none.
-     *  If the state does not support changing the methods, the returned
-     *  collection should be immutable.
+     * Return the {@link BCMethod}s of this class, or empty collection if none.
+     * If the state does not support changing the methods, the returned
+     * collection should be immutable.
      */
     public Collection getMethodsHolder() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the {@link Attribute}s of this class, or empty collection if
-     *  none.  If the state does not support changing the attributes, the
-     *  returned collection should be immutable.
+     * Return the {@link Attribute}s of this class, or empty collection if
+     * none. If the state does not support changing the attributes, the
+     * returned collection should be immutable.
      */
     public Collection getAttributesHolder() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the constant pool of the class.
+     * Return the constant pool of the class.
      */
     public ConstantPool getPool() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the name of the class.  The name should be in a form suitable
-     *  for a {@link Class#forName} call.
+     * Return the name of the class. The name should be in a form suitable
+     * for a {@link Class#forName} call.
      */
     public String getName() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the name of the superclass.  The name should be in a form
-     *  suitable for a {@link Class#forName} call, or null if none.
+     * Return the name of the superclass. The name should be in a form
+     * suitable for a {@link Class#forName} call, or null if none.
      */
     public String getSuperclassName() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return the name of the component type of this array, or null if not
-     *  an array.  The name should be in a form suitable for a
-     *  {@link Class#forName} call.
+     * Return the name of the component type of this array, or null if not
+     * an array. The name should be in a form suitable for a
+     * {@link Class#forName} call.
      */
     public String getComponentName() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return true if this class is a primitive.
+     * Return true if this class is a primitive.
      */
     public boolean isPrimitive() {
         throw new UnsupportedOperationException();
     }
 
     /**
-     *  Return true if this class is an array.
+     * Return true if this class is an array.
      */
     public boolean isArray() {
         throw new UnsupportedOperationException();

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StoreInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StoreInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StoreInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/StoreInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,25 +12,20 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>An instruction to store a value from a local variable onto
- *  the stack.</p>
- *
- *  @author Abe White
+ * An instruction to store a value from a local variable onto the stack.
+ * 
+ * @author Abe White
  */
 public class StoreInstruction extends LocalVariableInstruction {
     private static final Class[][] _mappings = new Class[][] {
-            { byte.class, int.class },
-            { boolean.class, int.class },
-            { char.class, int.class },
-            { short.class, int.class },
-            { void.class, int.class },
-        };
+        { byte.class, int.class }, { boolean.class, int.class },
+        { char.class, int.class }, { short.class, int.class },
+        { void.class, int.class }, };
+
     String _type = null;
 
     StoreInstruction(Code owner) {
@@ -52,7 +44,6 @@
         case Constants.DSTORE:
         case Constants.ASTORE:
             return super.getLength() + 1;
-
         default:
             return super.getLength();
         }
@@ -62,7 +53,6 @@
         switch (getOpcode()) {
         case Constants.NOP:
             return 0;
-
         default:
             return -1;
         }
@@ -81,10 +71,8 @@
         case Constants.DSTORE2:
         case Constants.DSTORE3:
             return -2;
-
         case Constants.NOP:
             return 0;
-
         default:
             return -1;
         }
@@ -98,35 +86,30 @@
         case Constants.ISTORE2:
         case Constants.ISTORE3:
             return int.class.getName();
-
         case Constants.LSTORE:
         case Constants.LSTORE0:
         case Constants.LSTORE1:
         case Constants.LSTORE2:
         case Constants.LSTORE3:
             return long.class.getName();
-
         case Constants.FSTORE:
         case Constants.FSTORE0:
         case Constants.FSTORE1:
         case Constants.FSTORE2:
         case Constants.FSTORE3:
             return float.class.getName();
-
         case Constants.DSTORE:
         case Constants.DSTORE0:
         case Constants.DSTORE1:
         case Constants.DSTORE2:
         case Constants.DSTORE3:
             return double.class.getName();
-
         case Constants.ASTORE:
         case Constants.ASTORE0:
         case Constants.ASTORE1:
         case Constants.ASTORE2:
         case Constants.ASTORE3:
             return Object.class.getName();
-
         default:
             return _type;
         }
@@ -134,14 +117,12 @@
 
     public TypedInstruction setType(String type) {
         type = mapType(type, _mappings, true);
-
         int local = getLocal();
 
         // if an invalid type or local, revert to nop
-        if ((type == null) || (local < 0)) {
+        if (type == null || local < 0) {
             _type = type;
-
-            return (TypedInstruction) setOpcode(Constants.NOP);
+            return(TypedInstruction) setOpcode(Constants.NOP);
         }
 
         // valid opcode, unset saved type
@@ -149,49 +130,36 @@
 
         switch (type.charAt(0)) {
         case 'i':
-            return (TypedInstruction) setOpcode((local > 3) ? Constants.ISTORE
-                                                            : (Constants.ISTORE0 +
-                local));
-
+            return(TypedInstruction) setOpcode((local > 3) ? Constants.ISTORE
+                : Constants.ISTORE0 + local);
         case 'l':
-            return (TypedInstruction) setOpcode((local > 3) ? Constants.LSTORE
-                                                            : (Constants.LSTORE0 +
-                local));
-
+            return(TypedInstruction) setOpcode((local > 3) ? Constants.LSTORE
+                : Constants.LSTORE0 + local);
         case 'f':
-            return (TypedInstruction) setOpcode((local > 3) ? Constants.FSTORE
-                                                            : (Constants.FSTORE0 +
-                local));
-
+            return(TypedInstruction) setOpcode((local > 3) ? Constants.FSTORE
+                : Constants.FSTORE0 + local);
         case 'd':
-            return (TypedInstruction) setOpcode((local > 3) ? Constants.DSTORE
-                                                            : (Constants.DSTORE0 +
-                local));
-
+            return(TypedInstruction) setOpcode((local > 3) ? Constants.DSTORE
+                : Constants.DSTORE0 + local);
         default:
-            return (TypedInstruction) setOpcode((local > 3) ? Constants.ASTORE
-                                                            : (Constants.ASTORE0 +
-                local));
+            return(TypedInstruction) setOpcode((local > 3) ? Constants.ASTORE
+                : Constants.ASTORE0 + local);
         }
     }
 
     /**
-     *  StoreInstructions are equal if the type they reference the same
-     *  type and locals index or if either is unset.
+     * StoreInstructions are equal if the type they reference the same
+     * type and locals index or if either is unset.
      */
     public boolean equalsInstruction(Instruction other) {
-        if (other == this) {
+        if (other == this)
             return true;
-        }
-
-        if (!super.equalsInstruction(other)) {
+        if (!super.equalsInstruction(other))
             return false;
-        }
 
         String type = getTypeName();
         String otherType = ((StoreInstruction) other).getTypeName();
-
-        return (type == null) || (otherType == null) || type.equals(otherType);
+        return type == null || otherType == null || type.equals(otherType);
     }
 
     public void acceptVisit(BCVisitor visit) {
@@ -216,7 +184,6 @@
         case Constants.DSTORE:
         case Constants.ASTORE:
             setLocal(in.readUnsignedByte());
-
             break;
         }
     }
@@ -247,34 +214,27 @@
         case Constants.DSTORE0:
         case Constants.ASTORE0:
             setLocal(0);
-
             break;
-
         case Constants.ISTORE1:
         case Constants.LSTORE1:
         case Constants.FSTORE1:
         case Constants.DSTORE1:
         case Constants.ASTORE1:
             setLocal(1);
-
             break;
-
         case Constants.ISTORE2:
         case Constants.LSTORE2:
         case Constants.FSTORE2:
         case Constants.DSTORE2:
         case Constants.ASTORE2:
             setLocal(2);
-
             break;
-
         case Constants.ISTORE3:
         case Constants.LSTORE3:
         case Constants.FSTORE3:
         case Constants.DSTORE3:
         case Constants.ASTORE3:
             setLocal(3);
-
             break;
         }
     }

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SwitchInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SwitchInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SwitchInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/SwitchInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -17,17 +14,15 @@
 
 import java.io.DataInput;
 import java.io.IOException;
-
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 
-
 /**
- *  Contains functionality common to the different switch types
- *  (TableSwitch and LookupSwitch).
- *
- *  @author Eric Lindauer
+ * Contains functionality common to the different switch types
+ * (TableSwitch and LookupSwitch).
+ * 
+ * @author Eric Lindauer
  */
 public abstract class SwitchInstruction extends JumpInstruction {
     private List _cases = new LinkedList();
@@ -37,33 +32,30 @@
     }
 
     /**
-     *  Returns the current byte offsets for the different
-     *  switch cases in this Instruction.
+     * Returns the current byte offsets for the different
+     * switch cases in this Instruction.
      */
     public int[] getOffsets() {
         int bi = getByteIndex();
-        int[] offsets = new int[_cases.size()];
-
-        for (int i = 0; i < offsets.length; i++)
-            offsets[i] = ((InstructionPtrStrategy) _cases.get(i)).getByteIndex() -
-                bi;
-
+        int[] offsets = new int [_cases.size()];
+        for (int i=0; i < offsets.length; i++)
+            offsets [i] = ((InstructionPtrStrategy) _cases.get(i)).
+                getByteIndex() - bi;
         return offsets;
     }
 
     /**
-     *  Sets the offsets for the instructions representing the different
-     *  switch statement cases.  WARNING: these offsets will not be changed
-     *  in the event that the code is modified following this call. It is
-     *  typically a good idea to follow this call with a call to updateTargets
-     *  as soon as the instructions at the given offsets are valid, at which
-     *  point the Instructions themselves will be used as the targets and the
-     *  offsets will be updated as expected.
+     * Sets the offsets for the instructions representing the different
+     * switch statement cases. WARNING: these offsets will not be changed
+     * in the event that the code is modified following this call. It is
+     * typically a good idea to follow this call with a call to updateTargets
+     * as soon as the instructions at the given offsets are valid, at which
+     * point the Instructions themselves will be used as the targets and the
+     * offsets will be updated as expected.
      */
     public void setOffsets(int[] offsets) {
         int bi = getByteIndex();
         _cases.clear();
-
         for (int i = 0; i < offsets.length; i++) {
             InstructionPtrStrategy next = new InstructionPtrStrategy(this);
             next.setByteIndex(offsets[i] + bi);
@@ -83,79 +75,71 @@
         // make the first byte of the 'default' a multiple of 4 from the
         // start of the method
         int byteIndex = getByteIndex() + 1;
-
-        for (; (byteIndex % 4) != 0; byteIndex++, length++)
-            ;
+        for (; byteIndex % 4 != 0; byteIndex++, length++);
 
         return length;
     }
 
     /**
-     *  Synonymous with {@link #getTarget}.
+     * Synonymous with {@link #getTarget}.
      */
     public Instruction getDefaultTarget() {
         return getTarget();
     }
 
     /**
-     *  Synonymous with {@link #getOffset}.
+     * Synonymous with {@link #getOffset}.
      */
     public int getDefaultOffset() {
         return getOffset();
     }
 
     /**
-     *  Synonymous with {@link #setOffset}.
+     * Synonymous with {@link #setOffset}.
      */
     public SwitchInstruction setDefaultOffset(int offset) {
         setOffset(offset);
-
         return this;
     }
 
     /**
-     *  Synonymous with {@link #setTarget}.
+     * Synonymous with {@link #setTarget}.
      */
     public SwitchInstruction setDefaultTarget(Instruction ins) {
-        return (SwitchInstruction) setTarget(ins);
+        return(SwitchInstruction) setTarget(ins);
     }
 
     /**
-     *  Return the targets for this switch, or empty array if not set.
+     * Return the targets for this switch, or empty array if not set.
      */
     public Instruction[] getTargets() {
-        Instruction[] result = new Instruction[_cases.size()];
-
-        for (int i = 0; i < _cases.size(); i++)
-            result[i] = ((InstructionPtrStrategy) _cases.get(i)).getTargetInstruction();
-
+        Instruction[] result = new Instruction [_cases.size()];
+        for (int i=0; i < _cases.size(); i++)
+            result [i] = ((InstructionPtrStrategy) _cases.get(i)).
+                getTargetInstruction();
         return result;
     }
 
     /**
-     *  Set the jump points for this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Set the jump points for this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public SwitchInstruction setTargets(Instruction[] targets) {
         _cases.clear();
-
-        if (targets != null) {
+        if (targets != null)
             for (int i = 0; i < targets.length; i++)
-                addTarget(targets[i]);
-        }
-
+                addTarget(targets [i]);
         return this;
     }
 
     /**
-     *  Add a target to this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Add a target to this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public SwitchInstruction addTarget(Instruction target) {
         _cases.add(new InstructionPtrStrategy(this, target));
-
         return this;
     }
 
@@ -169,17 +153,15 @@
 
     public void updateTargets() {
         super.updateTargets();
-
         for (Iterator itr = _cases.iterator(); itr.hasNext();)
             ((InstructionPtrStrategy) itr.next()).updateTargets();
     }
 
     public void replaceTarget(Instruction oldTarget, Instruction newTarget) {
         super.replaceTarget(oldTarget, newTarget);
-
         for (Iterator itr = _cases.iterator(); itr.hasNext();)
-            ((InstructionPtrStrategy) itr.next()).replaceTarget(oldTarget,
-                newTarget);
+            ((InstructionPtrStrategy) itr.next()).replaceTarget
+                (oldTarget, newTarget);
     }
 
     void read(Instruction orig) {
@@ -187,9 +169,9 @@
 
         SwitchInstruction ins = (SwitchInstruction) orig;
         _cases.clear();
-
         for (Iterator itr = ins._cases.iterator(); itr.hasNext();) {
-            InstructionPtrStrategy incoming = (InstructionPtrStrategy) itr.next();
+            InstructionPtrStrategy incoming = (InstructionPtrStrategy)
+                itr.next();
             InstructionPtrStrategy next = new InstructionPtrStrategy(this);
             next.setByteIndex(incoming.getByteIndex());
             _cases.add(next);
@@ -207,35 +189,31 @@
     }
 
     /**
-     *  Set the match-jumppt pairs for this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Set the match-jumppt pairs for this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public SwitchInstruction setCases(int[] matches, Instruction[] targets) {
         setMatches(matches);
         setTargets(targets);
-
         return this;
     }
 
     public SwitchInstruction setMatches(int[] matches) {
         clearMatches();
-
-        for (int i = 0; i < matches.length; i++)
-            addMatch(matches[i]);
-
+        for (int i=0; i < matches.length; i++)
+            addMatch(matches [i]);
         return this;
     }
 
     /**
-     *  Add a case to this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Add a case to this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public SwitchInstruction addCase(int match, Instruction target) {
         addMatch(match);
         addTarget(target);
-
         return this;
     }
 

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/Synthetic.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/Synthetic.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/Synthetic.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/Synthetic.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -17,12 +14,11 @@
 
 import serp.bytecode.visitor.*;
 
-
 /**
- *  <p>Attribute marking a member as synthetic, or not present in the class
- *  source code.</p>
- *
- *  @author Abe White
+ * Attribute marking a member as synthetic, or not present in the class
+ * source code.
+ * 
+ * @author Abe White
  */
 public class Synthetic extends Attribute {
     Synthetic(int nameIndex, Attributes owner) {

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TableSwitchInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TableSwitchInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TableSwitchInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TableSwitchInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,56 +12,50 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
 import java.util.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>The <code>tableswitch</code> instruction.</p>
- *
- *  @author Abe White
+ * The <code>tableswitch</code> instruction.
+ * 
+ * @author Abe White
  */
 public class TableSwitchInstruction extends JumpInstruction {
     // case info
     private int _low = 0;
     private int _high = 0;
-    private List _cases = new LinkedList();
+    private List    _cases      = new LinkedList();
 
     TableSwitchInstruction(Code owner) {
         super(owner, Constants.TABLESWITCH);
     }
 
     /**
-     *  Returns the current byte offsets for the different
-     *  switch cases in this Instruction.
+     * Returns the current byte offsets for the different
+     * switch cases in this Instruction.
      */
     public int[] getOffsets() {
         int bi = getByteIndex();
         int[] offsets = new int[_cases.size()];
-
-        for (int i = 0; i < _cases.size(); i++)
-            offsets[i] = ((InstructionPtrStrategy) _cases.get(i)).getByteIndex() -
-                bi;
-
+        for (int i=0; i < _cases.size(); i++)
+            offsets [i] = ((InstructionPtrStrategy) _cases.get(i)).
+                getByteIndex() - bi;
         return offsets;
     }
 
     /**
-     *  Sets the offsets for the instructions representing the different
-     *  switch statement cases.  WARNING: these offsets will not be changed
-     *  in the event that the code is modified following this call. It is
-     *  typically a good idea to follow this call with a call to updateTargets
-     *  as soon as the instructions at the given offsets are valid, at which
-     *  point the Instructions themselves will be used as the targets and the
-     *  offsets will be updated as expected.
+     * Sets the offsets for the instructions representing the different
+     * switch statement cases. WARNING: these offsets will not be changed
+     * in the event that the code is modified following this call. It is
+     * typically a good idea to follow this call with a call to updateTargets
+     * as soon as the instructions at the given offsets are valid, at which
+     * point the Instructions themselves will be used as the targets and the
+     * offsets will be updated as expected.
      */
     public void setOffsets(int[] offsets) {
         int bi = getByteIndex();
         _cases.clear();
-
         for (int i = 0; i < offsets.length; i++) {
             InstructionPtrStrategy next = new InstructionPtrStrategy(this);
             next.setByteIndex(offsets[i] + bi);
@@ -79,46 +70,43 @@
         // make the first byte of the 'default' a multiple of 4 from the
         // start of the method
         int byteIndex = getByteIndex() + 1;
-
-        for (; (byteIndex % 4) != 0; byteIndex++, length++)
-            ;
+        for (; byteIndex % 4 != 0; byteIndex++, length++);
 
         // default, low, high
         length += 12;
 
         // offsets
-        length += (4 * _cases.size());
+        length += 4 * _cases.size();
 
         return length;
     }
 
     /**
-     *  Synonymous with {@link #getTarget}.
+     * Synonymous with {@link #getTarget}.
      */
     public Instruction getDefaultTarget() {
         return getTarget();
     }
 
     /**
-     *  Synonymous with {@link #setTarget}.
+     * Synonymous with {@link #setTarget}.
      */
     public TableSwitchInstruction setDefaultTarget(Instruction ins) {
-        return (TableSwitchInstruction) setTarget(ins);
+        return(TableSwitchInstruction) setTarget(ins);
     }
 
     /**
-     *  Synonymous with {@link #getOffset}.
+     * Synonymous with {@link #getOffset}.
      */
     public int getDefaultOffset() {
         return getOffset();
     }
 
     /**
-     *  Synonymous with {@link #setOffset}.
+     * Synonymous with {@link #setOffset}.
      */
     public TableSwitchInstruction setDefaultOffset(int offset) {
         setOffset(offset);
-
         return this;
     }
 
@@ -128,7 +116,6 @@
 
     public TableSwitchInstruction setLow(int low) {
         _low = low;
-
         return this;
     }
 
@@ -138,46 +125,40 @@
 
     public TableSwitchInstruction setHigh(int high) {
         _high = high;
-
         return this;
     }
 
     /**
-     *  Return the targets for this switch, or empty array if not set.
+     * Return the targets for this switch, or empty array if not set.
      */
     public Instruction[] getTargets() {
-        Instruction[] result = new Instruction[_cases.size()];
-
-        for (int i = 0; i < _cases.size(); i++)
-            result[i] = ((InstructionPtrStrategy) _cases.get(i)).getTargetInstruction();
-
+        Instruction[] result = new Instruction [_cases.size()];
+        for (int i=0; i < _cases.size(); i++)
+            result [i] = ((InstructionPtrStrategy) _cases.get(i)).
+                getTargetInstruction();
         return result;
     }
 
     /**
-     *  Set the jump points for this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Set the jump points for this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public TableSwitchInstruction setTargets(Instruction[] targets) {
         _cases.clear();
-
-        if (targets != null) {
+        if (targets != null)
             for (int i = 0; i < targets.length; i++)
-                addTarget(targets[i]);
-        }
-
+                addTarget(targets [i]);
         return this;
     }
 
     /**
-     *  Add a target to this switch.
-     *
-     *  @return this instruction, for method chaining
+     * Add a target to this switch.
+     * 
+     * @return this instruction, for method chaining
      */
     public TableSwitchInstruction addTarget(Instruction target) {
         _cases.add(new InstructionPtrStrategy(this, target));
-
         return this;
     }
 
@@ -187,31 +168,25 @@
 
     private Instruction findTarget(int jumpByteIndex, List inss) {
         Instruction ins;
-
         for (Iterator itr = inss.iterator(); itr.hasNext();) {
             ins = (Instruction) itr.next();
-
-            if (ins.getByteIndex() == jumpByteIndex) {
+            if (ins.getByteIndex() == jumpByteIndex)
                 return ins;
-            }
         }
-
         return null;
     }
 
     public void updateTargets() {
         super.updateTargets();
-
         for (Iterator itr = _cases.iterator(); itr.hasNext();)
             ((InstructionPtrStrategy) itr.next()).updateTargets();
     }
 
     public void replaceTarget(Instruction oldTarget, Instruction newTarget) {
         super.replaceTarget(oldTarget, newTarget);
-
         for (Iterator itr = _cases.iterator(); itr.hasNext();)
-            ((InstructionPtrStrategy) itr.next()).replaceTarget(oldTarget,
-                newTarget);
+            ((InstructionPtrStrategy) itr.next()).replaceTarget
+                (oldTarget, newTarget);
     }
 
     public void acceptVisit(BCVisitor visit) {
@@ -225,9 +200,9 @@
         TableSwitchInstruction ins = (TableSwitchInstruction) orig;
         setLow(ins.getLow());
         setHigh(ins.getHigh());
-
         for (Iterator itr = ins._cases.iterator(); itr.hasNext();) {
-            InstructionPtrStrategy incoming = (InstructionPtrStrategy) itr.next();
+            InstructionPtrStrategy incoming = (InstructionPtrStrategy)
+                itr.next();
             InstructionPtrStrategy next = new InstructionPtrStrategy(this);
             next.setByteIndex(incoming.getByteIndex());
             _cases.add(next);
@@ -236,9 +211,9 @@
 
     void read(DataInput in) throws IOException {
         // don't call super
-        int bi = getByteIndex();
 
-        for (int byteIndex = bi + 1; (byteIndex % 4) != 0; byteIndex++)
+        int bi = getByteIndex();
+        for (int byteIndex = bi + 1; byteIndex % 4 != 0; byteIndex++)
             in.readByte();
 
         setOffset(in.readInt());
@@ -246,7 +221,6 @@
         setHigh(in.readInt());
 
         _cases.clear();
-
         for (int i = 0; i < (_high - _low + 1); i++) {
             InstructionPtrStrategy next = new InstructionPtrStrategy(this);
             next.setByteIndex(bi + in.readInt());
@@ -256,9 +230,9 @@
 
     void write(DataOutput out) throws IOException {
         // don't call super
-        int bi = getByteIndex();
 
-        for (int byteIndex = bi + 1; (byteIndex % 4) != 0; byteIndex++)
+        int bi = getByteIndex();
+        for (int byteIndex = bi + 1; byteIndex % 4 != 0; byteIndex++)
             out.writeByte(0);
 
         out.writeInt(getOffset());
@@ -266,7 +240,7 @@
         out.writeInt(getHigh());
 
         for (Iterator itr = _cases.iterator(); itr.hasNext();)
-            out.writeInt(((InstructionPtrStrategy) itr.next()).getByteIndex() -
-                bi);
+            out.writeInt(((InstructionPtrStrategy) itr.next()).
+                getByteIndex() - bi);
     }
 }

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TypedInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TypedInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TypedInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/TypedInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,21 +12,17 @@
  */
 package serp.bytecode;
 
+import java.util.*;
 import serp.bytecode.lowlevel.*;
-
 import serp.util.*;
 
-import java.util.*;
-
-
 /**
- *  <p>Any typed instruction.</p>
- *
- *  @author Abe White
+ * Any typed instruction.
+ * 
+ * @author Abe White
  */
 public abstract class TypedInstruction extends Instruction {
     private static final Set _opcodeTypes = new HashSet();
-
     static {
         _opcodeTypes.add(int.class.getName());
         _opcodeTypes.add(long.class.getName());
@@ -52,106 +45,89 @@
     }
 
     /**
-     *  Return the type for the given name.  Takes into account
-     *  the given mappings and the demote flag.
-     *
-     *  @param mappings        mappings of one type to another; for example,
-     *                                          array instruction treat booleans as ints, so
-     *                                          to reflect that there should be an index x of the
-     *                                          array such that mappings[x][0] = boolean.class and
-     *                                          mappings[x][1] = int.class; may be null if
-     *                                          no special mappings are needed
-     *  @param demote                if true, all object types will be demoted to
-     *                                          Object.class
+     * Return the type for the given name. Takes into account
+     * the given mappings and the demote flag.
+     * 
+     * @param mappings mappings of one type to another; for example,
+     * array instruction treat booleans as ints, so
+     * to reflect that there should be an index x of the
+     * array such that mappings[x][0] = boolean.class and
+     * mappings[x][1] = int.class; may be null if no special mappings are needed
+     * @param demote if true, all object types will be demoted to Object.class
      */
     String mapType(String type, Class[][] mappings, boolean demote) {
-        if (type == null) {
+        if (type == null)
             return null;
-        }
 
         type = getProject().getNameCache().getExternalForm(type, false);
-
-        if (!_opcodeTypes.contains(type) && demote) {
+        if (!_opcodeTypes.contains(type) && demote)
             type = Object.class.getName();
-        }
 
-        if (mappings != null) {
+        if (mappings != null)
             for (int i = 0; i < mappings.length; i++)
-                if (mappings[i][0].getName().equals(type)) {
+                if (mappings[i][0].getName().equals(type))
                     type = mappings[i][1].getName();
-                }
-        }
 
         return type;
     }
 
     /**
-     *  Return the type name for this instruction.
-     *  If the type has not been set, this method will return null.
+     * Return the type name for this instruction.
+     * If the type has not been set, this method will return null.
      */
     public abstract String getTypeName();
 
     /**
-     *  Return the type for this instruction.
-     *  If the type has not been set, this method will return null.
+     * Return the type for this instruction.
+     * If the type has not been set, this method will return null.
      */
     public Class getType() {
         String type = getTypeName();
-
-        if (type == null) {
+        if (type == null)
             return null;
-        }
-
         return Strings.toClass(type, getClassLoader());
     }
 
     /**
-     *  Return the type for this instruction.
-     *  If the type has not been set, this method will return null.
+     * Return the type for this instruction.
+     * If the type has not been set, this method will return null.
      */
     public BCClass getTypeBC() {
         String type = getTypeName();
-
-        if (type == null) {
+        if (type == null)
             return null;
-        }
-
         return getProject().loadClass(type, getClassLoader());
     }
 
     /**
-     *  Set the type of this instruction.  Types that have no direct
-     *  support will be converted accordingly.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of this instruction. Types that have no direct
+     * support will be converted accordingly.
+     * 
+     * @return this instruction, for method chaining
      */
     public abstract TypedInstruction setType(String type);
 
     /**
-     *  Set the type of this instruction.  Types that have no direct
-     *  support will be converted accordingly.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of this instruction. Types that have no direct
+     * support will be converted accordingly.
+     * 
+     * @return this instruction, for method chaining
      */
     public TypedInstruction setType(Class type) {
-        if (type == null) {
+        if (type == null)
             return setType((String) null);
-        }
-
         return setType(type.getName());
     }
 
     /**
-     *  Set the type of this instruction.  Types that have no direct
-     *  support will be converted accordingly.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of this instruction. Types that have no direct
+     * support will be converted accordingly.
+     * 
+     * @return this instruction, for method chaining
      */
     public TypedInstruction setType(BCClass type) {
-        if (type == null) {
+        if (type == null)
             return setType((String) null);
-        }
-
         return setType(type.getName());
     }
 }

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/UnknownAttribute.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/UnknownAttribute.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/UnknownAttribute.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/UnknownAttribute.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,16 +12,14 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>An unrecognized attribute; class files are allowed to contain
- *  attributes that are not recognized, and the JVM must ignore them.</p>
- *
- *  @author Abe White
+ * An unrecognized attribute; class files are allowed to contain
+ * attributes that are not recognized, and the JVM must ignore them.
+ * 
+ * @author Abe White
  */
 public class UnknownAttribute extends Attribute {
     private byte[] _value = new byte[0];
@@ -38,20 +33,18 @@
     }
 
     /**
-     *  The value is of unknown content, so it is stored as a byte array.
+     * The value is of unknown content, so it is stored as a byte array.
      */
     public byte[] getValue() {
         return _value;
     }
 
     /**
-     *  The value is of unknown content, so it is stored as a byte array.
+     * The value is of unknown content, so it is stored as a byte array.
      */
     public void setValue(byte[] value) {
-        if (value == null) {
+        if (value == null)
             value = new byte[0];
-        }
-
         _value = value;
     }
 

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/WideInstruction.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/WideInstruction.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/WideInstruction.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/WideInstruction.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,26 +12,22 @@
  */
 package serp.bytecode;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>The <code>wide</code> instruction, which is used to allow other
- *  instructions to index values beyond what they can normally index baed
- *  on the length of their arguments.</p>
- *
- *  @author Abe White
+ * The <code>wide</code> instruction, which is used to allow other
+ * instructions to index values beyond what they can normally index baed
+ * on the length of their arguments.
+ * 
+ * @author Abe White
  */
 public class WideInstruction extends LocalVariableInstruction {
     private static final Class[][] _mappings = new Class[][] {
-            { byte.class, int.class },
-            { boolean.class, int.class },
-            { char.class, int.class },
-            { short.class, int.class },
-            { void.class, int.class },
-        };
+        { byte.class, int.class }, { boolean.class, int.class },
+        { char.class, int.class }, { short.class, int.class },
+        { void.class, int.class }, };
+
     private int _ins = Constants.NOP;
     private int _inc = -1;
 
@@ -47,9 +40,8 @@
         int length = super.getLength() + 1 + 2;
 
         // increment
-        if (getInstruction() == Constants.IINC) {
+        if (getInstruction() == Constants.IINC)
             length += 2;
-        }
 
         return length;
     }
@@ -60,20 +52,16 @@
         case Constants.FLOAD:
         case Constants.ALOAD:
             return 1;
-
         case Constants.LLOAD:
         case Constants.DLOAD:
             return 2;
-
         case Constants.ISTORE:
         case Constants.FSTORE:
         case Constants.ASTORE:
             return -1;
-
         case Constants.LSTORE:
         case Constants.DSTORE:
             return -2;
-
         default:
             return 0;
         }
@@ -87,14 +75,12 @@
         case Constants.LLOAD:
         case Constants.DLOAD:
             return 1;
-
         case Constants.ISTORE:
         case Constants.FSTORE:
         case Constants.ASTORE:
         case Constants.LSTORE:
         case Constants.DSTORE:
             return -1;
-
         default:
             return 0;
         }
@@ -105,23 +91,18 @@
         case Constants.ILOAD:
         case Constants.ISTORE:
             return int.class.getName();
-
         case Constants.LLOAD:
         case Constants.LSTORE:
             return long.class.getName();
-
         case Constants.FLOAD:
         case Constants.FSTORE:
             return float.class.getName();
-
         case Constants.DLOAD:
         case Constants.DSTORE:
             return double.class.getName();
-
         case Constants.ALOAD:
         case Constants.ASTORE:
             return Object.class.getName();
-
         default:
             return null;
         }
@@ -136,260 +117,227 @@
         case Constants.FLOAD:
         case Constants.DLOAD:
         case Constants.ALOAD:
-
-            if (type == null) {
+            if (type == null)
                 throw new IllegalStateException();
-            }
-
             switch (type.charAt(0)) {
             case 'i':
-                return (TypedInstruction) setInstruction(Constants.ILOAD);
-
+                return(TypedInstruction) setInstruction(Constants.ILOAD);
             case 'l':
-                return (TypedInstruction) setInstruction(Constants.LLOAD);
-
+                return(TypedInstruction) setInstruction(Constants.LLOAD);
             case 'f':
-                return (TypedInstruction) setInstruction(Constants.FLOAD);
-
+                return(TypedInstruction) setInstruction(Constants.FLOAD);
             case 'd':
-                return (TypedInstruction) setInstruction(Constants.DLOAD);
-
+                return(TypedInstruction) setInstruction(Constants.DLOAD);
             default:
-                return (TypedInstruction) setInstruction(Constants.ALOAD);
+                return(TypedInstruction) setInstruction(Constants.ALOAD);
             }
-
         case Constants.ISTORE:
         case Constants.LSTORE:
         case Constants.FSTORE:
         case Constants.DSTORE:
         case Constants.ASTORE:
-
-            if (type == null) {
+            if (type == null)
                 throw new IllegalStateException();
-            }
-
             switch (type.charAt(0)) {
             case 'i':
-                return (TypedInstruction) setInstruction(Constants.ISTORE);
-
+                return(TypedInstruction) setInstruction(Constants.ISTORE);
             case 'l':
-                return (TypedInstruction) setInstruction(Constants.LSTORE);
-
+                return(TypedInstruction) setInstruction(Constants.LSTORE);
             case 'f':
-                return (TypedInstruction) setInstruction(Constants.FSTORE);
-
+                return(TypedInstruction) setInstruction(Constants.FSTORE);
             case 'd':
-                return (TypedInstruction) setInstruction(Constants.DSTORE);
-
+                return(TypedInstruction) setInstruction(Constants.DSTORE);
             default:
-                return (TypedInstruction) setInstruction(Constants.ASTORE);
+                return(TypedInstruction) setInstruction(Constants.ASTORE);
             }
-
         default:
-
-            if (type != null) {
-                throw new IllegalStateException("Augmented instruction not " +
-                    "typed");
-            }
-
+            if (type != null)
+                throw new IllegalStateException("Augmented instruction not "
+                    + "typed");
             return this;
         }
     }
 
     /**
-      *  Return the opcode of the instruction to modify; this will return one
-     *  of the constants defined in        {@link Constants}.
+     * Return the opcode of the instruction to modify; this will return one
+     * of the constants defined in {@link Constants}.
      */
     public int getInstruction() {
         return _ins;
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
+     * Set the type of instruction this wide instruction modifies.
      */
     public WideInstruction setInstruction(Instruction ins) {
-        if (ins == null) {
+        if (ins == null)
             return setInstruction(Constants.NOP);
-        }
 
         setInstruction(ins.getOpcode());
-
-        if (ins instanceof IIncInstruction) {
+        if (ins instanceof IIncInstruction)
             setIncrement(((IIncInstruction) ins).getIncrement());
-        }
 
         return this;
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
+     * Set the type of instruction this wide instruction modifies.
      */
     public WideInstruction setInstruction(int opcode) {
         _ins = opcode;
-
         return this;
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction iinc() {
         return setInstruction(Constants.IINC);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction ret() {
         return setInstruction(Constants.RET);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction iload() {
         return setInstruction(Constants.ILOAD);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction fload() {
         return setInstruction(Constants.FLOAD);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction aload() {
         return setInstruction(Constants.ALOAD);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction lload() {
         return setInstruction(Constants.LLOAD);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction dload() {
         return setInstruction(Constants.DLOAD);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction istore() {
         return setInstruction(Constants.ISTORE);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction fstore() {
         return setInstruction(Constants.FSTORE);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction astore() {
         return setInstruction(Constants.ASTORE);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction lstore() {
         return setInstruction(Constants.LSTORE);
     }
 
     /**
-     *  Set the type of instruction this wide instruction modifies.
-     *
-     *  @return this instruction, for method chaining
+     * Set the type of instruction this wide instruction modifies.
+     * 
+     * @return this instruction, for method chaining
      */
     public WideInstruction dstore() {
         return setInstruction(Constants.DSTORE);
     }
 
     /**
-     *  Return the increment for this instruction if it augments IINC, or -1
-     *  if unset.
-      */
+     * Return the increment for this instruction if it augments IINC, or -1
+     * if unset.
+     */
     public int getIncrement() {
         return _inc;
     }
 
     /**
-     *  Set the increment on this instruction if it augments IINC.
-     *
-     *  @return this Instruction, for method chaining
+     * Set the increment on this instruction if it augments IINC.
+     * 
+     * @return this Instruction, for method chaining
      */
     public WideInstruction setIncrement(int val) {
         _inc = val;
-
         return this;
     }
 
     /**
-     *  WideInstructions are equal if the instruction they augment is the same
-     *  or unset.
+     * WideInstructions are equal if the instruction they augment is the same
+     * or unset.
      */
     public boolean equalsInstruction(Instruction other) {
-        if (other == this) {
+        if (other == this)
             return true;
-        }
-
-        if (!super.equalsInstruction(other)) {
+        if (!super.equalsInstruction(other))
             return false;
-        }
-
-        if (!(other instanceof WideInstruction)) {
+        if (!(other instanceof WideInstruction))
             return false;
-        }
 
         WideInstruction ins = (WideInstruction) other;
 
         int code = getInstruction();
         int otherCode = ins.getInstruction();
-
-        if (code != otherCode) {
+        if (code != otherCode)
             return false;
-        }
 
         if (code == Constants.IINC) {
             int inc = getIncrement();
             int otherInc = ins.getIncrement();
-
-            return (inc == -1) || (otherInc == -1) || (inc == otherInc);
+            return inc == -1 || otherInc == -1 || inc == otherInc;
         }
-
         return true;
     }
 
@@ -408,10 +356,8 @@
 
         setInstruction(in.readUnsignedByte());
         setLocal(in.readUnsignedShort());
-
-        if (getInstruction() == Constants.IINC) {
+        if (getInstruction() == Constants.IINC)
             setIncrement(in.readUnsignedShort());
-        }
     }
 
     void write(DataOutput out) throws IOException {
@@ -419,9 +365,7 @@
 
         out.writeByte(getInstruction());
         out.writeShort(getLocal());
-
-        if (getInstruction() == Constants.IINC) {
+        if (getInstruction() == Constants.IINC)
             out.writeShort(getIncrement());
-        }
     }
 }

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ClassEntry.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ClassEntry.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ClassEntry.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ClassEntry.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -15,50 +12,48 @@
  */
 package serp.bytecode.lowlevel;
 
-import serp.bytecode.visitor.*;
-
 import java.io.*;
-
+import serp.bytecode.visitor.*;
 
 /**
- *  <p>A constant pool entry describing a class.
- *  Class entries are used to refer to the current class, the superclass,
- *  implemented interfaces, etc.  Each class entry contains the constant pool
- *  index of the {@link UTF8Entry} that stores the class name, which is
- *  represented in internal form.</p>
- *
- *  @author Abe White
+ * A constant pool entry describing a class.
+ * Class entries are used to refer to the current class, the superclass,
+ * implemented interfaces, etc. Each class entry contains the constant pool
+ * index of the {@link UTF8Entry} that stores the class name, which is
+ * represented in internal form.
+ * 
+ * @author Abe White
  */
 public class ClassEntry extends Entry implements ConstantEntry {
     private int _nameIndex = 0;
 
     /**
-     *  Default constructor.
+     * Default constructor.
      */
     public ClassEntry() {
     }
 
     /**
-     *  Constructor.
-     *
-     *  @param nameIndex        the constant pool index of the {@link UTF8Entry}
-     *                                          containing the class name
+     * Constructor.
+     * 
+     * @param nameIndex the constant pool index of the {@link UTF8Entry}
+     * containing the class name
      */
     public ClassEntry(int nameIndex) {
         _nameIndex = nameIndex;
     }
 
     /**
-     *  Return the constant pool index of the {@link UTF8Entry}
-     *  containing the class name.  Defaults to 0.
+     * Return the constant pool index of the {@link UTF8Entry}
+     * containing the class name. Defaults to 0.
      */
     public int getNameIndex() {
         return _nameIndex;
     }
 
     /**
-     *  Set the constant pool index of the {@link UTF8Entry}
-     *  containing the class name.
+     * Set the constant pool index of the {@link UTF8Entry}
+     * containing the class name.
      */
     public void setNameIndex(int nameIndex) {
         Object key = beforeModify();
@@ -67,11 +62,11 @@
     }
 
     /**
-     *  Return the referenced {@link UTF8Entry}.  This method can only
-     *  be run for entries that have been added to a constant pool.
+     * Return the referenced {@link UTF8Entry}. This method can only
+     * be run for entries that have been added to a constant pool.
      */
     public UTF8Entry getNameEntry() {
-        return (UTF8Entry) getPool().getEntry(_nameIndex);
+        return(UTF8Entry) getPool().getEntry(_nameIndex);
     }
 
     public int getType() {

Modified: incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ComplexEntry.java
URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ComplexEntry.java?rev=418401&r1=418400&r2=418401&view=diff
==============================================================================
--- incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ComplexEntry.java (original)
+++ incubator/openjpa/trunk/serp/src/main/java/serp/bytecode/lowlevel/ComplexEntry.java Fri Jun 30 15:37:18 2006
@@ -1,13 +1,10 @@
 /*
  * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
+ *  Licensed 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
+ *  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
@@ -17,34 +14,31 @@
 
 import java.io.*;
 
-
 /**
- *  <p>Base class for field, method, and interface method constant pool
- *  entries. All complex entries reference the {@link ClassEntry} of the
- *  class that owns the entity and a {@link NameAndTypeEntry} describing
- *  the entity.</p>
- *
- *  @author Abe White
+ * Base class for field, method, and interface method constant pool
+ * entries. All complex entries reference the {@link ClassEntry} of the
+ * class that owns the entity and a {@link NameAndTypeEntry} describing
+ * the entity.
+ * 
+ * @author Abe White
  */
 public abstract class ComplexEntry extends Entry {
     private int _classIndex = 0;
     private int _nameAndTypeIndex = 0;
 
     /**
-     *  Default constructor.
+     * Default constructor.
      */
     public ComplexEntry() {
     }
 
     /**
-     *  Constructor.
-     *
-     *  @param classIndex                        the constant pool index of the
-     *                                                          {@link ClassEntry} describing the owner
-      *                                                          of this entity
-     *  @param nameAndTypeIndex        the constant pool index of the
-     *                                                          {@link NameAndTypeEntry} describing this
-     *                                                          entity
+     * Constructor.
+     * 
+     * @param classIndex the constant pool index of the
+     * {@link ClassEntry} describing the owner of this entity
+     * @param nameAndTypeIndex the constant pool index of the
+     * {@link NameAndTypeEntry} describing this entity
      */
     public ComplexEntry(int classIndex, int nameAndTypeIndex) {
         _classIndex = classIndex;
@@ -52,16 +46,16 @@
     }
 
     /**
-     *  Return the constant pool index of the {@link ClassEntry} describing
-     *  the owning class of this entity.  Defaults to 0.
+     * Return the constant pool index of the {@link ClassEntry} describing
+     * the owning class of this entity. Defaults to 0.
      */
     public int getClassIndex() {
         return _classIndex;
     }
 
     /**
-     *  Set the constant pool index of the {@link ClassEntry} describing
-     *  the owning class of this entity.
+     * Set the constant pool index of the {@link ClassEntry} describing
+     * the owning class of this entity.
      */
     public void setClassIndex(int classIndex) {
         Object key = beforeModify();
@@ -70,24 +64,24 @@
     }
 
     /**
-     *  Return the referenced {@link ClassEntry}.  This method can only
-     *  be run for entries that have been added to a constant pool.
+     * Return the referenced {@link ClassEntry}. This method can only
+     * be run for entries that have been added to a constant pool.
      */
     public ClassEntry getClassEntry() {
-        return (ClassEntry) getPool().getEntry(_classIndex);
+        return(ClassEntry) getPool().getEntry(_classIndex);
     }
 
     /**
-     *  Return the constant pool index of the {@link NameAndTypeEntry}
-     *  describing this entity.
+     * Return the constant pool index of the {@link NameAndTypeEntry}
+     * describing this entity.
      */
     public int getNameAndTypeIndex() {
         return _nameAndTypeIndex;
     }
 
     /**
-     *  Set the constant pool index of the {@link NameAndTypeEntry}
-     *  describing this entity.
+     * Set the constant pool index of the {@link NameAndTypeEntry}
+     * describing this entity.
      */
     public void setNameAndTypeIndex(int nameAndTypeIndex) {
         Object key = beforeModify();
@@ -96,11 +90,11 @@
     }
 
     /**
-     *  Return the referenced {@link NameAndTypeEntry}.  This method can only
-     *  be run for entries that have been added to a constant pool.
+     * Return the referenced {@link NameAndTypeEntry}. This method can only
+     * be run for entries that have been added to a constant pool.
      */
     public NameAndTypeEntry getNameAndTypeEntry() {
-        return (NameAndTypeEntry) getPool().getEntry(_nameAndTypeIndex);
+        return(NameAndTypeEntry) getPool().getEntry(_nameAndTypeIndex);
     }
 
     void readData(DataInput in) throws IOException {



Mime
View raw message