Update of /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14739/src/com/mebigfatguy/fbcontrib/detect
Modified Files:
FinalParameters.java
Log Message:
javadoc
Index: FinalParameters.java
===================================================================
RCS file: /cvsroot/fb-contrib/fb-contrib/src/com/mebigfatguy/fbcontrib/detect/FinalParameters.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- FinalParameters.java 5 Dec 2005 05:21:15 -0000 1.9
+++ FinalParameters.java 6 Dec 2005 05:53:56 -0000 1.10
@@ -74,12 +74,22 @@
return super.clone();
}
+ /**
+ * overrides the visitor to initialize the 'has source' flag
+ *
+ * @param classContext the context object for the currently parsed class
+ */
@Override
public void visitClassContext(ClassContext classContext) {
srcInited = false;
super.visitClassContext(classContext);
}
+ /**
+ * overrides the visitor capture source lines for the method
+ *
+ * @param obj the method object for the currently parsed method
+ */
@Override
public void visitMethod(final Method obj) {
methodName = obj.getName();
@@ -95,6 +105,13 @@
super.visitMethod(obj);
}
+ /**
+ * reads the sourcefile based on the source line annotation for the method
+ *
+ * @param obj the method object for the currently parsed method
+ *
+ * @return an array of source lines for the method
+ */
private String[] getSourceLines(Method obj) {
BufferedReader sourceReader = null;
@@ -131,6 +148,11 @@
return sourceLines;
}
+ /**
+ * overrides the visitor to find the source lines for the method header, to find non final parameters
+ *
+ * @param obj the code object for the currently parsed method
+ */
@Override
public void visitCode(final Code obj) {
if (sourceLines == null)
@@ -189,6 +211,11 @@
}
}
+ /**
+ * overrides the visitor to find local variable reference stores to store them as changed
+ *
+ * @param seen the currently parsed opcode
+ */
@Override
public void sawOpcode(final int seen) {
if ((seen == ASTORE) || ((seen >= ASTORE_0) && (seen <= ASTORE_3))) {
@@ -198,6 +225,14 @@
}
}
+ /**
+ * returns the variable name of the specified register slot
+ *
+ * @param obj the currently parsed code object
+ * @param reg the variable register of interest
+ *
+ * @return the variable name of the specified register
+ */
private String getRegisterName(final Code obj, final int reg) {
LocalVariableTable lvt = obj.getLocalVariableTable();
if (lvt != null) {
@@ -208,6 +243,13 @@
return String.valueOf(reg);
}
+ /**
+ * return the register number that is be stored
+ *
+ * @param seen the opcode of the currently parsed statement
+ *
+ * @return the register number being stored
+ */
private int getAStoreParameter(final int seen) {
int reg;
if (seen == ASTORE)
|