gov.llnl.babel.symbols
Class Argument
- Attributes
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.
Argument(int mode, Type type, String name) - Create an argument object.
|
boolean | equals(Object object) - Return TRUE if the specified object is considered the same as this
object; otherwise, return FALSE.
|
void | freeze()
|
static String[] | getAllowableModes()
|
String | getArgumentString() - Return a string representation of the argument for outputting the
arguments in a method signature, for example.
|
String | getArgumentString(String abbrev_pkg) - Return a string representation of the argument for outputting the
arguments in a method signature, for example.
|
String | getAttribute(String key)
|
Set | getAttributes()
|
Comment | getComment() - Return the comment for the method.
|
String | getFormalName() - Return the formal name of the parameter identifier.
|
int | getMode() - Return the value of the argument parameter passing mode.
|
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.
|
boolean | hasAttribute(String key)
|
int | hashCode()
|
boolean | isCopy() - Return TRUE if the copy flag has been set for this method argument;
otherwise, return FALSE.
|
void | removeAttribute(String key)
|
void | setAttribute(String key)
|
void | setAttribute(String key, String value)
|
void | setComment(Comment comment) - Set the comment for the method.
|
IN
public static final int IN
INOUT
public static final int INOUT
OUT
public static final int OUT
Argument
public Argument(int mode,
Type type,
String name)
Create an argument object.
mode
- The parameter passing mode (IN, OUT, or INOUT).type
- The SIDL type of the argument.name
- The formal parameter name.
equals
public boolean equals(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.
object
- The object being used for comparison.
getAllowableModes
public static String[] getAllowableModes()
getArgumentString
public String getArgumentString()
Return a string representation of the argument for outputting the
arguments in a method signature, for example.
getArgumentString
public String getArgumentString(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.
getComment
public Comment getComment()
Return the comment for the method. This may be null if there is no
comment.
getFormalName
public String getFormalName()
Return the formal name of the parameter identifier.
getMode
public int getMode()
Return the value of the argument parameter passing mode.
getModeString
public final String getModeString()
Return a string representing the argument mode.
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.
hashCode
public int hashCode()
isCopy
public boolean isCopy()
Return TRUE if the copy flag has been set for this method argument;
otherwise, return FALSE.
setComment
public void setComment(Comment comment)
Set the comment for the method.
comment
- The comment associated with the method. May be null.