felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clem...@apache.org
Subject svn commit: r560172 - in /felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo: manipulation/ manipulator/ xml/parser/
Date Fri, 27 Jul 2007 09:46:13 GMT
Author: clement
Date: Fri Jul 27 02:46:07 2007
New Revision: 560172

URL: http://svn.apache.org/viewvc?view=rev&rev=560172
Log:
Some cosmetic improvements

Modified:
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
Fri Jul 27 02:46:07 2007
@@ -32,7 +32,7 @@
 import org.objectweb.asm.Type;
 
 /**
- * Check thaht a POJO is already manipulated or not.
+ * Check that a POJO is already manipulated or not.
  * Moreover it allows to get manipulation data about this class. 
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
@@ -105,9 +105,9 @@
 
     /**
      * Visit the class.
-     * Update the implemented insterface list.
+     * Update the implemented interface list.
      * @param version : version of the class
-     * @param access : acess of the class
+     * @param access : access of the class
      * @param name : name of the class
      * @param signature : signature of the class
      * @param superName : super class of the class
@@ -124,7 +124,7 @@
      * Visit sources.
      * Do nothing
      * @param source : the name of the source file from which the class was compiled. May
be null.
-       @param debug : additional debug information to compute the correspondance between
source and compiled elements of the class. May be null.
+       @param debug : additional debug information to compute the relationship between source
and compiled elements of the class. May be null.
      * @see org.objectweb.asm.ClassVisitor#visitSource(java.lang.String, java.lang.String)
      */
     public void visitSource(String source, String debug) { }
@@ -134,8 +134,7 @@
      * @param owner - internal name of the enclosing class of the class.
      * @param name - the name of the method that contains the class, or null if the class
is not enclosed in a method of its enclosing class.
      * @param desc - the descriptor of the method that contains the class, or null if the
class is not enclosed in a method of its enclosing class.
-     * @see org.objectweb.asm.ClassVisitor#visitOuterClass(java.lang.String,
-     *      java.lang.String, java.lang.String)
+     * @see org.objectweb.asm.ClassVisitor#visitOuterClass(java.lang.String, java.lang.String,
java.lang.String)
      */
     public void visitOuterClass(String owner, String name, String desc) {
     }
@@ -180,8 +179,7 @@
      * @param signature - the method's signature. May be null if the method parameters, return
type and exceptions do not use generic types.
      * @param exceptions - the internal names of the method's exception classes (see getInternalName).
May be null.
      * @return nothing.
