javaclass

tests/ValueSubclass.java

131:b220be071851
2005-01-18 Paul Boddie Fixed signed constant loading in bipush and sipush.
     1 public class ValueSubclass extends Value {     2     public Value tmp;     3      4     /**     5      * Test of subclass initialisation with super usage and foreign object initialisation.     6      */     7     public ValueSubclass(int x) {     8         super(x);     9         tmp = new Value(42);    10     }    11     12     /**    13      * Test of overriding.    14      */    15     public void setValue(int x) {    16         this.value = -x;    17     }    18     19     /**    20      * Test of overriding and super methods.    21      */    22     public int add(int x) {    23         return super.add(-x);    24     }    25     26     /**    27      * Test of objects as arguments.    28      */    29     public void setValueObject(Value v) {    30         this.value = v.getValue();    31     }    32 }    33     34 // This should confuse the importer since it should be read before Value in    35 // alphabetical order.    36     37 class SubclassValue extends Value {    38     public SubclassValue(int x) {    39         super(x);    40     }    41 }