|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.llnl.babel.symbols.ASTNode
gov.llnl.babel.symbols.Argument
public class Argument
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
|
Fields inherited from class gov.llnl.babel.symbols.ASTNode |
---|
d_frozen |
Constructor Summary | |
---|---|
Argument(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. |
void |
freeze()
|
static java.lang.String[] |
getAllowableModes()
|
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 |
getAttribute(java.lang.String key)
|
java.util.Set |
getAttributes()
|
Comment |
getComment()
Return the comment for the method. |
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. |
boolean |
hasAttribute(java.lang.String key)
|
int |
hashCode()
|
boolean |
isCopy()
Return TRUE if the copy flag has been set for this method argument; otherwise, return FALSE. |
void |
removeAttribute(java.lang.String key)
|
void |
setAttribute(java.lang.String key)
|
void |
setAttribute(java.lang.String key,
java.lang.String value)
|
void |
setComment(Comment comment)
Set the comment for the method. |
boolean |
similar(Argument arg)
This method returns true if two arguments map are similar enough to cause a problem for overloaded functions. |
Methods inherited from class gov.llnl.babel.symbols.ASTNode |
---|
checkFrozen, clone, protectCollection, protectList, protectMap, protectSet |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int IN
public static final int INOUT
public static final int OUT
Constructor Detail |
---|
public Argument(int mode, Type type, java.lang.String name)
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 |
---|
public boolean isCopy()
public int getMode()
public static java.lang.String[] getAllowableModes()
public final java.lang.String getModeString()
public java.lang.String getFormalName()
public Type getType()
public boolean hasArrayOrderSpec()
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.
public java.lang.String getArgumentString(java.lang.String abbrev_pkg)
public java.lang.String getArgumentString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object being used for comparison.public boolean similar(Argument arg)
public void setComment(Comment comment)
comment
- The comment associated with the method. May be null.public Comment getComment()
public boolean hasAttribute(java.lang.String key)
hasAttribute
in interface Attributes
public java.lang.String getAttribute(java.lang.String key) throws UnknownAttributeException
getAttribute
in interface Attributes
UnknownAttributeException
public void setAttribute(java.lang.String key)
setAttribute
in interface Attributes
public void setAttribute(java.lang.String key, java.lang.String value)
setAttribute
in interface Attributes
public void removeAttribute(java.lang.String key) throws UnknownAttributeException
removeAttribute
in interface Attributes
UnknownAttributeException
public java.util.Set getAttributes()
getAttributes
in interface Attributes
public void freeze()
freeze
in class ASTNode
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |