minijava.typecheck
Class IntArray

java.lang.Object
  extended by minijava.typecheck.Type
      extended by minijava.typecheck.IntArray
All Implemented Interfaces:
Binding

public class IntArray
extends Type

This class represents an integer array type.

Author:
Santoso Wijaya

Method Summary
 boolean agrees(Type rhs)
          Checks whether this Type "agrees" with the given argument.
static IntArray intArrayType()
           
 
Methods inherited from class minijava.typecheck.Type
equals, getTypeName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

intArrayType

public static IntArray intArrayType()

agrees

public boolean agrees(Type rhs)
Description copied from class: Type
Checks whether this Type "agrees" with the given argument. Two types are agreeable if they are equal primitives or, if they are class types, rhs is a subclass/subtype of this type.

Specified by:
agrees in class Type
Parameters:
rhs - the right hand side in the equivalence test
Returns:
true if type(this) == type(rhs), or ig type(this) == supertype(rhs), and false otherwise