com.cmpware.tools
Class AutoModel.Decode

java.lang.Object
  extended by com.cmpware.tools.AutoModel.Decode
Enclosing class:
AutoModel

public static final class AutoModel.Decode
extends java.lang.Object

The Decode class describes a field / value pair used to decode an instruction. Decode can use one or more such fields per instruction.


Field Summary
 long mask
          The decode mask
 long sig
          The decode signature
 
Constructor Summary
AutoModel.Decode(AutoModel.Field field, long value)
          Constructor
 
Method Summary
 AutoModel.Decode add(AutoModel.Field field, int value)
          This method returns a decoder with new values added.
static AutoModel.Decode primary(AutoModel.Field field, int value)
          This factory method returns a decoder with new values added.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mask

public long mask
The decode mask


sig

public long sig
The decode signature

Constructor Detail

AutoModel.Decode

public AutoModel.Decode(AutoModel.Field field,
                        long value)
Constructor

Parameters:
field - The field to be decoded.
value - the value of the decode field.
Method Detail

primary

public static AutoModel.Decode primary(AutoModel.Field field,
                                       int value)
This factory method returns a decoder with new values added. This permits a syntax like new Decode.primary(x,y).add(z,a) to be used for multi-level decode.

Parameters:
field - The field to be decoded.
value - the value of the decode field.
Returns:
a decoder is returned.

add

public AutoModel.Decode add(AutoModel.Field field,
                            int value)
This method returns a decoder with new values added. This permits a syntax like new Decode(x,y).add(z,a) to be used for multi-level decode.

Parameters:
field - The field to be decoded.
value - the value of the decode field.
Returns:
a decoder