ProcedureInfo

public class ProcedureInfo extends Object

Describes a procedure for the ProcedureManager and procedure mutators.

Constant Summary

String ATTR_ARG_NAME
String ATTR_NAME
String ATTR_STATEMENTS
boolean HAS_STATEMENTS_DEFAULT
String TAG_ARG

Public Constructor Summary

ProcedureInfo(String name, List<String> argumentNames, boolean definitionHasStatements)
Constructs a new ProcedureInfo with the given arguments.

Public Method Summary

ProcedureInfo
cloneWithName(String newProcedureName)
Constructs a new ProcedureInfo with the same parameters, but a new name.
List<String>
boolean
String
static ProcedureInfo
parseImpl(XmlPullParser parser)
static void
serialize(XmlSerializer serializer, ProcedureInfo info, boolean asDefinition)
Serializes a procedure as a XML <mutation> tag.

Inherited Method Summary

Constants

protected static final String ATTR_ARG_NAME

Constant Value: "name"

protected static final String ATTR_NAME

Constant Value: "name"

protected static final String ATTR_STATEMENTS

Constant Value: "statements"

public static final boolean HAS_STATEMENTS_DEFAULT

Constant Value: true

protected static final String TAG_ARG

Constant Value: "arg"

Public Constructors

public ProcedureInfo (String name, List<String> argumentNames, boolean definitionHasStatements)

Constructs a new ProcedureInfo with the given arguments.

Parameters
name The name of the procedure, or null if not yet defined.
argumentNames The list of parameter names, possibly empty.
definitionHasStatements Whether the procedure definition includes

Public Methods

public ProcedureInfo cloneWithName (String newProcedureName)

Constructs a new ProcedureInfo with the same parameters, but a new name.

Parameters
newProcedureName The name to use on the constructed ProcedureInfo.
Returns
  • A new ProcedureInfo, reflecting a renamed procedure.

public List<String> getArgumentNames ()

Returns
  • An ordered list of procedure argument names.

public boolean getDefinitionHasStatementBody ()

Returns
  • True if the procedure's definition should include a Input.InputStatement for the procedure body. Otherwise false.

public String getProcedureName ()

Returns
  • The name of the procedure.

public static ProcedureInfo parseImpl (XmlPullParser parser)

Parameters
parser
Throws
BlockLoadingException
IOException
XmlPullParserException

public static void serialize (XmlSerializer serializer, ProcedureInfo info, boolean asDefinition)

Serializes a procedure as a XML <mutation> tag.

Parameters
serializer The serailizer to output to.
info The ProcedureInput to serialize
asDefinition Whether the output should reflect a procedure definition's mutator, or otherwise a calling mutator.
Throws
IOException If the output stream backing the serializer fails.