/** Equality */ public boolean equals(Object obj) { if ((obj != null) && (obj instanceof NameAndTypeData)) { NameAndTypeData nt = (NameAndTypeData) obj; return field.getName().equals(nt.field.getName()) && field.getType().equals(nt.field.getType()); } return false; }
/** Collect all constants into the constant table */ public void collect(Environment env, MemberDefinition field, ConstantPool tab) { // Collect constants for arguments only // if a local variable table is generated if ((field != null) && env.debug_vars()) { if (field.getArguments() != null) { for (Enumeration e = field.getArguments().elements(); e.hasMoreElements(); ) { MemberDefinition f = (MemberDefinition) e.nextElement(); tab.put(f.getName().toString()); tab.put(f.getType().getTypeSignature()); } } } // Collect constants from the instructions for (Instruction inst = first; inst != null; inst = inst.next) { inst.collect(tab); } }
/** Hashcode */ public int hashCode() { return field.getName().hashCode() * field.getType().hashCode(); }