gov.llnl.babel.symbols
Class Argument

java.lang.Object
  extended bygov.llnl.babel.symbols.ASTNode
      extended bygov.llnl.babel.symbols.Argument

public class Argument
extends ASTNode

The Argument class defines a SIDL argument, which consists of a parameter passing mode (IN, INOUT, or OUT with an optional COPY), a type, and a formal parameter name.


Field Summary
static int IN
           
static int INOUT
           
static int OUT
           
 
Constructor Summary
Argument(boolean copy, int mode, Type type, java.lang.String name)
          Create an argument object.
 
Method Summary
 boolean equals(java.lang.Object object)
          Return TRUE if the specified object is considered the same as this object; otherwise, return FALSE.
 java.lang.String getArgumentString()
          Return a string representation of the argument for outputting the arguments in a method signature, for example.
 java.lang.String getArgumentString(java.lang.String abbrev_pkg)
          Return a string representation of the argument for outputting the arguments in a method signature, for example.
 java.lang.String getFormalName()
          Return the formal name of the parameter identifier.
 int getMode()
          Return the value of the argument parameter passing mode.
 java.lang.String getModeString()
          Return a string representing the argument mode.
 Type getType()
          Return the type of the argument.
 boolean hasArrayOrderSpec()
          Return TRUE if the type of this argument is an array with an with an ordering specification.
 int hashCode()
           
 boolean isCopy()
          Return TRUE if the copy flag has been set for this method argument; otherwise, return FALSE.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IN

public static final int IN
See Also:
Constant Field Values

INOUT

public static final int INOUT
See Also:
Constant Field Values

OUT

public static final int OUT
See Also:
Constant Field Values
Constructor Detail

Argument

public Argument(boolean copy,
                int mode,
                Type type,
                java.lang.String name)
Create an argument object.

Parameters:
copy - The copy flag.
mode - The parameter passing mode (IN, OUT, or INOUT).
type - The SIDL type of the argument.
name - The formal parameter name.
Method Detail

isCopy

public boolean isCopy()
Return TRUE if the copy flag has been set for this method argument; otherwise, return FALSE.


getMode

public int getMode()
Return the value of the argument parameter passing mode.


getModeString

public final java.lang.String getModeString()
Return a string representing the argument mode.


getFormalName

public java.lang.String getFormalName()
Return the formal name of the parameter identifier.


getType

public Type getType()
Return the type of the argument.


hasArrayOrderSpec

public boolean hasArrayOrderSpec()
Return TRUE if the type of this argument is an array with an with an ordering specification. For example, in array<int, 2, column-major> x would return TRUE. out array<int, 2> x would return FALSE because it does not have an ordering specification. Non-array arguments return FALSE.


getArgumentString

public java.lang.String getArgumentString(java.lang.String abbrev_pkg)
Return a string representation of the argument for outputting the arguments in a method signature, for example. Optionally abbreviate the type if it is declared in the specified package.


getArgumentString

public java.lang.String getArgumentString()
Return a string representation of the argument for outputting the arguments in a method signature, for example.


hashCode

public int hashCode()

equals

public boolean equals(java.lang.Object object)
Return TRUE if the specified object is considered the same as this object; otherwise, return FALSE. Note that the formal name does not need to match for equality.

Parameters:
object - The object being used for comparison.