aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2005-01-31 11:32:21 +0000
committeraclement <aclement>2005-01-31 11:32:21 +0000
commit41caa4137c20d581079192659bf43d731aff669f (patch)
tree580d8a5ecca2963590112332308c3c27377d390a
parent110b3d31ac12ea19c73963577fdfe18c69e5f4db (diff)
downloadaspectj-41caa4137c20d581079192659bf43d731aff669f.tar.gz
aspectj-41caa4137c20d581079192659bf43d731aff669f.zip
Bit of missing support...
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionFactory.java4
-rw-r--r--bcel-builder/src/org/aspectj/apache/bcel/generic/PUSH.java6
2 files changed, 8 insertions, 2 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionFactory.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionFactory.java
index 8524f03be..9943e0949 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionFactory.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionFactory.java
@@ -61,7 +61,7 @@ import org.aspectj.apache.bcel.Constants;
* byte code generating backend of a compiler. You can subclass it to
* add your own create methods.
*
- * @version $Id: InstructionFactory.java,v 1.2 2004/11/19 16:45:19 aclement Exp $
+ * @version $Id: InstructionFactory.java,v 1.3 2005/01/31 11:32:21 aclement Exp $
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
* @see Constants
*/
@@ -154,6 +154,8 @@ public class InstructionFactory
push = new PUSH(cp, (Boolean)value);
else if(value instanceof Character)
push = new PUSH(cp, (Character)value);
+ else if (value instanceof ObjectType)
+ push = new PUSH(cp, (ObjectType)value);
else
throw new ClassGenException("Illegal type: " + value.getClass());
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/PUSH.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/PUSH.java
index ce5300fbe..16e5fdf1e 100644
--- a/bcel-builder/src/org/aspectj/apache/bcel/generic/PUSH.java
+++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/PUSH.java
@@ -59,7 +59,7 @@ import org.aspectj.apache.bcel.Constants;
* Wrapper class for push operations, which are implemented either as BIPUSH,
* LDC or xCONST_n instructions.
*
- * @version $Id: PUSH.java,v 1.4 2004/11/22 08:31:27 aclement Exp $
+ * @version $Id: PUSH.java,v 1.5 2005/01/31 11:32:21 aclement Exp $
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
*/
public final class PUSH
@@ -83,6 +83,10 @@ public final class PUSH
else // If everything fails create a Constant pool entry
instruction = new LDC(cp.addInteger(value));
}
+
+ public PUSH(ConstantPoolGen cp, ObjectType t) {
+ instruction = new LDC_W(cp.addClass(t));
+ }
/**
* @param cp Constant pool