// ** This file was generated with DemFGen (vers:05/23/2010)

package edu.neu.ccs.demeterf.demfgen.classes;

import edu.neu.ccs.demeterf.lib.*;
import edu.neu.ccs.demeterf.demfgen.*;
import edu.neu.ccs.demeterf.demfgen.dgp.DGPFunc;
import edu.neu.ccs.demeterf.demfgen.traversals.Travs;
import edu.neu.ccs.demeterf.demfgen.pcdgp.PCDGPFunc;
import edu.neu.ccs.demeterf.dispatch.*;
import edu.neu.ccs.demeterf.*;
import edu.neu.ccs.demeterf.demfgen.ClassHier.InhrtPair;
import edu.neu.ccs.demeterf.demfgen.DemFGenMain;
import java.io.*;
import java.io.FileInputStream;
import edu.neu.ccs.demeterf.util.Util;
import edu.neu.ccs.demeterf.util.CLI;





/** Representation of NameDef */
public class NameDef{
    protected final ident id;
    protected final Bound bnd;

    /** Construct a(n) NameDef Instance */
    public NameDef(ident id, Bound bnd){
        this.id = id;
        this.bnd = bnd;
    }
    /** Is the given object Equal to this NameDef? */
    public boolean equals(Object o){
        if(!(o instanceof NameDef))return false;
        if(o == this)return true;
        NameDef oo = (NameDef)o;
        return (((Object)id).equals(oo.id))&&(((Object)bnd).equals(oo.bnd));
    }
    /** Parse an instance of NameDef from the given String */
    public static NameDef parse(String inpt) throws edu.neu.ccs.demeterf.demfgen.classes.ParseException{
        return new edu.neu.ccs.demeterf.demfgen.classes.TheParser(new java.io.StringReader(inpt)).parse_NameDef();
    }
    /** Parse an instance of NameDef from the given Stream */
    public static NameDef parse(java.io.InputStream inpt) throws edu.neu.ccs.demeterf.demfgen.classes.ParseException{
        return new edu.neu.ccs.demeterf.demfgen.classes.TheParser(inpt).parse_NameDef();
    }
    /** Parse an instance of NameDef from the given Reader */
    public static NameDef parse(java.io.Reader inpt) throws edu.neu.ccs.demeterf.demfgen.classes.ParseException{
        return new edu.neu.ccs.demeterf.demfgen.classes.TheParser(inpt).parse_NameDef();
    }

    /** Field Class for NameDef.id */
    public static class id extends edu.neu.ccs.demeterf.Fields.any{}
    /** Field Class for NameDef.bnd */
    public static class bnd extends edu.neu.ccs.demeterf.Fields.any{}
 
    public String toString(){ return ""+id; }
    public String declString(){ return ""+id+" extends Object"; }

    /** DGP method from Class Print */
    public String print(){ return edu.neu.ccs.demeterf.demfgen.classes.Print.PrintM(this); }
    /** DGP method from Class ToStr */
    public String toStr(){ return edu.neu.ccs.demeterf.demfgen.classes.ToStr.ToStrM(this); }
    /** DGP method from Class ToXML */
    public String toXML(){ return edu.neu.ccs.demeterf.demfgen.classes.ToXML.ToXMLM(this); }
    /** Updater for field NameDef.id */
    public NameDef updateId(ident _id){
        return new NameDef(_id, bnd);
    }
    /** Updater for field NameDef.bnd */
    public NameDef updateBnd(Bound _bnd){
        return new NameDef(id, _bnd);
    }
    /** Getter for field NameDef.id */
    public ident getId(){ return id; }
    /** Getter for field NameDef.bnd */
    public Bound getBnd(){ return bnd; }

}