|
20 | 20 |
|
21 | 21 | import java.math.BigInteger; |
22 | 22 | import java.nio.ByteOrder; |
23 | | - |
24 | 23 | import java.util.HashMap; |
25 | 24 | import java.util.List; |
26 | 25 | import java.util.Map; |
@@ -139,100 +138,6 @@ public final class IntegerDeclaration extends Declaration implements ISimpleData |
139 | 138 | // Constructors |
140 | 139 | // ------------------------------------------------------------------------ |
141 | 140 |
|
142 | | - /** |
143 | | - * Factory, some common types cached |
144 | | - * |
145 | | - * @deprecated use |
146 | | - * {@link #createDeclaration(int, boolean, int, ByteOrder, Encoding, String, long, String)} |
147 | | - * instead |
148 | | - * |
149 | | - * @param len |
150 | | - * The length in bits |
151 | | - * @param signed |
152 | | - * Is the integer signed? false == unsigned |
153 | | - * @param base |
154 | | - * The base (10-16 are most common) |
155 | | - * @param byteOrder |
156 | | - * Big-endian little-endian or other |
157 | | - * @param encoding |
158 | | - * ascii, utf8 or none. |
159 | | - * @param clock |
160 | | - * The clock path, can be null |
161 | | - * @param alignment |
162 | | - * The minimum alignment. Should be >= 1 |
163 | | - * @return the integer declaration |
164 | | - * @deprecated use |
165 | | - * {@link #createDeclaration(int, boolean, int, ByteOrder, Encoding, String, long, String)} |
166 | | - */ |
167 | | - @Deprecated |
168 | | - public static IntegerDeclaration createDeclaration(int len, boolean signed, int base, |
169 | | - @Nullable ByteOrder byteOrder, Encoding encoding, String clock, long alignment) { |
170 | | - if (encoding.equals(Encoding.NONE) && (clock.equals("")) && base == BASE_10 && byteOrder != null) { //$NON-NLS-1$ |
171 | | - if (alignment == BYTE_ALIGN) { |
172 | | - switch (len) { |
173 | | - case SIZE_8: |
174 | | - return signed ? INT_8_DECL : UINT_8_DECL; |
175 | | - case SIZE_16: |
176 | | - if (!signed) { |
177 | | - if (isBigEndian(byteOrder)) { |
178 | | - return UINT_16B_DECL; |
179 | | - } |
180 | | - return UINT_16L_DECL; |
181 | | - } |
182 | | - break; |
183 | | - case SIZE_32: |
184 | | - if (signed) { |
185 | | - if (isBigEndian(byteOrder)) { |
186 | | - return INT_32B_DECL; |
187 | | - } |
188 | | - return INT_32L_DECL; |
189 | | - } |
190 | | - if (isBigEndian(byteOrder)) { |
191 | | - return UINT_32B_DECL; |
192 | | - } |
193 | | - return UINT_32L_DECL; |
194 | | - case SIZE_64: |
195 | | - if (signed) { |
196 | | - if (isBigEndian(byteOrder)) { |
197 | | - return INT_64B_DECL; |
198 | | - } |
199 | | - return INT_64L_DECL; |
200 | | - } |
201 | | - if (isBigEndian(byteOrder)) { |
202 | | - return UINT_64B_DECL; |
203 | | - } |
204 | | - return UINT_64L_DECL; |
205 | | - |
206 | | - default: |
207 | | - |
208 | | - } |
209 | | - |
210 | | - } else if (alignment == 1) { |
211 | | - switch (len) { |
212 | | - case SIZE_5: |
213 | | - if (!signed) { |
214 | | - if (isBigEndian(byteOrder)) { |
215 | | - return UINT_5B_DECL; |
216 | | - } |
217 | | - return UINT_5L_DECL; |
218 | | - } |
219 | | - break; |
220 | | - case SIZE_27: |
221 | | - if (!signed) { |
222 | | - if (isBigEndian(byteOrder)) { |
223 | | - return UINT_27B_DECL; |
224 | | - } |
225 | | - return UINT_27L_DECL; |
226 | | - } |
227 | | - break; |
228 | | - default: |
229 | | - break; |
230 | | - } |
231 | | - } |
232 | | - } |
233 | | - return new IntegerDeclaration(len, signed, base, byteOrder, encoding, clock, alignment); |
234 | | - } |
235 | | - |
236 | 141 | /** |
237 | 142 | * Alternate create method for CTF2 integers which have roles |
238 | 143 | * |
|
0 commit comments