Logo Search packages:      
Sourcecode: jamvm version File versions

boolean java::lang::reflect::Field::equals ( Object  o  )  [inline]

Compare two objects to see if they are semantically equivalent. Two Fields are semantically equivalent if they have the same declaring class, name, and type. Since you can't creat a Field except through the VM, this is just the == relation.

Parameters:
o the object to compare to
Returns:
true if they are equal; false if not

Definition at line 149 of file Field.java.

References getDeclaringClass(), getName(), and getType().

  {
    if (!(o instanceof Field))
      return false;
    Field that = (Field)o; 
    if (this.getDeclaringClass() != that.getDeclaringClass())
      return false;
    if (!this.getName().equals(that.getName()))
      return false;
    if (this.getType() != that.getType())
      return false;
    return true;
  }


Generated by  Doxygen 1.6.0   Back to index