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

prerna.sablecc2.node.AMetaAssignmentMetaRoutine 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 AMetaAssignmentMetaRoutine extends PMetaRoutine
{
    private TMeta _meta_;
    private TCustom _custom_;
    private PAssignment _assignment_;

    public AMetaAssignmentMetaRoutine()
    {
        // Constructor
    }

    public AMetaAssignmentMetaRoutine(
        @SuppressWarnings("hiding") TMeta _meta_,
        @SuppressWarnings("hiding") TCustom _custom_,
        @SuppressWarnings("hiding") PAssignment _assignment_)
    {
        // Constructor
        setMeta(_meta_);

        setCustom(_custom_);

        setAssignment(_assignment_);

    }

    @Override
    public Object clone()
    {
        return new AMetaAssignmentMetaRoutine(
            cloneNode(this._meta_),
            cloneNode(this._custom_),
            cloneNode(this._assignment_));
    }

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

    public TMeta getMeta()
    {
        return this._meta_;
    }

    public void setMeta(TMeta node)
    {
        if(this._meta_ != null)
        {
            this._meta_.parent(null);
        }

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

            node.parent(this);
        }

        this._meta_ = node;
    }

    public TCustom getCustom()
    {
        return this._custom_;
    }

    public void setCustom(TCustom node)
    {
        if(this._custom_ != null)
        {
            this._custom_.parent(null);
        }

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

            node.parent(this);
        }

        this._custom_ = node;
    }

    public PAssignment getAssignment()
    {
        return this._assignment_;
    }

    public void setAssignment(PAssignment node)
    {
        if(this._assignment_ != null)
        {
            this._assignment_.parent(null);
        }

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

            node.parent(this);
        }

        this._assignment_ = node;
    }

    @Override
    public String toString()
    {
        return ""
            + toString(this._meta_)
            + toString(this._custom_)
            + toString(this._assignment_);
    }

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

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

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

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

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

        if(this._custom_ == oldChild)
        {
            setCustom((TCustom) newChild);
            return;
        }

        if(this._assignment_ == oldChild)
        {
            setAssignment((PAssignment) newChild);
            return;
        }

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy