Lines Matching refs:value
78 * @param value to be pushed
80 public PUSH(ConstantPoolGen cp, int value) {
81 if((value >= -1) && (value <= 5)) // Use ICONST_n
82 instruction = INSTRUCTIONS[Constants.ICONST_0 + value];
83 else if((value >= -128) && (value <= 127)) // Use BIPUSH
84 instruction = new BIPUSH((byte)value);
85 else if((value >= -32768) && (value <= 32767)) // Use SIPUSH
86 instruction = new SIPUSH((short)value);
88 instruction = new LDC(cp.addInteger(value));
93 * @param value to be pushed
95 public PUSH(ConstantPoolGen cp, boolean value) {
96 instruction = INSTRUCTIONS[Constants.ICONST_0 + (value? 1 : 0)];
101 * @param value to be pushed
103 public PUSH(ConstantPoolGen cp, float value) {
104 if(value == 0.0)
106 else if(value == 1.0)
108 else if(value == 2.0)
111 instruction = new LDC(cp.addFloat(value));
116 * @param value to be pushed
118 public PUSH(ConstantPoolGen cp, long value) {
119 if(value == 0)
121 else if(value == 1)
124 instruction = new LDC2_W(cp.addLong(value));
129 * @param value to be pushed
131 public PUSH(ConstantPoolGen cp, double value) {
132 if(value == 0.0)
134 else if(value == 1.0)
137 instruction = new LDC2_W(cp.addDouble(value));
142 * @param value to be pushed
144 public PUSH(ConstantPoolGen cp, String value) {
145 if(value == null)
148 instruction = new LDC(cp.addString(value));
153 * @param value to be pushed
155 public PUSH(ConstantPoolGen cp, Number value) {
156 if((value instanceof Integer) || (value instanceof Short) || (value instanceof Byte))
157 instruction = new PUSH(cp, value.intValue()).instruction;
158 else if(value instanceof Double)
159 instruction = new PUSH(cp, value.doubleValue()).instruction;
160 else if(value instanceof Float)
161 instruction = new PUSH(cp, value.floatValue()).instruction;
162 else if(value instanceof Long)
163 instruction = new PUSH(cp, value.longValue()).instruction;
165 throw new ClassGenException("What's this: " + value);
170 * @param value to be pushed
172 public PUSH(ConstantPoolGen cp, Character value) {
173 this(cp, (int)value.charValue());
178 * @param value to be pushed
180 public PUSH(ConstantPoolGen cp, Boolean value) {
181 this(cp, value.booleanValue());