org.sahagin.share.srctree.code.MethodArgument Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sahagin Show documentation
Show all versions of sahagin Show documentation
Sahagin makes your Selenium script more readable and maintainable.
package org.sahagin.share.srctree.code;
import java.util.Map;
import org.sahagin.share.yaml.YamlConvertException;
import org.sahagin.share.yaml.YamlUtils;
public class MethodArgument extends Code {
public static final String TYPE = "arg";
private int argIndex;
public int getArgIndex() {
return argIndex;
}
public void setArgIndex(int argIndex) {
this.argIndex = argIndex;
}
@Override
protected String getType() {
return TYPE;
}
@Override
public Map toYamlObject() {
Map result = super.toYamlObject();
result.put("argIndex", argIndex);
return result;
}
@Override
public void fromYamlObject(Map yamlObject)
throws YamlConvertException {
super.fromYamlObject(yamlObject);
argIndex = YamlUtils.getIntValue(yamlObject, "argIndex");
}
}