1 package nom.tam.util;
\r
3 /** This interface collects some information about Java primitives.
\r
5 public interface PrimitiveInfo {
\r
7 /** Suffixes used for the classnames for primitive arrays. */
\r
8 char[] suffixes = new char[]{'B', 'S', 'C', 'I', 'J', 'F', 'D', 'Z'};
\r
9 /** Classes of the primitives. These should be in windening order
\r
10 * (char is as always a problem).
\r
12 Class[] classes = new Class[]{
\r
13 byte.class, short.class, char.class, int.class,
\r
14 long.class, float.class, double.class, boolean.class};
\r
15 /** Is this a numeric class */
\r
16 boolean[] isNumeric = new boolean[]{true, true, true, true, true, true, true, false};
\r
18 String[] types = new String[]{
\r
19 "byte", "short", "char", "int",
\r
20 "long", "float", "double", "boolean"
\r
23 int[] sizes = new int[]{1, 2, 2, 4, 8, 4, 8, 1};
\r
24 /** Index of first element of above arrays referring to a numeric type */
\r
25 int FIRST_NUMERIC = 0;
\r
26 /** Index of last element of above arrays referring to a numeric type */
\r
27 int LAST_NUMERIC = 6;
\r
29 int SHORT_INDEX = 1;
\r
33 int FLOAT_INDEX = 5;
\r
34 int DOUBLE_INDEX = 6;
\r
35 int BOOLEAN_INDEX = 7;
\r