gov.nasa.arc.brahms.common.data
Class Expression

java.lang.Object
  extended by gov.nasa.arc.brahms.common.data.BrahmsObject
      extended by gov.nasa.arc.brahms.common.data.Expression
All Implemented Interfaces:
IExpression, gov.nasa.arc.brahms.common.IConstants, java.io.Serializable
Direct Known Subclasses:
VMExpression

public class Expression
extends BrahmsObject
implements IExpression

class Expression

Version:
$Revision: 1.2 $ $Date: 2009/11/23 19:08:56 $ $Author: rnado $
Author:
Ron van Hoof
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface gov.nasa.arc.brahms.common.IConstants
ABORT, ACTIVECLASS, ACTIVECONCEPT, ACTIVEINSTANCE, AGENT, ANONYMOUS, ANYAGENT, AREA, AREADEF, ASSIGNED, ATTRIBUTE, BASEAREADEF, BASECLASS, BASECONCEPTUALCLASS, BASEGROUP, BASELIBRARY, BOOLEAN, BROADCAST, BUILDING, BYTE, CCLOCK, CDATE, CHAR, CITY, CLASS, CLOCK, COLLECTALL, COMMUNICATE, COMPLETE, COMPOSITE, COMPUTER, CONCEPT, CONCEPTUALCLASS, CONCEPTUALCONCEPT, CONCEPTUALOBJECT, CONTINUE, COPY, CREATEAGENT, CREATEAREA, CREATEOBJECT, current, CURRENT, DATAFRAME, DATE, DB, DETECTABLE, DIV, DOUBLE, EMAIL, EMPTY_STRING, END, ENDACTIVITY, ENTAGENT, EQ, EXCEPTION, EXPR, FACE2FACE, FACTFRAME, FALSE, FAX, FLOAT, FOREACH, FORONE, G2, GE, GEOGRAPHYCONCEPT, GESTURE, GET, GROUP, GT, IMPASSE, INT, INVALID, JAVA, JAVA_TYPE, KNOWN_MODIFIER, KNOWNVAL_MODIFIER, LE, LOCAL, LONG, LT, MAP, MINUS, MOD, MOVE, MULT, NE, NEW, NONE, NOT_MODIFIER, NOWORK, O, OA, OBJECT, ONTOLOGY, PAGER, PARAMETER, PATH, PHONE, PLUS, PRIMITIVE, PRIVATE, PROAGENT, PROTECTED, PRSAGENT, PUBLIC, PUT, RECEIVE, RELATION, sACTIVECLASS, sACTIVECONCEPT, sACTIVEINSTANCE, sAGENT, sARCHIVE, sAREA, sAREADEF, sBOOLEAN, sBYTE, sBYTECODEEXT, sCHAR, sCLASS, sCOMPUTER, sCONCEPT, sCONCEPTUALCLASS, sCONCEPTUALCONCEPT, sCONCEPTUALOBJECT, sCOPY, sCURRENT, sDETECTABLE, sDOUBLE, sEMAIL, sEND, SEND, sFACE2FACE, sFAX, sFILEEXT, sFLOAT, sGEOGRAPHYCONCEPT, sGROUP, SHORT, SIMAGENT, sINT, sJAVA_TYPE, sLONG, sMAP, sNEW, sNONE, sNOWORK, sOBJECT, SOURCECODE, sPAGER, sPARAMETER, sPATH, sPHONE, sPRIVATE, sPROJECTEXT, sPROTECTED, sPUBLIC, sSHORT, sSTART, sSTRING, sSYMBOL, START, STRING, sUNKNOWN, sVOID, SYMBOL, TRUE, UDT, UML, UNASSIGNED, UNDEFINED, unknown, UNKNOWN, UNKNOWN_MODIFIER, V, VARIABLE, VOID, WHENEVER, WORKFRAME, WORLD, XML
 
Constructor Summary
Expression()
           
Expression(Operand lhs)
           
Expression(Operand lhs, int operator, Operand rhs)
           
 
Method Summary
 Type getCollectType()
          Returns the Brahms type of the expression when it contains one or more collectall variables and the values of the expression should be accumulated in a list before assigning to a variable or passing the result to a Java method, constructor, or array initializer.
 Operand getLhs()
           
 int getOperator()
           
 void getParameters(java.util.LinkedList ll)
          Returns a list of all the parameters used in the expression.
 Operand getRhs()
           
 void getVariables(java.util.LinkedList ll)
          Returns a list of all the variables used in the expression.
 void setCollectType(Type type)
          Sets the Brahms type when this expression contains one or more collectall variables and the values of the expression should be accumulated in a list before assigning to a variable or passing the result to a Java method, constructor, or array initializer.
protected  void setID()
          Sets the unique identifier.
 void setLhs(Operand lhs)
           
 void setOperator(int op)
           
 void setRhs(Operand rhs)
           
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.arc.brahms.common.data.BrahmsObject
delete, export, getFile, getID, getLine, getSerialNumber, isBCC, isDynamic, isLoaded, isResolved, setBCC, setDynamic, setFile, setID, setLine, setLoaded, setResolved, setSerialNumber
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.nasa.arc.brahms.common.data.IExpression
export
 

Constructor Detail

Expression

public Expression()

Expression

public Expression(Operand lhs)

Expression

public Expression(Operand lhs,
                  int operator,
                  Operand rhs)
Method Detail

setID

protected void setID()
Sets the unique identifier.

Overrides:
setID in class BrahmsObject

setLhs

public void setLhs(Operand lhs)

getLhs

public Operand getLhs()

setOperator

public void setOperator(int op)

getOperator

public int getOperator()

setRhs

public void setRhs(Operand rhs)

getRhs

public Operand getRhs()

setCollectType

public void setCollectType(Type type)
Sets the Brahms type when this expression contains one or more collectall variables and the values of the expression should be accumulated in a list before assigning to a variable or passing the result to a Java method, constructor, or array initializer.

Specified by:
setCollectType in interface IExpression
Parameters:
type - the Brahms type for the expression

getCollectType

public Type getCollectType()
Returns the Brahms type of the expression when it contains one or more collectall variables and the values of the expression should be accumulated in a list before assigning to a variable or passing the result to a Java method, constructor, or array initializer.

Specified by:
getCollectType in interface IExpression
Returns:
Type the Brahms type for the expression

getVariables

public void getVariables(java.util.LinkedList ll)
Returns a list of all the variables used in the expression. Returns an empty list if no variables are used.

Specified by:
getVariables in interface IExpression
Parameters:
ll - the LinkedList to which to add the variables used in the expression.

getParameters

public void getParameters(java.util.LinkedList ll)
Returns a list of all the parameters used in the expression. Returns an empty list if no parameters are used.

Specified by:
getParameters in interface IExpression
Parameters:
ll - the LinkedList to which to add the parameters used in the expression.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 1997-2012 All Rights Reserved.