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

prerna.sablecc2.node.AExprComponentBaseExpr Maven / Gradle / Ivy

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

package prerna.sablecc2.node;

import prerna.sablecc2.analysis.*;

@SuppressWarnings("nls")
public final class AExprComponentBaseExpr extends PBaseExpr
{
    private PExprComponent _exprComponent_;

    public AExprComponentBaseExpr()
    {
        // Constructor
    }

    public AExprComponentBaseExpr(
        @SuppressWarnings("hiding") PExprComponent _exprComponent_)
    {
        // Constructor
        setExprComponent(_exprComponent_);

    }

    @Override
    public Object clone()
    {
        return new AExprComponentBaseExpr(
            cloneNode(this._exprComponent_));
    }

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

    public PExprComponent getExprComponent()
    {
        return this._exprComponent_;
    }

    public void setExprComponent(PExprComponent node)
    {
        if(this._exprComponent_ != null)
        {
            this._exprComponent_.parent(null);
        }

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

            node.parent(this);
        }

        this._exprComponent_ = node;
    }

    @Override
    public String toString()
    {
        return ""
            + toString(this._exprComponent_);
    }

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy