gov.nasa.arc.brahms.vm.api.common
Interface IParameter


public interface IParameter

The IParameter interface is an interface to a parameter passed to a java activity allowing access to its value.

Version:
$Revision: 1.2 $ $Date: 2009/11/29 21:35:57 $ $Author: rnado $
Author:
Ron van Hoof

Field Summary
static int BOOLEAN
          The constant indicating the value is a boolean
static int BYTE
          The constant indicating the value is a byte
static int CHAR
          The constant indicating the value is a character
static int CONCEPT
          The constant indicating the value is a concept
static int DOUBLE
          The constant indicating the value is a double
static int FLOAT
          The constant indicating the value is a float
static int INT
          The constant indicating the value is an integer
static int JAVA_TYPE
          The constant indicating the value is a Java Object
static int LONG
          The constant indicating the value is a long
static int SHORT
          The constant indicating the value is an integer
static int STRING
          The constant indicating the value is a string
static int SYMBOL
          The constant indicating the value is a symbol
static int UNKNOWN
          The constant indicating the value is unknown
static int VARIABLE
          The constant indicating the value is a variable
 
Method Summary
 boolean getBooleanValue()
          Returns the boolean value
 byte getByteValue()
          Returns the byte value
 char getCharValue()
          Returns the character value
 IConcept getConceptValue()
          Returns the concept value, the value of a parameter can potentially be a class.
 int getContentType()
          Returns the content type of the parameter.
 double getDoubleValue()
          Returns the double value
 float getFloatValue()
          Returns the float value
 int getIntValue()
          Returns the integer value
 java.lang.Object getJavaObjectValue()
          Returns the Java Object value.
 java.io.Serializable getJavaValue()
          Deprecated. Use getJavaObjectValue instead
 long getLongValue()
          Returns the long value
 java.lang.String getName()
          Returns the name of the parameter.
 short getShortValue()
          Returns the short value
 java.lang.String getStringValue()
          Returns the string value.
 java.lang.String getSymbolValue()
          Returns the symbol value
 IType getType()
          Returns the type of the parameter.
 IUnknown getUnknownValue()
          Returns the 'unknown' value.
 java.lang.Object getValue()
          Generic method to return the parameter value as an object.
 IVariable getVariableValue()
          Returns the variable passed to the parameter.
 

Field Detail

INT

static final int INT
The constant indicating the value is an integer

See Also:
Constant Field Values

CHAR

static final int CHAR
The constant indicating the value is a character

See Also:
Constant Field Values

BYTE

static final int BYTE
The constant indicating the value is a byte

See Also:
Constant Field Values

SHORT

static final int SHORT
The constant indicating the value is an integer

See Also:
Constant Field Values

LONG

static final int LONG
The constant indicating the value is a long

See Also:
Constant Field Values

FLOAT

static final int FLOAT
The constant indicating the value is a float

See Also:
Constant Field Values

DOUBLE

static final int DOUBLE
The constant indicating the value is a double

See Also:
Constant Field Values

BOOLEAN

static final int BOOLEAN
The constant indicating the value is a boolean

See Also:
Constant Field Values

SYMBOL

static final int SYMBOL
The constant indicating the value is a symbol

See Also:
Constant Field Values

STRING

static final int STRING
The constant indicating the value is a string

See Also:
Constant Field Values

CONCEPT

static final int CONCEPT
The constant indicating the value is a concept

See Also:
Constant Field Values

JAVA_TYPE

static final int JAVA_TYPE
The constant indicating the value is a Java Object

See Also:
Constant Field Values

VARIABLE

static final int VARIABLE
The constant indicating the value is a variable

See Also:
Constant Field Values

UNKNOWN

static final int UNKNOWN
The constant indicating the value is unknown

See Also:
Constant Field Values
Method Detail

getName

java.lang.String getName()
                         throws ExternalException
Returns the name of the parameter.

Returns:
String the name of the parameter.
Throws:
ExternalException

getContentType

int getContentType()
                   throws ExternalException
Returns the content type of the parameter. The parameter value is not necessarily a primitive type or user defined type but can also be a variable referencing the actual value.

Returns:
int the concept type of the parameter
Throws:
ExternalException - if an internal error occurs
See Also:
INT, LONG, DOUBLE, BOOLEAN, SYMBOL, STRING, CONCEPT, JAVA_TYPE, VARIABLE, UNKNOWN

getType

IType getType()
              throws ExternalException
Returns the type of the parameter.

Returns:
IType the parameter's type.
Throws:
ExternalException - if an internal error occurs
See Also:
IType

getIntValue

int getIntValue()
                throws InvalidContentTypeException,
                       ExternalException
Returns the integer value

