• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * ProGuard -- shrinking, optimization, obfuscation, and preverification
3  *             of Java bytecode.
4  *
5  * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
6  *
7  * This program is free software; you can redistribute it and/or modify it
8  * under the terms of the GNU General Public License as published by the Free
9  * Software Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * This program is distributed in the hope that it will be useful, but WITHOUT
13  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15  * more details.
16  *
17  * You should have received a copy of the GNU General Public License along
18  * with this program; if not, write to the Free Software Foundation, Inc.,
19  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20  */
21 package proguard.evaluation.value;
22 
23 /**
24  * This class represents a partially evaluated long value.
25  *
26  * @author Eric Lafortune
27  */
28 public class UnknownLongValue extends LongValue
29 {
30     // Basic unary methods.
31 
negate()32     public LongValue negate()
33     {
34         return this;
35     }
36 
convertToInteger()37     public IntegerValue convertToInteger()
38     {
39         return ValueFactory.INTEGER_VALUE;
40     }
41 
convertToFloat()42     public FloatValue convertToFloat()
43     {
44         return ValueFactory.FLOAT_VALUE;
45     }
46 
convertToDouble()47     public DoubleValue convertToDouble()
48     {
49         return ValueFactory.DOUBLE_VALUE;
50     }
51 
52 
53     // Basic binary methods.
54 
generalize(LongValue other)55     public LongValue generalize(LongValue other)
56     {
57         return this;
58     }
59 
add(LongValue other)60     public LongValue add(LongValue other)
61     {
62         return this;
63     }
64 
subtract(LongValue other)65     public LongValue subtract(LongValue other)
66     {
67         return this;
68     }
69 
subtractFrom(LongValue other)70     public LongValue subtractFrom(LongValue other)
71     {
72         return this;
73     }
74 
multiply(LongValue other)75     public LongValue multiply(LongValue other)
76     throws ArithmeticException
77     {
78         return this;
79     }
80 
divide(LongValue other)81     public LongValue divide(LongValue other)
82     throws ArithmeticException
83     {
84         return this;
85     }
86 
divideOf(LongValue other)87     public LongValue divideOf(LongValue other)
88     throws ArithmeticException
89     {
90         return this;
91     }
92 
remainder(LongValue other)93     public LongValue remainder(LongValue other)
94     throws ArithmeticException
95     {
96         return this;
97     }
98 
remainderOf(LongValue other)99     public LongValue remainderOf(LongValue other)
100     throws ArithmeticException
101     {
102         return this;
103     }
104 
shiftLeft(IntegerValue other)105     public LongValue shiftLeft(IntegerValue other)
106     {
107         return this;
108     }
109 
shiftRight(IntegerValue other)110     public LongValue shiftRight(IntegerValue other)
111     {
112         return this;
113     }
114 
unsignedShiftRight(IntegerValue other)115     public LongValue unsignedShiftRight(IntegerValue other)
116     {
117         return this;
118     }
119 
and(LongValue other)120     public LongValue and(LongValue other)
121     {
122         return this;
123     }
124 
or(LongValue other)125     public LongValue or(LongValue other)
126     {
127         return this;
128     }
129 
xor(LongValue other)130     public LongValue xor(LongValue other)
131     {
132         return this;
133     }
134 
compare(LongValue other)135     public IntegerValue compare(LongValue other)
136     {
137         return ValueFactory.INTEGER_VALUE;
138     }
139 
140 
141     // Implementations for Object.
142 
equals(Object object)143     public boolean equals(Object object)
144     {
145         return object != null &&
146                this.getClass() == object.getClass();
147     }
148 
149 
hashCode()150     public int hashCode()
151     {
152         return this.getClass().hashCode();
153     }
154 
155 
toString()156     public String toString()
157     {
158         return "l";
159     }
160 }