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

ATokenSpecifier.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 ATokenSpecifier extends PSpecifier
{
  private TTokenSpecifier _tokenSpecifier_;
  private TDot _dot_;

  public ATokenSpecifier()
  {}

  public ATokenSpecifier(
    TTokenSpecifier _tokenSpecifier_,
    TDot _dot_)
  {
    setTokenSpecifier(_tokenSpecifier_);

    setDot(_dot_);

  }
  public Object clone()
  {
    return new ATokenSpecifier(
             (TTokenSpecifier) cloneNode(_tokenSpecifier_),
             (TDot) cloneNode(_dot_));
  }

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

  public TTokenSpecifier getTokenSpecifier()
  {
    return _tokenSpecifier_;
  }

  public void setTokenSpecifier(TTokenSpecifier node)
  {
    if(_tokenSpecifier_ != null)
    {
      _tokenSpecifier_.parent(null);
    }

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

      node.parent(this);
    }

    _tokenSpecifier_ = node;
  }

  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 String toString()
  {
    return ""
           + toString(_tokenSpecifier_)
           + toString(_dot_);
  }

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

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

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_tokenSpecifier_ == oldChild)
    {
      setTokenSpecifier((TTokenSpecifier) newChild);
      return;
    }

    if(_dot_ == oldChild)
    {
      setDot((TDot) newChild);
      return;
    }

  }
}

Generated by  Doxygen 1.6.0   Back to index