FileDocCategorySizeDatePackage
BasicType.javaAPI DocJava SE 6 API4148Tue Jun 10 00:22:18 BST 2008com.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.2.1 2005/07/31 23:45:21 jeffsuttor 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);
    }