src/main/java/org/plumelib/bcelutil/BcelUtil.java
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") { // 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" ) { // 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 .