public static Type classnameToType(@BinaryName String classname) {

    classname = classname.intern();

    if (classname == "int") { // interned
      return Type.INT;
    } else if (classname == "boolean") { // interned
      return Type.BOOLEAN;
    } else if (classname == "byte") { // interned
      return Type.BYTE;
    } else if (classname == "char") { // interned
      return Type.CHAR;
    } else if (classname == "double") { // interned
      return Type.DOUBLE;
    } else if (classname == "float") { // interned
      return Type.FLOAT;
    } else if (classname == "long") { // interned
      return Type.LONG;
    } else if (classname == "short") { // interned
      return Type.SHORT;
    } else { // must be a non-primitive
      return new ObjectType(classname);
    }
  }
public static Type classnameToType(@BinaryName String classname) {

    classname = classname.intern();

    if (classname == "int") { 
      return Type.INT;
    } else if (classname == "boolean") { 
      return Type.BOOLEAN;
    } else if (classname == "byte") { 
      return Type.BYTE;
    } else if (classname == "char") { 
      return Type.CHAR;
    } else if (classname == "double") { 
      return Type.DOUBLE;
    } else if (classname == "float") { 
      return Type.FLOAT;
    } else if (classname == "long") { 
      return Type.LONG;
    } else if (classname == "short") { 
      return Type.SHORT;
    } else { 
      return new ObjectType(classname);
    }
  }
public static Type classnameToType ( @ BinaryName String classname ) { classname = classname . intern ( ) ; if ( classname == "int" ) { // interned return Type . INT ; } else if ( classname == "boolean" ) { // interned return Type . BOOLEAN ; } else if ( classname == "byte" ) { // interned return Type . BYTE ; } else if ( classname == "char" ) { // interned return Type . CHAR ; } else if ( classname == "double" ) { // interned return Type . DOUBLE ; } else if ( classname == "float" ) { // interned return Type . FLOAT ; } else if ( classname == "long" ) { // interned return Type . LONG ; } else if ( classname == "short" ) { // interned return Type . SHORT ; } else { // must be a non-primitive return new ObjectType ( classname ) ; } }
Return the type corresponding to a given class name.

@param classname the binary name of a class (= fully-qualified name, except for inner classes)
@return the type corresponding to the given class name
Return the type corresponding to a given class name .