This mutator supports the procedures_ifreturn
block, configuring the presence of the
return value input and the block's disabled state.
Constant Summary
String | MUTATOR_ID |
Inherited Constant Summary
Field Summary
public static final Factory<ProceduresIfReturnMutator> | FACTORY |
Inherited Field Summary
Public Constructor Summary
ProceduresIfReturnMutator(Factory<ProceduresIfReturnMutator> factory)
Constructs a new
procedures_ifreturn_mutator mutator. |
Public Method Summary
void |
serialize(XmlSerializer serializer)
Serializes the Mutator's state to an XML
<mutation> element. |
void |
update(XmlPullParser parser)
Updates the mutator state from the provided
<mutation> XML. |
Protected Method Summary
void |
Inherited Method Summary
Constants
public static final String MUTATOR_ID
Fields
Public Constructors
public ProceduresIfReturnMutator (Factory<ProceduresIfReturnMutator> factory)
Constructs a new procedures_ifreturn_mutator
mutator.
Parameters
factory | The factory the constructed this mutator. |
---|
Public Methods
public void serialize (XmlSerializer serializer)
Serializes the Mutator's state to an XML <mutation>
element.
Compare with block.mutationToDom()
on web Blockly (added by extensions or mixins),
or Mutator.toXMLElement()
on blockly-ios.
Throws
IOException |
---|
public void update (XmlPullParser parser)
Updates the mutator state from the provided <mutation>
XML. The parser state is such
that parser.next()
will return START_TAG
, the beginning of the
<mutation>
element.
Compare with block.domToMutation()
on web Blockly (added by extensions or mixins),
or Mutator.update()
on blockly-ios.
Parameters
parser | The parser with the <mutation> element. |
---|
Throws
BlockLoadingException | |
---|---|
IOException | |
XmlPullParserException |
Protected Methods
protected void onAttached (Block block)
Called immediately after the mutator is attached to the block. Can be used to perform additional block initialization related to this mutator.
Parameters
block |
---|