[jboss-cvs] javassist/src/main/javassist/convert ...
Kabir Khan
kkhan at jboss.com
Fri Jan 5 07:17:50 EST 2007
User: kkhan
Date: 07/01/05 07:17:50
Modified: src/main/javassist/convert TransformAccessArrayField.java
Log:
Document CodeConverter.replaceArrayAccess()
Revision Changes Path
1.2 +3 -169 javassist/src/main/javassist/convert/TransformAccessArrayField.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TransformAccessArrayField.java
===================================================================
RCS file: /cvsroot/jboss/javassist/src/main/javassist/convert/TransformAccessArrayField.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- TransformAccessArrayField.java 24 Dec 2006 13:47:46 -0000 1.1
+++ TransformAccessArrayField.java 5 Jan 2007 12:17:50 -0000 1.2
@@ -17,6 +17,7 @@
import javassist.CtClass;
import javassist.NotFoundException;
+import javassist.CodeConverter.ArrayAccessReplacementMethodNames;
import javassist.bytecode.BadBytecode;
import javassist.bytecode.CodeIterator;
import javassist.bytecode.ConstPool;
@@ -24,16 +25,16 @@
/**
*
* @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class TransformAccessArrayField extends Transformer
{
// CtClass componentType;
String methodClassname;
- MethodNames names;
+ ArrayAccessReplacementMethodNames names;
- public TransformAccessArrayField(Transformer next, String methodClassname, MethodNames names) throws NotFoundException
+ public TransformAccessArrayField(Transformer next, String methodClassname, ArrayAccessReplacementMethodNames names) throws NotFoundException
{
super(next);
this.methodClassname = methodClassname;
@@ -179,171 +180,4 @@
}
throw new BadBytecode(opcode);
}
-
- public interface MethodNames
- {
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)Ljava/lang/Object;
- */
- String objectRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)B"
- */
- String byteOrBooleanRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)C
- */
- String charRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)D
- */
- String doubleRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)F
- */
- String floatRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)I
- */
- String intRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)J
- */
- String longRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;I)S
- */
- String shortRead();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;ILjava/lang/Object;)V
- */
- String objectWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;IB)V
- */
- String byteOrBooleanWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;IC)V
- */
- String charWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;ID)V
- */
- String doubleWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;IF)V
- */
- String floatWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;II)V
- */
- String intWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;IJ)V
- */
- String longWrite();
-
- /**
- * Give the name of a static method with the signature (Ljava/lang/Object;IS)V
- */
- String shortWrite();
- }
-
- public static class DefaultMethodNames implements MethodNames
- {
- public String byteOrBooleanRead()
- {
- return "arrayReadByteOrBoolean";
- }
-
- public String byteOrBooleanWrite()
- {
- return "arrayWriteByteOrBoolean";
- }
-
- public String charRead()
- {
- return "arrayReadChar";
- }
-
- public String charWrite()
- {
- return "arrayWriteChar";
- }
-
- public String doubleRead()
- {
- return "arrayReadDouble";
- }
-
- public String doubleWrite()
- {
- return "arrayWriteDouble";
- }
-
- public String floatRead()
- {
- return "arrayReadFloat";
- }
-
- public String floatWrite()
- {
- return "arrayWriteFloat";
- }
-
- public String intRead()
- {
- return "arrayReadInt";
- }
-
- public String intWrite()
- {
- return "arrayWriteInt";
- }
-
- public String longRead()
- {
- return "arrayReadLong";
- }
-
- public String longWrite()
- {
- return "arrayWriteLong";
- }
-
- public String objectRead()
- {
- return "arrayReadObject";
- }
-
- public String objectWrite()
- {
- return "arrayWriteObject";
- }
-
- public String shortRead()
- {
- return "arrayReadShort";
- }
-
- public String shortWrite()
- {
- return "arrayWriteShort";
- }
-
- }
}
More information about the jboss-cvs-commits
mailing list