|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.princeton.toy.lang.TExceptionType
public class TExceptionType
TExceptionType describes the types of TException that can be thrown. Like TWords, instances of TExceptionType are immutable and are to be reused.
| Field Summary | |
|---|---|
static TExceptionType |
COMMAND_UNINITIALIZED
The type of exception that occurs when the fetch-execute loop attempts to execute the command in an uninitialized memory sector. |
static String[] |
FAMILIES
A string array containing the names of the families. |
static TExceptionType |
MEM_OUT_OF_BOUNDS
The type of exception that occurs when an operator attempts to access a memory sector that is not between 0000 and 00FF. |
static TExceptionType |
MEMORY_UNINITIALIZED
The type of exception that occurs when the value of an uninitialized memory sector is accessed by an operation. |
static int |
OUT_OF_BOUNDS_FAMILY
The identifier of the the family of overflow TExceptionTypes. |
static TExceptionType |
OVERFLOW
The type of exception that occurs when the result of the operation is not representable as a 16-bit two's complement signed integers. |
static int |
OVERFLOW_FAMILY
The identifier of the the family of overflow TExceptionTypes. |
static TExceptionType |
PC_OUT_OF_BOUNDS
The type of exception that occurs when the program counter exceeds FF. |
static TExceptionType |
REGISTER_OUT_OF_BOUNDS
The type of exception that occurs when an operator attempts to access a register that is not valid (attempting to assign a value to R[0]). |
static TExceptionType |
REGISTER_UNINITIALIZED
The type of exception that occurs when the value of an uninitialized register is accessed by an operation. |
static TExceptionType |
SHIFT_OUT_OF_BOUNDS
The type of exception that occurs when a shift operation is commanded to shift further than 000F positions. |
static TExceptionType[] |
TYPES
An array of all the TExceptionTypes, in order of hash-code. |
static int |
UNINITIALIZED_FAMILY
The identifier of the the family of uninitialized TExceptionTypes. |
| Method Summary | |
|---|---|
String |
getDescription()
Returns the description of this TExceptionType. |
int |
getFamily()
Returns the family of this TExceptionType. |
String |
getName()
Returns the name of this TExceptionType. |
int |
hashCode()
Returns the hash-code of this TExceptionType. |
String |
toString()
Returns the name of this TExceptionType. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String[] FAMILIES
public static final int UNINITIALIZED_FAMILY
REGISTER_UNINITIALIZED,
MEMORY_UNINITIALIZED,
COMMAND_UNINITIALIZED,
Constant Field Valuespublic static final int OVERFLOW_FAMILY
OVERFLOW,
Constant Field Valuespublic static final int OUT_OF_BOUNDS_FAMILY
SHIFT_OUT_OF_BOUNDS,
PC_OUT_OF_BOUNDS,
REGISTER_OUT_OF_BOUNDS,
MEM_OUT_OF_BOUNDS,
Constant Field Valuespublic static final TExceptionType REGISTER_UNINITIALIZED
public static final TExceptionType MEMORY_UNINITIALIZED
public static final TExceptionType COMMAND_UNINITIALIZED
public static final TExceptionType OVERFLOW
public static final TExceptionType SHIFT_OUT_OF_BOUNDS
public static final TExceptionType PC_OUT_OF_BOUNDS
public static final TExceptionType REGISTER_OUT_OF_BOUNDS
public static final TExceptionType MEM_OUT_OF_BOUNDS
public static final TExceptionType[] TYPES
| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic String getName()
public int getFamily()
public String getDescription()
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||