com.steptools.stdev
Class SelectionBase

java.lang.Object
  extended by com.steptools.stdev.SelectionBase

public abstract class SelectionBase
extends java.lang.Object

Represents one of the possible types of an EXPRESS SELECT type. This class serves as both an enumeration identfying the type of an EXPRESS select, and also as the accessor to manipulate instances of that type.

In the generated EXPRESS classes, there is one instance of SelectionBase for each underlying type of the SELECT. Each class that represents a SELECT contains a nested class named Selection which is a subtype of this class. The class defines a static final member of type Selection for each choice.


Method Summary
 java.lang.String[] getPath()
          Get the type path for this selection
 java.lang.Object getValue(Select inst)
          Retreive the value from a Select that matches this selection.
 Select newInstance(java.lang.Object value)
          Creates a Select of the type identified by this Selection
 Domain slotDomain()
          Get the underlying domain for this selection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getPath

public java.lang.String[] getPath()
Get the type path for this selection


slotDomain

public Domain slotDomain()
                  throws SchemaStructureException
Get the underlying domain for this selection

Throws:
SchemaStructureException - Malformes schema classes

getValue

public java.lang.Object getValue(Select inst)
                          throws SchemaStructureException,
                                 SelectTypeException
Retreive the value from a Select that matches this selection. This is a late-bound accessor function. The preferred way for early-bound application to get the value is to call the getType method on the Select instance.

Parameters:
inst - The SELECT instance to get the value from.
Returns:
The requested value. If is is an double or int it will be wrapped in a java.lang.Double or java.lang.Integer wrapper class.
Throws:
SchemaStructureException - Malformed schema classes.
SelectTypeException - The select of not of the type identified by this selection.

newInstance

public Select newInstance(java.lang.Object value)
                   throws SchemaStructureException,
                          TypeException
Creates a Select of the type identified by this Selection

Parameters:
value - The value the select is to have. If this in an int or double, it must be wrapped in a java.lang.Integer, or java.lang.Double wrapper.
Returns:
The new select
Throws:
SchemaStructureException
TypeException