ProcedureCallMutator

public class ProcedureCallMutator extends AbstractProcedureMutator<ProcedureInfo>

This mutator supports procedure call blocks for user-defined procedures (procedures_callreturn and procedures_callnoreturn blocks).

Constant Summary

String CALLNORETURN_MUTATOR_ID
String CALLRETURN_MUTATOR_ID
String NAME_FIELD_NAME

Inherited Constant Summary

Field Summary

public static final Factory<ProcedureCallMutator> CALLNORETURN_FACTORY
public static final Factory<ProcedureCallMutator> CALLRETURN_FACTORY

Inherited Field Summary

Public Method Summary

Input
getArgumentInput(int index)
This retrieves the block's Input that represents the nth index argument.
void
mutate(ProcedureInfo procedureInfo)
Convenience method for invoking a mutation event programmatically, updating the Mutator with the provided values.

Protected Method Summary

List<Input>
ProcedureInfo
parseAndValidateMutationXml(XmlPullParser parser)
Updates the block using the mutation in the XML.
void
serializeInfo(XmlSerializer serializer, ProcedureInfo info)
void
setProcedureNameImpl(String newProcedureName)
Updates the ProcedureInfo with a new name, and updates the name field.
void
updateBlock()
Updates mBlock to reflect the current ProcedureInfo.

Inherited Method Summary

Constants

public static final String CALLNORETURN_MUTATOR_ID

Constant Value: "procedures_callnoreturn_mutator"

public static final String CALLRETURN_MUTATOR_ID

Constant Value: "procedures_callreturn_mutator"

public static final String NAME_FIELD_NAME

Constant Value: "NAME"

Fields

public static final Factory<ProcedureCallMutator> CALLNORETURN_FACTORY

public static final Factory<ProcedureCallMutator> CALLRETURN_FACTORY

Public Methods

public Input getArgumentInput (int index)

This retrieves the block's Input that represents the nth index argument.

Parameters
index The index of the argument asked for.
Returns

public void mutate (ProcedureInfo procedureInfo)

Convenience method for invoking a mutation event programmatically, updating the Mutator with the provided values.

Parameters
procedureInfo The procedure info for the mutation.

Protected Methods

protected List<Input> buildUpdatedInputs ()

Returns
  • A new set of Inputs reflecting the current ProcedureInfo state.

protected ProcedureInfo parseAndValidateMutationXml (XmlPullParser parser)

Updates the block using the mutation in the XML.

Parameters
parser The parser with the <mutation> element.
Throws
IOException If the input stream fails.
XmlPullParserException If the input is not valid XML.
BlockLoadingException If the input is not a valid procedure mutation, or lacks a procedure name.

protected void serializeInfo (XmlSerializer serializer, ProcedureInfo info)

Parameters
serializer
info
Throws
IOException

protected void setProcedureNameImpl (String newProcedureName)

Updates the ProcedureInfo with a new name, and updates the name field. This should never be called directly. Use setProcedureName(String) or mutate(ProcedureInfo).

Parameters
newProcedureName The updated name. Cannot be null.

protected void updateBlock ()

Updates mBlock to reflect the current ProcedureInfo.