ACharBasic.java :  » Parser » sablecc » org » sablecc » sablecc » node » Java Open Source

Java Open Source » Parser » sablecc 
sablecc » org » sablecc » sablecc » node » ACharBasic.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 ACharBasic extends PBasic
{
  private PChar _char_;

  public ACharBasic()
  {}

  public ACharBasic(
    PChar _char_)
  {
    setChar(_char_);

  }
  public Object clone()
  {
    return new ACharBasic(
             (PChar) cloneNode(_char_));
  }

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

  public PChar getChar()
  {
    return _char_;
  }

  public void setChar(PChar node)
  {
    if(_char_ != null)
    {
      _char_.parent(null);
    }

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

      node.parent(this);
    }

    _char_ = node;
  }

  public String toString()
  {
    return ""
           + toString(_char_);
  }

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

  }

  void replaceChild(Node oldChild, Node newChild)
  {
    if(_char_ == oldChild)
    {
      setChar((PChar) newChild);
      return;
    }

  }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.