FileDocCategorySizeDatePackage
Types.javaAPI DocAndroid 5.1 API3226Thu Mar 12 22:18:30 GMT 2015com.android.hit

Types

public class Types extends Object

Fields Summary
private static int
mIdSize
public static final int
OBJECT
public static final int
BOOLEAN
public static final int
CHAR
public static final int
FLOAT
public static final int
DOUBLE
public static final int
BYTE
public static final int
SHORT
public static final int
INT
public static final int
LONG
Constructors Summary
Methods Summary
public static final java.lang.StringgetTypeName(int type)

        switch (type) {
            case '[":      return "array";
            case 'L":      return "object";
            case 'Z":      return "boolean";
            case 'C":      return "char";
            case 'F":      return "float";
            case 'D":      return "double";
            case 'B":      return "byte";
            case 'S":      return "short";
            case 'I":      return "int";
            case 'J":      return "long";

            case OBJECT:   return "object";
            case BOOLEAN:  return "boolean";
            case CHAR:     return "char";
            case FLOAT:    return "float";
            case DOUBLE:   return "double";
            case BYTE:     return "byte";
            case SHORT:    return "short";
            case INT:      return "int";
            case LONG:     return "long";
        }

        throw new IllegalArgumentException("Illegal type signature: " + type);
    
public static final intgetTypeSize(int type)

        switch (type) {
            case '[":      return mIdSize; //  array object
            case 'L":      return mIdSize; //  object
            case 'Z":      return 1;       //  boolean
            case 'C":      return 2;       //  char
            case 'F":      return 4;       //  float
            case 'D":      return 8;       //  double
            case 'B":      return 1;       //  byte
            case 'S":      return 2;       //  short
            case 'I":      return 4;       //  int
            case 'J":      return 8;       //  long

            case OBJECT:   return mIdSize;
            case BOOLEAN:  return 1;
            case CHAR:     return 2;
            case FLOAT:    return 4;
            case DOUBLE:   return 8;
            case BYTE:     return 1;
            case SHORT:    return 2;
            case INT:      return 4;
            case LONG:     return 8;
        }

        throw new IllegalArgumentException("Illegal type signature: " + type);
    
public static final voidsetIdSize(int size)


          
        mIdSize = size;