aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder
diff options
context:
space:
mode:
authoraclement <aclement>2008-08-28 00:02:35 +0000
committeraclement <aclement>2008-08-28 00:02:35 +0000
commite063b0d6c3e86a44c16319c543f4863cf52f77cf (patch)
tree6e4d35fb9026579888b005c032b89b3a19977497 /bcel-builder
parent9549aa1dcaf66ff6d21d2946cea10d14d8d9be75 (diff)
downloadaspectj-e063b0d6c3e86a44c16319c543f4863cf52f77cf.tar.gz
aspectj-e063b0d6c3e86a44c16319c543f4863cf52f77cf.zip
chewed by formatter
Diffstat (limited to 'bcel-builder')
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionByte.java56
1 files changed, 33 insertions, 23 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionByte.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionByte.java
index d0611306c..fcd46dc9f 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionByte.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionByte.java
@@ -1,5 +1,3 @@
-package org.aspectj.apache.bcel.generic;
-
/* ====================================================================
* The Apache Software License, Version 1.1
*
@@ -53,34 +51,46 @@ package org.aspectj.apache.bcel.generic;
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
+package org.aspectj.apache.bcel.generic;
-import java.io.*;
-
+import java.io.DataOutputStream;
+import java.io.IOException;
-/**
+/**
* Instruction that needs one byte
*/
public class InstructionByte extends Instruction {
- private byte b;
+ private final byte theByte;
+
+ public InstructionByte(short opcode, byte b) {
+ super(opcode);
+ this.theByte = b;
+ }
- public InstructionByte(short opcode, byte b) {
- this.opcode = opcode;
- this.b = b;
- }
-
- public void dump(DataOutputStream out) throws IOException {
- out.writeByte(opcode);
- out.writeByte(b);
- }
+ public void dump(DataOutputStream out) throws IOException {
+ out.writeByte(opcode);
+ out.writeByte(theByte);
+ }
- public String toString(boolean verbose) {
- return super.toString(verbose) + " " + b;
- }
-
- public final byte getTypecode() { return b; } // NEWARRAY
+ public String toString(boolean verbose) {
+ return super.toString(verbose) + " " + theByte;
+ }
+
+ /**
+ * For supporting NEWARRAY
+ *
+ * @return typecode of the array
+ */
+ public final byte getTypecode() {
+ return theByte;
+ }
- // NEWARRAY
+ /**
+ * For supporting NEWARRAY
+ *
+ * @return type of the array
+ */
public final Type getType() {
- return new ArrayType(BasicType.getType(b), 1);
+ return new ArrayType(BasicType.getType(theByte), 1);
}
-}
+} \ No newline at end of file