Logo Search packages:      
Sourcecode: sablecc version File versions  Download package

APkgNameTail.java

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

package org.sablecc.sablecc.node;

import java.util.*;
import org.sablecc.sablecc.analysis.*;

public final class APkgNameTail extends PPkgNameTail
{
  private TDot _dot_;
  private TPkgId _pkgId_;

  public APkgNameTail()
  {}

  public APkgNameTail(
    TDot _dot_,
    TPkgId _pkgId_)
  {
    setDot(_dot_);

    setPkgId(_pkgId_);

  }
  public Object clone()
  {
    return new APkgNameTail(
             (TDot) cloneNode(_dot_),
             (TPkgId) cloneNode(_pkgId_));
  }

  public void apply(Switch sw)
  {
    ((Analysis) sw).caseAPkgNameTail(this);
  }

  public TDot getDot()
  {
    return _dot_;
  }

  public void setDot(TDot node)
  {
    if(_dot_ != null)
    {
      _dot_.parent(null);
    }

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

      node.parent(this);
    }

    _dot_ = node;
  }

  public TPkgId getPkgId()
  {
    return _pkgId_;
  }

  public void setPkgId(TPkgId node)
  {
    if(_pkgId_ != null)
    {
      _pkgId_.parent(null);
    }

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

      node.parent(this);
    }

    _pkgId_ = node;
  }

  public String toString()
  {
    return ""
           + toString(_dot_)
           + toString(_pkgId_);
  }

  void removeChild(Node child)
  {
    if(_dot_ == child)
    {
      _dot_ = null;
      return;
    }

    if(_pkgId_ == child)
    {
      _pkgId_ = null;
      return;
    }

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_dot_ == oldChild)
    {
      setDot((TDot) newChild);
      return;
    }

    if(_pkgId_ == oldChild)
    {
      setPkgId((TPkgId) newChild);
      return;
    }

  }
}

Generated by  Doxygen 1.6.0   Back to index