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

prerna.sablecc.node.ARawApiTerm Maven / Gradle / Ivy

There is a newer version: 4.2.2
Show newest version
/* This file was generated by SableCC (http://www.sablecc.org/). */

package prerna.sablecc.node;

import prerna.sablecc.analysis.*;

@SuppressWarnings("nls")
public final class ARawApiTerm extends PTerm
{
    private PRawApiBlock _rawApiBlock_;

    public ARawApiTerm()
    {
        // Constructor
    }

    public ARawApiTerm(
        @SuppressWarnings("hiding") PRawApiBlock _rawApiBlock_)
    {
        // Constructor
        setRawApiBlock(_rawApiBlock_);

    }

    @Override
    public Object clone()
    {
        return new ARawApiTerm(
            cloneNode(this._rawApiBlock_));
    }

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

    public PRawApiBlock getRawApiBlock()
    {
        return this._rawApiBlock_;
    }

    public void setRawApiBlock(PRawApiBlock node)
    {
        if(this._rawApiBlock_ != null)
        {
            this._rawApiBlock_.parent(null);
        }

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

            node.parent(this);
        }

        this._rawApiBlock_ = node;
    }

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

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy