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

soot.jimple.parser.node.AIdentityStatement 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 AIdentityStatement extends PStatement
{
    private PLocalName _localName_;
    private TColonEquals _colonEquals_;
    private TAtIdentifier _atIdentifier_;
    private PType _type_;
    private TSemicolon _semicolon_;

    public AIdentityStatement()
    {
        // Constructor
    }

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

        setColonEquals(_colonEquals_);

        setAtIdentifier(_atIdentifier_);

        setType(_type_);

        setSemicolon(_semicolon_);

    }

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

    @Override
    public void apply(Switch sw)
    {
        ((Analysis) sw).caseAIdentityStatement(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 PType getType()
    {
        return this._type_;
    }

    public void setType(PType node)
    {
        if(this._type_ != null)
        {
            this._type_.parent(null);
        }

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

            node.parent(this);
        }

        this._type_ = 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._type_)
            + 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._type_ == child)
        {
            this._type_ = 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._type_ == oldChild)
        {
            setType((PType) newChild);
            return;
        }

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy