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

prerna.sablecc2.node.AJavaOp 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 AJavaOp extends PJavaOp
{
    private TJava _java_;

    public AJavaOp()
    {
        // Constructor
    }

    public AJavaOp(
        @SuppressWarnings("hiding") TJava _java_)
    {
        // Constructor
        setJava(_java_);

    }

    @Override
    public Object clone()
    {
        return new AJavaOp(
            cloneNode(this._java_));
    }

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

    public TJava getJava()
    {
        return this._java_;
    }

    public void setJava(TJava node)
    {
        if(this._java_ != null)
        {
            this._java_.parent(null);
        }

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

            node.parent(this);
        }

        this._java_ = node;
    }

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

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

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy