Some cosmetic improvements
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@560172 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
index b468b13..6d0bf4c 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
@@ -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) {
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
index 40397b4..7592ba1 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
@@ -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)
*/
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
index 3dc3cc2..22ad2ad 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/FieldAdapter.java
@@ -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() + ";");
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
index 419e324..edebd42 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ManipulationProperty.java
@@ -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" },
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
index bcd32c1..f614b96 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
@@ -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);
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
index 4108af5..64b78a3 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
@@ -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)
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
index aeb5942..deb4bc8 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/PojoAdapter.java
@@ -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)) {
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
index fd2e80d..eac5afa 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/Pojoization.java
@@ -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 = "";
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
index 21fc181..31cd68d 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/QuotedTokenizer.java
@@ -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
*/
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
index 7560885..95899de 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/xml/parser/XMLMetadataParser.java
@@ -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