|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.data.BrahmsObject gov.nasa.arc.brahms.common.data.ArrayAccess
public class ArrayAccess
An ArrayAccess represents a Java array access expression that specifies one or more index expressions that evaluate to the indices to be used to access or set elements of the array, e.g. array[3][4]. An array access can be used on the left-hand side of an assignment or as a right-hand side expression. The reference to the array itself must be a Brahms variable or parameter.
Field Summary | |
---|---|
static org.apache.log4j.Logger |
LOGGER
The logger used to log messages |
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 | |
---|---|
ArrayAccess()
Constructor, creates a new empty ArrayAccess |
|
ArrayAccess(Operand arrayRef,
java.lang.String file,
int line)
Constructor, creates a new ArrayAccess for an array access whose array is referenced by an Operand for a variable or parameter and that occurs in the given source file at the given line number. |
|
ArrayAccess(java.lang.String file,
int line)
Constructor, creates a new empty ArrayAccess specified in the given file at the given line number. |
Method Summary | |
---|---|
boolean |
addIndexExpression(IExpression exp)
Adds the specified IExpression to the list of index expressions specified for this array access. |
Operand |
getArrayReference()
Returns the Operand for the variable or parameter that will reference the array |
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. |
java.util.List<IExpression> |
getIndexExpressions()
Returns a list of all the index expressions specified for this array access. |
void |
getParameters(java.util.LinkedList ll)
Adds to a supplied list all the parameters used in the expression. |
void |
getVariables(java.util.LinkedList ll)
Adds to a supplied list all the variables used in the expression. |
void |
setArrayReference(Operand ref)
Sets the Operand for the variable or parameter that will reference the array |
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. |
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, setID, setLine, setLoaded, setResolved, setSerialNumber |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface gov.nasa.arc.brahms.common.data.IAssignmentLhs |
---|
export |
Methods inherited from interface gov.nasa.arc.brahms.common.data.IExpression |
---|
export |
Field Detail |
---|
public static final org.apache.log4j.Logger LOGGER
Constructor Detail |
---|
public ArrayAccess()
public ArrayAccess(java.lang.String file, int line)
file
- the file in which the array creation expression is specifiedline
- the line number in the file at which the array creation expression
is specifiedpublic ArrayAccess(Operand arrayRef, java.lang.String file, int line)
arrayRef
- an Operand for a Brahms variable or parameterfile
- the file in which the array creation expression is specifiedline
- the line number in the file at which the array creation expression
is specifiedMethod Detail |
---|
public void setArrayReference(Operand ref)
ref
- the Operand referencing the arraypublic Operand getArrayReference()
public boolean addIndexExpression(IExpression exp)
exp
- the index IExpression to be added
IExpression
public java.util.List<IExpression> getIndexExpressions()
IExpression
public void setCollectType(Type type)
setCollectType
in interface IExpression
type
- the Brahms type for the expressionpublic Type getCollectType()
getCollectType
in interface IExpression
public void getVariables(java.util.LinkedList ll)
getVariables
in interface IExpression
ll
- the LinkedList to which to add the variables used in the expression.public void getParameters(java.util.LinkedList ll)
getParameters
in interface IExpression
ll
- the LinkedList to which to add the parameters used in the operand.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |