/* 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 AIdentityNoTypeStatement extends PStatement
{
    private PLocalName _localName_;
    private TColonEquals _colonEquals_;
    private TAtIdentifier _atIdentifier_;
    private TSemicolon _semicolon_;

    public AIdentityNoTypeStatement()
    {
        // Constructor
    }

    public AIdentityNoTypeStatement(
        @SuppressWarnings("hiding") PLocalName _localName_,
        @SuppressWarnings("hiding") TColonEquals _colonEquals_,
        @SuppressWarnings("hiding") TAtIdentifier _atIdentifier_,
        @SuppressWarnings("hiding") TSemicolon _semicolon_)
    {
        // Constructor
        setLocalName(_localName_);

        setColonEquals(_colonEquals_);

        setAtIdentifier(_atIdentifier_);

        setSemicolon(_semicolon_);

    }

    @Override
    public Object clone()
    {
        return new AIdentityNoTypeStatement(
            cloneNode(this._localName_),
            cloneNode(this._colonEquals_),
            cloneNode(this._atIdentifier_),
            cloneNode(this._semicolon_));
    }

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

    public PLocalName getLocalName()
    {
        return this._localName_;
    }

    public void setLocalName(PLocalName node)
    {
        if(this._localName_ != null)
        {
            this._localName_.parent(null);
        }

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

            node.parent(this);
        }

        this._localName_ = node;
    }

    public TColonEquals getColonEquals()
    {
        return this._colonEquals_;
    }

    public void setColonEquals(TColonEquals node)
    {
        if(this._colonEquals_ != null)
        {
            this._colonEquals_.parent(null);
        }

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

            node.parent(this);
        }

        this._colonEquals_ = node;
    }

    public TAtIdentifier getAtIdentifier()
    {
        return this._atIdentifier_;
    }

    public void setAtIdentifier(TAtIdentifier node)
    {
        if(this._atIdentifier_ != null)
        {
            this._atIdentifier_.parent(null);
        }

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

            node.parent(this);
        }

        this._atIdentifier_ = node;
    }

    public TSemicolon getSemicolon()
    {
        return this._semicolon_;
    }

    public void setSemicolon(TSemicolon node)
    {
        if(this._semicolon_ != null)
        {
            this._semicolon_.parent(null);
        }

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

            node.parent(this);
        }

        this._semicolon_ = node;
    }

    @Override
    public String toString()
    {
        return ""
            + toString(this._localName_)
            + toString(this._colonEquals_)
            + toString(this._atIdentifier_)
            + toString(this._semicolon_);
    }

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

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

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

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

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

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

        if(this._colonEquals_ == oldChild)
        {
            setColonEquals((TColonEquals) newChild);
            return;
        }

        if(this._atIdentifier_ == oldChild)
        {
            setAtIdentifier((TAtIdentifier) newChild);
            return;
        }

        if(this._semicolon_ == oldChild)
        {
            setSemicolon((TSemicolon) newChild);
            return;
        }

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