Returns:
int the integer value
Throws:
InvalidContentTypeException - if the parameter value is not an integer
ExternalException - if an internal error occurs

getCharValue

char getCharValue()
                  throws InvalidContentTypeException,
                         ExternalException
Returns the character value

Returns:
char the character value
Throws:
InvalidContentTypeException - if the parameter value is not a character
ExternalException - if an internal error occurs

getByteValue

byte getByteValue()
                  throws InvalidContentTypeException,
                         ExternalException
Returns the byte value

Returns:
byte the byte value
Throws:
InvalidContentTypeException - if the parameter value is not a byte
ExternalException - if an internal error occurs

getShortValue

short getShortValue()
                    throws InvalidContentTypeException,
                           ExternalException
Returns the short value

Returns:
short the short value
Throws:
InvalidContentTypeException - if the parameter value is not a short
ExternalException - if an internal error occurs

getLongValue

long getLongValue()
                  throws InvalidContentTypeException,
                         ExternalException
Returns the long value

Returns:
long the long value
Throws:
InvalidContentTypeException - if the parameter value is not a long
ExternalException - if an internal error occurs

getFloatValue

float getFloatValue()
                    throws InvalidContentTypeException,
                           ExternalException
Returns the float value

Returns:
float the float value
Throws:
InvalidContentTypeException - if the parameter value is not a float
ExternalException - if an internal error occurs

getDoubleValue

double getDoubleValue()
                      throws InvalidContentTypeException,
                             ExternalException
Returns the double value

Returns:
double the double value
Throws:
InvalidContentTypeException - if the parameter value is not a double
ExternalException - if an internal error occurs

getBooleanValue

boolean getBooleanValue()
                        throws InvalidContentTypeException,
                               ExternalException
Returns the boolean value

Returns:
boolean the boolean value
Throws:
InvalidContentTypeException - if the parameter value is not a boolean
ExternalException - if an internal error occurs

getSymbolValue

java.lang.String getSymbolValue()
                                throws InvalidContentTypeException,
                                       ExternalException
Returns the symbol value

Returns:
String the symbol value
Throws:
InvalidContentTypeException - if the parameter value is not a symbol
ExternalException - if an internal error occurs

getStringValue

java.lang.String getStringValue()
                                throws InvalidContentTypeException,
                                       ExternalException
Returns the string value.

Returns:
String the string value
Throws:
InvalidContentTypeException - if the parameter value is not a string
ExternalException - if an internal error occurs

getConceptValue

IConcept getConceptValue()
                         throws InvalidContentTypeException,
                                ExternalException
Returns the concept value, the value of a parameter can potentially be a class.

Returns:
IConcept the concept value
Throws:
InvalidContentTypeException - if the parameter value is not a concept
ExternalException - if an internal error occurs
See Also:
IConcept

getJavaValue

@Deprecated
java.io.Serializable getJavaValue()
                                  throws InvalidContentTypeException,
                                         ExternalException
Deprecated. Use getJavaObjectValue instead

Returns the Java Serializable value.

Returns:
Object the Java Serializable value
Throws:
InvalidContentTypeException - if the parameter's type is not a Java reference type implementing the Serializable interface
ExternalException - if an internal error occurs

getJavaObjectValue

java.lang.Object getJavaObjectValue()
                                    throws InvalidContentTypeException,
                                           ExternalException
Returns the Java Object value.

Returns:
Object the Java Object value
Throws:
InvalidContentTypeException - if the parameter's type is not a Java reference type
ExternalException - if an internal error occurs

getVariableValue

IVariable getVariableValue()
                           throws InvalidContentTypeException,
                                  ExternalException
Returns the variable passed to the parameter.

Returns:
IVariable the variable assigning the value
Throws:
InvalidContentTypeException - if the parameter value is not a variable
ExternalException - if an internal error occurs
See Also:
IVariable

getUnknownValue

IUnknown getUnknownValue()
                         throws InvalidContentTypeException,
                                ExternalException
Returns the 'unknown' value.

Returns:
IUnknown the 'unknown' value
Throws:
InvalidContentTypeException - if the parameter value is not 'unknown'
ExternalException - if an internal error occurs
See Also:
IUnknown.UNKNOWN

getValue

java.lang.Object getValue()
                          throws InvalidContentTypeException,
                                 ExternalException
Generic method to return the parameter value as an object. Values of primitive types are wrapped using their class representations.

Note that the use of getType and the method to retrieve a value using its specific type method is more efficient.

Returns:
Object the parameter value
Throws:
InvalidContentTypeException - if the parameter value does not match with the content type
ExternalException - if an internal error occurs


Copyright © 1997-2012 All Rights Reserved.