edu.princeton.toy.lang
public class TExceptionType extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static TExceptionType |
COMMAND_UNINITIALIZED
The type of exception that occurs when the fetch-execute loop attempts to execute the command
in an uninitialized memory memory.
|
static java.lang.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 memory that is
not between 0000 and 00FF.
|
static TExceptionType |
MEMORY_UNINITIALIZED
The type of exception that occurs when the value of an uninitialized memory memory
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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription()
Returns the description of this TExceptionType.
|
int |
getFamily()
Returns the family of this TExceptionType.
|
java.lang.String |
getName()
Returns the name of this TExceptionType.
|
int |
hashCode()
Returns the hash-code of this TExceptionType.
|
java.lang.String |
toString()
Returns the name of this TExceptionType.
|
public static final java.lang.String[] FAMILIES
public static final int UNINITIALIZED_FAMILY
public static final int OVERFLOW_FAMILY
OVERFLOW
,
Constant Field Valuespublic static final int OUT_OF_BOUNDS_FAMILY
public 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
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getName()
public int getFamily()
public java.lang.String getDescription()
public java.lang.String toString()
toString
in class java.lang.Object