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

soot.jimple.parser.node.AMultiParameterList Maven / Gradle / Ivy

/* This file was generated by SableCC (http://www.sablecc.org/). */

package soot.jimple.parser.node;

import soot.jimple.parser.analysis.*;

@SuppressWarnings("nls")
public final class AMultiParameterList extends PParameterList
{
    private PParameter _parameter_;
    private TComma _comma_;
    private PParameterList _parameterList_;

    public AMultiParameterList()
    {
        // Constructor
    }

    public AMultiParameterList(
        @SuppressWarnings("hiding") PParameter _parameter_,
        @SuppressWarnings("hiding") TComma _comma_,
        @SuppressWarnings("hiding") PParameterList _parameterList_)
    {
        // Constructor
        setParameter(_parameter_);

        setComma(_comma_);

        setParameterList(_parameterList_);

    }

    @Override
    public Object clone()
    {
        return new AMultiParameterList(
            cloneNode(this._parameter_),
            cloneNode(this._comma_),
            cloneNode(this._parameterList_));
    }

    @Override
    public void apply(Switch sw)
    {
        ((Analysis) sw).caseAMultiParameterList(this);
    }

    public PParameter getParameter()
    {
        return this._parameter_;
    }

    public void setParameter(PParameter node)
    {
        if(this._parameter_ != null)
        {
            this._parameter_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        this._parameter_ = node;
    }

    public TComma getComma()
    {
        return this._comma_;
    }

    public void setComma(TComma node)
    {
        if(this._comma_ != null)
        {
            this._comma_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        this._comma_ = node;
    }

    public PParameterList getParameterList()
    {
        return this._parameterList_;
    }

    public void setParameterList(PParameterList node)
    {
        if(this._parameterList_ != null)
        {
            this._parameterList_.parent(null);
        }

        if(node != null)
        {
            if(node.parent() != null)
            {
                node.parent().removeChild(node);
            }

            node.parent(this);
        }

        this._parameterList_ = node;
    }

    @Override
    public String toString()
    {
        return ""
            + toString(this._parameter_)
            + toString(this._comma_)
            + toString(this._parameterList_);
    }

    @Override
    void removeChild(@SuppressWarnings("unused") Node child)
    {
        // Remove child
        if(this._parameter_ == child)
        {
            this._parameter_ = null;
            return;
        }

        if(this._comma_ == child)
        {
            this._comma_ = null;
            return;
        }

        if(this._parameterList_ == child)
        {
            this._parameterList_ = null;
            return;
        }

        throw new RuntimeException("Not a child.");
    }

    @Override
    void replaceChild(@SuppressWarnings("unused") Node oldChild, @SuppressWarnings("unused") Node newChild)
    {
        // Replace child
        if(this._parameter_ == oldChild)
        {
            setParameter((PParameter) newChild);
            return;
        }

        if(this._comma_ == oldChild)
        {
            setComma((TComma) newChild);
            return;
        }

        if(this._parameterList_ == oldChild)
        {
            setParameterList((PParameterList) newChild);
            return;
        }

        throw new RuntimeException("Not a child.");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy