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

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

public class ConstructorInvocation
extends Invocation

A ConstructorInvocation is a Java class instance creation expression. It should appear on the right-hand side of an assignment statement in the body of a workframe.

Version:
$Revision: 1.1 $ $Date: 2009/11/23 18:28:40 $ $Author: rnado $
Author:
Bob Nado
See Also:
Serialized Form

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
ConstructorInvocation()
          Constructor, creates a new empty Java constructor invocation
ConstructorInvocation(JavaType type, java.lang.String file, int line)
          Constructor, creates a new ConstructorInvocation with a specified JavaType instance representing the Java class to be instantiated and the source file and line number containing the constructor invocation
ConstructorInvocation(java.lang.String file, int line)
          Constructor, creates a new Java constructor invocation specified in the given file at the given line number.
 
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.
 java.lang.String getDescriptor()
          Returns the descriptor for the constructor being referenced.
 JavaType getJavaType()
          Returns the JavaType instance representing the class of Java object to be constructed
 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.
 void setDescriptor(java.lang.String descriptor)
          Sets the constructor descriptor for the constructor being referenced.
protected  void setID()
          Sets the unique identifier.
 void setJavaType(JavaType type)
          Sets the the JavaType instance representing the class of Java object to be constructed
 java.lang.String toString()
          Returns the source code representation for this Constructor invocation.
 
Methods inherited from class gov.nasa.arc.brahms.common.data.Invocation
addArgument, getArgumentNumber, getArguments, getBrahmsParameterTypes, getOwner, getParameterNumber, getParameters, getParameterTypes, getVariables, hasArguments, isVarArgs, parseParameterTypes, setBrahmsParameterTypes, setOwner, setParameterTypes, setVarArgs
 
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
 

Field Detail

LOGGER

public static final org.apache.log4j.Logger LOGGER
The logger used to log messages

Constructor Detail

ConstructorInvocation

public ConstructorInvocation()
Constructor, creates a new empty Java constructor invocation


ConstructorInvocation

public ConstructorInvocation(java.lang.String file,
                             int line)
Constructor, creates a new Java constructor invocation specified in the given file at the given line number.

Parameters:
file - the file in which the Java constructor invocation is specified
line - the line number in the file at which the Java constructor invocation is specified

ConstructorInvocation

public ConstructorInvocation(JavaType type,
                             java.lang.String file,
                             int line)
Constructor, creates a new ConstructorInvocation with a specified JavaType instance representing the Java class to be instantiated and the source file and line number containing the constructor invocation

Parameters:
type - the JavaType representing the Java class that has the constructor
file - the file in which the Java constructor invocation is specified
line - the line number in the file at which the Java constructor invocation is specified
Method Detail

setID

protected void setID()
Sets the unique identifier.

Overrides:
setID in class BrahmsObject

setDescriptor

public void setDescriptor(java.lang.String descriptor)
Sets the constructor descriptor for the constructor being referenced.

Parameters:
descriptor - the constructor descriptor

getDescriptor

public java.lang.String getDescriptor()
Returns the descriptor for the constructor being referenced.

Returns:
String the descriptor for the constructor being referenced

getJavaType

public JavaType getJavaType()
Returns the JavaType instance representing the class of Java object to be constructed

Returns:
JavaType the type of the object to be constructed

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.

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.

Returns:
Type the Brahms type for the expression

setJavaType

public void setJavaType(JavaType type)
Sets the the JavaType instance representing the class of Java object to be constructed

Parameters:
type - the JavaType for the class whose constructor will be invoked

toString

public java.lang.String toString()
Returns the source code representation for this Constructor invocation.

Overrides:
toString in class java.lang.Object
Returns:
String the source code representation


Copyright © 1997-2012 All Rights Reserved.