All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.sahagin.share.srctree.code.MethodArgument Maven / Gradle / Ivy

There is a newer version: 0.10.1
Show newest version
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");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy