FileDocCategorySizeDatePackage
BasicType.javaAPI DocJava SE 5 API4145Fri Aug 26 14:55:18 BST 2005com.sun.org.apache.bcel.internal.generic

BasicType

public final class BasicType extends Type
Denotes basic type such as int.
version
$Id: BasicType.java,v 1.1.1.1 2001/10/29 20:00:06 jvanzyl Exp $
author
M. Dahm

Fields Summary
Constructors Summary
BasicType(byte type)
Constructor for basic types such as int, long, `void'

param
type one of T_INT, T_BOOLEAN, ..., T_VOID
see
com.sun.org.apache.bcel.internal.Constants

    super(type, Constants.SHORT_TYPE_NAMES[type]);

    if((type < Constants.T_BOOLEAN) || (type > Constants.T_VOID))
      throw new ClassGenException("Invalid type: " + type);
  
Methods Summary
public booleanequals(java.lang.Object type)

return
true if both type objects refer to the same type

    return (type instanceof BasicType)?
      ((BasicType)type).type == this.type : false;
  
public static final com.sun.org.apache.bcel.internal.generic.BasicTypegetType(byte type)

    switch(type) {
    case Constants.T_VOID:    return VOID;
    case Constants.T_BOOLEAN: return BOOLEAN;
    case Constants.T_BYTE:    return BYTE;
    case Constants.T_SHORT:   return SHORT;
    case Constants.T_CHAR:    return CHAR;
    case Constants.T_INT:     return INT;
    case Constants.T_LONG:    return LONG;
    case Constants.T_DOUBLE:  return DOUBLE;
    case Constants.T_FLOAT:   return FLOAT;

    default:
      throw new ClassGenException("Invalid type: " + type);
    }