-     * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String,
-     *      java.lang.String, java.lang.String, java.lang.String[])
+     * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String, java.lang.String,
java.lang.String, java.lang.String[])
      */
     public MethodVisitor visitMethod(int access, String name, String desc,
             String signature, String[] exceptions) {

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
Fri Jul 27 02:46:07 2007
@@ -30,7 +30,8 @@
  */
 public class ConstructorCodeAdapter extends MethodAdapter implements Opcodes {
 
-    /** The owner class of the field.
+    /** 
+     * The class containing the field.
      * m_owner : String
      */
     private String m_owner;
@@ -40,7 +41,8 @@
      */
     private boolean m_superDetected;
 
-    /** PropertyCodeAdapter constructor.
+    /** 
+     * PropertyCodeAdapter constructor.
      * A new FiledCodeAdapter should be create for each method visit.
      * @param mv MethodVisitor
      * @param owner Name of the class
@@ -52,12 +54,13 @@
     }
 
 
-    /** Visit Method for Field instance (GETFIELD).
+    /** 
+     * Visit Method for Field instance (GETFIELD).
      * @see org.objectweb.asm.MethodVisitor#visitFieldInsn(int, String, String, String)
      * @param opcode : visited operation code
      * @param owner : owner of the field
      * @param name : name of the field
-     * @param desc : decriptor of the field
+     * @param desc : descriptor of the field
      */
     public void visitFieldInsn(
             final int opcode,
@@ -80,7 +83,7 @@
     }
     
     /**
-     * Vist a method invocation insruction.
+     * Visit a method invocation instruction.
      * After the super constructor invocation, insert the _setComponentManager invocation.
      * @param opcode : opcode
      * @param owner : method owning class
@@ -130,7 +133,7 @@
     
     /**
      * Visit an increment instruction.
-     * If incrementing a varialbe, increment the variable index.
+     * If incrementing a variable, increment the variable index.
      * @param var : variable index
      * @param increment : increment
      * @see org.objectweb.asm.MethodAdapter#visitIincInsn(int, int)
@@ -150,7 +153,7 @@
      * @param desc : variable descriptor
      * @param signature : variable signature
      * @param start : beginning label 
-     * @param end : endind label
+     * @param end : ending label
      * @param index :variable index
      * @see org.objectweb.asm.MethodAdapter#visitLocalVariable(java.lang.String, java.lang.String,
java.lang.String, org.objectweb.asm.Label, org.objectweb.asm.Label, int)
      */

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
Fri Jul 27 02:46:07 2007
@@ -54,7 +54,7 @@
      * @param access : Access modifier
      * @param name : name of the visited element
      * @param signature : signature of the visited element
-     * @param superName : superclasses (extend clause)
+     * @param superName : superclass (extend clause)
      * @param interfaces : implement clause
      */
     public void visit(final int version, final int access, final String name, final String
signature, final String superName, final String[] interfaces) {
@@ -65,7 +65,7 @@
      * Visit a Field.
      * Inject the getter and the setter method for this field.
      * @see org.objectweb.asm.ClassVisitor#visitField(int, java.lang.String, java.lang.String,
java.lang.String, java.lang.Object)
-     * @param access : acces modifier
+     * @param access : access modifier
      * @param name : name of the field
      * @param desc : description of the field
      * @param signature : signature of the field
@@ -470,7 +470,6 @@
                 break;
 
             case Type.OBJECT:
-
                 Label l03 = new Label();
                 mv.visitLabel(l03);
                 mv.visitVarInsn(ALOAD, 0);
@@ -532,13 +531,9 @@
 
     /**
      * Create the setter method for one property. The name of the method is _set+name of
the field
-     * 
-     * @param name :
-     *            name of the field representing a property
-     * @param desc :
-     *            description of the setter method
-     * @param type :
-     *            type of the property
+     * @param name : name of the field representing a property
+     * @param desc : description of the setter method
+     * @param type : type of the property
      */
     private void createSimpleSetter(String name, String desc, Type type) {
         MethodVisitor mv = cv.visitMethod(ACC_PRIVATE, "_set" + name, desc, null, null);
@@ -623,7 +618,6 @@
                 break;
 
             case Type.OBJECT:
-
                 mv.visitVarInsn(ALOAD, 0);
                 mv.visitVarInsn(ALOAD, 1);
                 mv.visitFieldInsn(PUTFIELD, m_owner, name, "L" + type.getInternalName() +
";");

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
Fri Jul 27 02:46:07 2007
@@ -57,7 +57,7 @@
     protected static final String IPOJO_PACKAGE_NAME = "org.apache.felix.ipojo";
 
     /**
-     * Helper array for bytecode manipulation of primitive type.
+     * Helper array for byte code manipulation of primitive type.
      */
     protected static final String[][] PRIMITIVE_BOXING_INFORMATION = new String[][] { 
         { "V", "ILLEGAL", "ILLEGAL" }, 

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
Fri Jul 27 02:46:07 2007
@@ -36,13 +36,13 @@
 import org.objectweb.asm.ClassWriter;
 
 /**
- * iPOJO Bytecode Manipulator.
+ * iPOJO Byte code Manipulator.
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  * 
  */
 public class Manipulator {
     /**
-     * Store the visited fields : [name fo the field, type of the field].
+     * Store the visited fields : [name of the field, type of the field].
      */
     private Map m_fields = new HashMap();
 
@@ -62,16 +62,16 @@
      * @param name : The name of the class
      * @param outputDirectory : output directory where the class if stored.
      * @return true if the class is correctly manipulated.
-     * @throws Exception : throwed if the manipulation failed.
+     * @throws Exception : occurs if the manipulation failed.
      */
     public boolean manipulate(String name, File outputDirectory) throws Exception {
 
-        // Init field, itfs and methods
+        // Initialize fields, interfaces and methods
         m_fields = new HashMap();
         m_interfaces = new String[0];
         m_methods = new ArrayList();
 
-        // gets an input stream to read the bytecode of the class
+        // gets an input stream to read the byte code of the class
         String path = outputDirectory + "/" + name.replace('.', '/') + ".class";
         File clazz = new File(path);
 
@@ -149,12 +149,9 @@
 
     /**
      * Manipulate the given byte array.
-     * 
-     * @param origin :
-     *            original class.
+     * @param origin : original class.
      * @return the manipulated class.
-     * @throws IOException :
-     *             if an error occurs during the manipulation.
+     * @throws IOException : if an error occurs during the manipulation.
      */
     public byte[] manipulate(byte[] origin) throws IOException {
         InputStream is1 = new ByteArrayInputStream(origin);

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
Fri Jul 27 02:46:07 2007
@@ -45,7 +45,7 @@
      * MethodCodeAdapter constructor. 
      * @param mv : MethodVisitor
      * @param owner : Name of the class
-     * @param access : Method acess
+     * @param access : Method access
      * @param name : Method name
      * @param desc : Method descriptor
      */
@@ -61,7 +61,7 @@
      * @param opcode : visited operation code
      * @param owner : owner of the field
      * @param name : name of the field
-     * @param desc : decriptor of the field
+     * @param desc : descriptor of the field
      */
     public void visitFieldInsn(final int opcode, final String owner, final String name, final
String desc) {
         if (owner.equals(m_owner)) {
@@ -160,7 +160,7 @@
     }
 
     /**
-     * Compute mx local and max stack size.
+     * Compute max local and max stack size.
      * @param maxStack : new stack size.
      * @param maxLocals : max local (do not modified, super will update it automatically).
      * @see org.objectweb.asm.commons.LocalVariablesSorter#visitMaxs(int, int)

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
Fri Jul 27 02:46:07 2007
@@ -163,7 +163,7 @@
     /**
      * Visit a method.
      * Manipulate constructor and methods. Does nothing with clinit and class$
-     * @param access : method acess
+     * @param access : method access
      * @param name : method name
      * @param desc : method descriptor
      * @param signature : method signature
@@ -257,7 +257,7 @@
     private void addPOJOInterface(int version, int access, String name, String signature,
String superName, String[] interfaces) {
 
         // Add the POJO interface to the interface list
-        // Check that the POJO interface isnot already in the list
+        // Check that the POJO interface is not already in the list
         boolean found = false;
         for (int i = 0; i < interfaces.length; i++) {
             if (interfaces[i].equals(m_pojo)) {

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
Fri Jul 27 02:46:07 2007
@@ -64,12 +64,12 @@
     private Element[] m_metadata;
 
     /**
-     * Errors occured during the manipulation.
+     * Errors which occur during the manipulation.
      */
     private List m_errors = new ArrayList();
 
     /**
-     * Warnings occured during the manipulation.
+     * Warnings which occur during the manipulation.
      */
     private List m_warnings = new ArrayList();
 
@@ -173,7 +173,7 @@
             Enumeration entries = inputJar.entries();
             while (entries.hasMoreElements()) {
                 JarEntry curEntry = (JarEntry) entries.nextElement();
-                // Check if we need to manipulate the clazz
+                // Check if we need to manipulate the class
                 if (m_classes.containsKey(curEntry.getName())) {
                     JarEntry je = new JarEntry(curEntry.getName());
                     byte[] outClazz = (byte[]) m_classes.get(curEntry.getName());
@@ -234,7 +234,7 @@
         Enumeration entries = inputJar.entries();
         while (entries.hasMoreElements()) {
             JarEntry curEntry = (JarEntry) entries.nextElement();
-            // Check if we need to manipulate the clazz
+            // Check if we need to manipulate the class
             for (int i = 0; i < m_components.size(); i++) {
                 ComponentInfo ci = (ComponentInfo) m_components.get(i);
                 if (ci.m_classname.equals(curEntry.getName())) {
@@ -299,7 +299,7 @@
     /**
      * Return the list of "concrete" component.
      * @param meta : metadata.
-     * @return the list of compionent info requiring a manipulation.
+     * @return the list of component info requiring a manipulation.
      */
     private List getDeclaredComponents(Element[] meta) {
         List componentClazzes = new ArrayList();
@@ -396,7 +396,7 @@
             }
         }
 
-        // Add refered imports from the metadata
+        // Add referred imports from the metadata
         for (int i = 0; i < m_referredPackages.size(); i++) {
             String pack = (String) m_referredPackages.get(i);
             imports.put(pack, new TreeMap());
@@ -526,7 +526,7 @@
         try {
             url = metadata.toURL();
             if (url == null) {
-                error("Cannot find the metdata file : " + path);
+                error("Cannot find the metadata file : " + path);
                 return null;
             }
 
@@ -565,7 +565,7 @@
      * Generate manipulation metadata.
      * @param element : actual element. 
      * @param actual : actual manipulation metadata.
-     * @return : given amnipulation metadata + manipulation metadata of the given element.
+     * @return : given manipulation metadata + manipulation metadata of the given element.
      */
     private String buildManifestMetadata(Element element, String actual) {
         String result = "";

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
Fri Jul 27 02:46:07 2007
@@ -37,7 +37,7 @@
     int m_index = 0;
 
     /**
-     * Default spearators to use.
+     * Default separator to use.
      */
     String m_separators;
 
@@ -78,7 +78,7 @@
 
     /**
      * Constructors.
-     * Fixe returnTokens to false.
+     * Set returnTokens to false.
      * @param string : input String.
      * @param separators : separators
      */

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java?view=diff&rev=560172&r1=560171&r2=560172
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
(original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
Fri Jul 27 02:46:07 2007
@@ -41,7 +41,7 @@
     private Element[] m_elements = new Element[0];
 
     /**
-     * Get componenet type metadata. (both component and composite)
+     * Get component type metadata. (both component and composite)
      * 
      * @return a components metadata
      * @throws ParseException



Mime
View raw message