1 19 package gcc.generator; 20 21 public class JCatchStatement extends JBlockStatement 22 { 23 protected JVariable _var; 24 25 public JCatchStatement( JVariable v ) 26 { 27 super(); 28 _var = v; 29 } 30 31 public JVariable getVariable() 32 { 33 return _var; 34 } 35 36 public int hashCode() 37 { 38 return _var.hashCode(); 39 } 40 41 public boolean equals( Object other ) 42 { 43 boolean rc = false; 44 45 if (this == other) 46 { 47 rc = true; 48 } 49 else if (other instanceof JCatchStatement) 50 { 51 JCatchStatement cs = (JCatchStatement)other; 52 53 if (cs._var.getType().equals(_var.getType())) 54 { 55 rc = true; 56 } 57 } 58 else if (other instanceof JVariable) 59 { 60 JVariable v = (JVariable)other; 61 62 if (v.getType().equals( _var.getType() )) 63 { 64 rc = true; 65 } 66 } 67 68 69 return rc; 70 } 71 } 72 73 | Popular Tags |