org.prorefactor.treeparser
Class Call

java.lang.Object
  extended by org.prorefactor.treeparser.SemanticRecord
      extended by org.prorefactor.treeparser.Call

public class Call
extends SemanticRecord

Represents a Call to some 4GL procedure. The target procedure is identified by the external and internal procedure names. The expecte values for externalName and internalName are as follows:

                                 externalName - internalName
 run  [in this-procedure]: compile-unit   
 run  in .       : handle:target  
 run  [persistent [...]. : compile-unit   null
 

Author:
pcd

Field Summary
 
Fields inherited from class org.prorefactor.treeparser.SemanticRecord
node
 
Constructor Summary
Call(JPNode node)
           
Call(java.lang.String externalName, java.lang.String internalName)
          Construct a call to an internal procedure in a specific containing procedure.
 
Method Summary
 void addParameter(Parameter p)
          Called by the tree parser.
 java.lang.String baseFilename(java.lang.String filename)
           
 boolean equals(java.lang.Object other)
          Equality definition: two calls are equal if their id()'s are equal -- i.e.
 java.lang.String getExternalName()
          Get the external procedure name to which this call refers.
 java.lang.String getInternalName()
          Get the internal procedure name, if any, to which this call refers.
 java.lang.String getLocalTarget()
           
 java.util.ArrayList<Parameter> getParameters()
           
 java.lang.String getRunArgument()
           
 java.lang.String id()
          The fully qualified routine name to which this call refers.
 boolean isInHandle()
           
 boolean isLocal()
           
 boolean isPersistent()
           
 void setPersistentHandleNode(JPNode node)
           
 void setPersistentHandleVar(Variable var)
          Set persistentHandleVar: the variable that will be used to refer to the persistent procedure instance created by this call - if any.
 void setRunArgument(java.lang.String f)
          Sets runArgument: the parameter in run , which may be an explicit string or a string expression, and which identifies either an external or an internal procedure.
 void setRunHandle(RunHandle handle)
           
 void setRunHandleNode(JPNode node)
           
 java.lang.String toString()
           
 void wrapUp(boolean definedInternal)
          Finish setting values for the Call.
 
Methods inherited from class org.prorefactor.treeparser.SemanticRecord
getColumn, getFilename, getLine
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Call

public Call(java.lang.String externalName,
            java.lang.String internalName)
Construct a call to an internal procedure in a specific containing procedure. The refererence is fully resolved.


Call

public Call(JPNode node)
Method Detail

addParameter

public void addParameter(Parameter p)
Called by the tree parser.


baseFilename

public java.lang.String baseFilename(java.lang.String filename)

equals

public boolean equals(java.lang.Object other)
Equality definition: two calls are equal if their id()'s are equal -- i.e. they refer to the same routine. Used in unit testing.

Overrides:
equals in class java.lang.Object

getExternalName

public java.lang.String getExternalName()
Get the external procedure name to which this call refers.


getInternalName

public java.lang.String getInternalName()
Get the internal procedure name, if any, to which this call refers.


getLocalTarget

public java.lang.String getLocalTarget()

getParameters

public java.util.ArrayList<Parameter> getParameters()

getRunArgument

public java.lang.String getRunArgument()

id

public java.lang.String id()
The fully qualified routine name to which this call refers. Built with externalName + "." + internalName. Not unique, obviously.


isLocal

public boolean isLocal()

isPersistent

public boolean isPersistent()

isInHandle

public boolean isInHandle()

setPersistentHandleNode

public void setPersistentHandleNode(JPNode node)

setPersistentHandleVar

public void setPersistentHandleVar(Variable var)
Set persistentHandleVar: the variable that will be used to refer to the persistent procedure instance created by this call - if any. Only used in connection with: run persistent set .

Parameters:
var -

setRunArgument

public void setRunArgument(java.lang.String f)
Sets runArgument: the parameter in run , which may be an explicit string or a string expression, and which identifies either an external or an internal procedure.


setRunHandle

public void setRunHandle(RunHandle handle)

setRunHandleNode

public void setRunHandleNode(JPNode node)

toString

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

wrapUp

public void wrapUp(boolean definedInternal)
            throws SemanticException
Finish setting values for the Call.

Throws:
SemanticException


Copyright © 2008 Joanju Software. All Rights Reserved.