// ** This file was generated with DemFGen (vers:12/15/2010) package gen; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; /** Representation of VariableDeclaration */ public class VariableDeclaration{ protected final VariableType variableType; protected final VariableName variableName; /** Construct a(n) VariableDeclaration Instance */ public VariableDeclaration(VariableType variableType, VariableName variableName){ this.variableType = variableType; this.variableName = variableName; } /** Is the given object Equal to this VariableDeclaration? */ public boolean equals(Object o){ if(!(o instanceof VariableDeclaration))return false; if(o == this)return true; VariableDeclaration oo = (VariableDeclaration)o; return (((Object)variableType).equals(oo.variableType))&&(((Object)variableName).equals(oo.variableName)); } /** Parse an instance of VariableDeclaration from the given String */ public static VariableDeclaration parse(String inpt) throws gen.ParseException{ return new gen.TheParser(new java.io.StringReader(inpt)).parse_VariableDeclaration(); } /** Parse an instance of VariableDeclaration from the given Stream */ public static VariableDeclaration parse(java.io.InputStream inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_VariableDeclaration(); } /** Parse an instance of VariableDeclaration from the given Reader */ public static VariableDeclaration parse(java.io.Reader inpt) throws gen.ParseException{ return new gen.TheParser(inpt).parse_VariableDeclaration(); } /** Field Class for VariableDeclaration.variableType */ public static class variableType extends edu.neu.ccs.demeterf.Fields.any{} /** Field Class for VariableDeclaration.variableName */ public static class variableName extends edu.neu.ccs.demeterf.Fields.any{} /** DGP method from Class Display */ public String display(){ return gen.Display.DisplayM(this); } /** DGP method from Class Print */ public String print(){ return gen.Print.PrintM(this); } /** DGP method from Class ToStr */ public String toStr(){ return gen.ToStr.ToStrM(this); } /** Updater for field VariableDeclaration.variableType */ public VariableDeclaration updateVariableType(VariableType _variableType){ return new VariableDeclaration(_variableType, variableName); } /** Updater for field VariableDeclaration.variableName */ public VariableDeclaration updateVariableName(VariableName _variableName){ return new VariableDeclaration(variableType, _variableName); } /** Getter for field VariableDeclaration.variableType */ public VariableType getVariableType(){ return variableType; } /** Getter for field VariableDeclaration.variableName */ public VariableName getVariableName(){ return variableName; } }