1 21 package proguard.evaluation.value; 22 23 import proguard.classfile.ClassConstants; 24 25 30 public class IntegerValue extends Category1Value 31 { 32 35 public int value() 36 { 37 return 0; 38 } 39 40 41 43 47 public IntegerValue generalize(IntegerValue other) 48 { 49 return this; 50 } 51 52 53 56 public IntegerValue add(IntegerValue other) 57 { 58 return this; 59 } 60 61 64 public IntegerValue subtract(IntegerValue other) 65 { 66 return this; 67 } 68 69 72 public IntegerValue subtractFrom(IntegerValue other) 73 { 74 return this; 75 } 76 77 80 public IntegerValue multiply(IntegerValue other) 81 throws ArithmeticException 82 { 83 return this; 84 } 85 86 89 public IntegerValue divide(IntegerValue other) 90 throws ArithmeticException 91 { 92 return this; 93 } 94 95 98 public IntegerValue divideOf(IntegerValue other) 99 throws ArithmeticException 100 { 101 return this; 102 } 103 104 108 public IntegerValue remainder(IntegerValue other) 109 throws ArithmeticException 110 { 111 return this; 112 } 113 114 118 public IntegerValue remainderOf(IntegerValue other) 119 throws ArithmeticException 120 { 121 return this; 122 } 123 124 127 public IntegerValue shiftLeft(IntegerValue other) 128 { 129 return this; 130 } 131 132 135 public IntegerValue shiftLeftOf(IntegerValue other) 136 { 137 return this; 138 } 139 140 143 public IntegerValue shiftRight(IntegerValue other) 144 { 145 return this; 146 } 147 148 151 public IntegerValue shiftRightOf(IntegerValue other) 152 { 153 return this; 154 } 155 156 160 public IntegerValue unsignedShiftRight(IntegerValue other) 161 { 162 return this; 163 } 164 165 169 public IntegerValue unsignedShiftRightOf(IntegerValue other) 170 { 171 return this; 172 } 173 174 177 public LongValue shiftLeftOf(LongValue other) 178 { 179 return ValueFactory.LONG_VALUE; 180 } 181 182 185 public LongValue shiftRightOf(LongValue other) 186 { 187 return ValueFactory.LONG_VALUE; 188 } 189 190 193 public LongValue unsignedShiftRightOf(LongValue other) 194 { 195 return ValueFactory.LONG_VALUE; 196 } 197 198 202 public IntegerValue and(IntegerValue other) 203 { 204 return this; 205 } 206 207 211 public IntegerValue or(IntegerValue other) 212 { 213 return this; 214 } 215 216 220 public IntegerValue xor(IntegerValue other) 221 { 222 return this; 223 } 224 225 229 public int equal(IntegerValue other) 230 { 231 return MAYBE; 232 } 233 234 238 public int lessThan(IntegerValue other) 239 { 240 return MAYBE; 241 } 242 243 248 public int lessThanOrEqual(IntegerValue other) 249 { 250 return MAYBE; 251 } 252 253 254 256 260 public final int notEqual(IntegerValue other) 261 { 262 return -equal(other); 263 } 264 265 269 public final int greaterThan(IntegerValue other) 270 { 271 return -lessThanOrEqual(other); 272 } 273 274 278 public final int greaterThanOrEqual(IntegerValue other) 279 { 280 return -lessThan(other); 281 } 282 283 284 286 289 public IntegerValue negate() 290 { 291 return this; 292 } 293 294 297 public IntegerValue convertToByte(ValueFactory valueFactory) 298 { 299 return this; 300 } 301 302 305 public IntegerValue convertToCharacter(ValueFactory valueFactory) 306 { 307 return this; 308 } 309 310 313 public IntegerValue convertToShort(ValueFactory valueFactory) 314 { 315 return this; 316 } 317 318 321 public LongValue convertToLong(ValueFactory valueFactory) 322 { 323 return valueFactory.createLongValue(); 324 } 325 326 329 public FloatValue convertToFloat(ValueFactory valueFactory) 330 { 331 return valueFactory.createFloatValue(); 332 } 333 334 337 public DoubleValue convertToDouble(ValueFactory valueFactory) 338 { 339 return valueFactory.createDoubleValue(); 340 } 341 342 343 345 349 public IntegerValue generalize(SpecificIntegerValue other) 350 { 351 return this; 352 } 353 354 355 358 public IntegerValue add(SpecificIntegerValue other) 359 { 360 return this; 361 } 362 363 366 public IntegerValue subtract(SpecificIntegerValue other) 367 { 368 return this; 369 } 370 371 374 public IntegerValue subtractFrom(SpecificIntegerValue other) 375 { 376 return this; 377 } 378 379 382 public IntegerValue multiply(SpecificIntegerValue other) 383 { 384 return this; 385 } 386 387 391 public IntegerValue divide(SpecificIntegerValue other) 392 { 393 return this; 394 } 395 396 400 public IntegerValue divideOf(SpecificIntegerValue other) 401 { 402 return this; 403 } 404 405 409 public IntegerValue remainder(SpecificIntegerValue other) 410 { 411 return this; 412 } 413 414 418 public IntegerValue remainderOf(SpecificIntegerValue other) 419 { 420 return this; 421 } 422 423 426 public IntegerValue shiftLeft(SpecificIntegerValue other) 427 { 428 return this; 429 } 430 431 434 public IntegerValue shiftLeftOf(SpecificIntegerValue other) 435 { 436 return this; 437 } 438 439 442 public IntegerValue shiftRight(SpecificIntegerValue other) 443 { 444 return this; 445 } 446 447 450 public IntegerValue shiftRightOf(SpecificIntegerValue other) 451 { 452 return this; 453 } 454 455 459 public IntegerValue unsignedShiftRight(SpecificIntegerValue other) 460 { 461 return this; 462 } 463 464 468 public IntegerValue unsignedShiftRightOf(SpecificIntegerValue other) 469 { 470 return this; 471 } 472 473 476 public LongValue shiftLeftOf(SpecificLongValue other) 477 { 478 return ValueFactory.LONG_VALUE; 479 } 480 481 484 public LongValue shiftRightOf(SpecificLongValue other) 485 { 486 return ValueFactory.LONG_VALUE; 487 } 488 489 493 public LongValue unsignedShiftRightOf(SpecificLongValue other) 494 { 495 return ValueFactory.LONG_VALUE; 496 } 497 498 502 public IntegerValue and(SpecificIntegerValue other) 503 { 504 return this; 505 } 506 507 511 public IntegerValue or(SpecificIntegerValue other) 512 { 513 return this; 514 } 515 516 520 public IntegerValue xor(SpecificIntegerValue other) 521 { 522 return this; 523 } 524 525 529 public int equal(SpecificIntegerValue other) 530 { 531 return MAYBE; 532 } 533 534 539 public int lessThan(SpecificIntegerValue other) 540 { 541 return MAYBE; 542 } 543 544 549 public int lessThanOrEqual(SpecificIntegerValue other) 550 { 551 return MAYBE; 552 } 553 554 555 557 561 public final int notEqual(SpecificIntegerValue other) 562 { 563 return -equal(other); 564 } 565 566 571 public final int greaterThan(SpecificIntegerValue other) 572 { 573 return -lessThanOrEqual(other); 574 } 575 576 581 public final int greaterThanOrEqual(SpecificIntegerValue other) 582 { 583 return -lessThan(other); 584 } 585 586 587 589 public final IntegerValue integerValue() 590 { 591 return this; 592 } 593 594 public final Value generalize(Value other) 595 { 596 return this.generalize(other.integerValue()); 597 } 598 599 public final int computationalType() 600 { 601 return TYPE_INTEGER; 602 } 603 604 public final String internalType() 605 { 606 return "" + ClassConstants.INTERNAL_TYPE_INT; 607 } 608 609 610 612 public boolean equals(Object object) 613 { 614 return object != null && 615 this.getClass() == object.getClass(); 616 } 617 618 619 public int hashCode() 620 { 621 return this.getClass().hashCode(); 622 } 623 624 625 public String toString() 626 { 627 return "i"; 628 } 629 } 630 | Popular Tags |