package java.lang.reflect {
import java.lang.Class__;
import java.lang.IllegalArgumentException;
import java.lang.IllegalAccessException;
import java.lang.Class__;
dynamic public class Field extends AccessibleObject implements Member {
  internal var declaringClass: Class__;
  internal var name: String;
  internal var modifiers: int;
  function Field(fieldName: String, declaringClass: Class__) {
    this.name = fieldName;
    this.declaringClass = declaringClass;
    return;
  }
  public function equals__Ljava_lang_Object_2(other: Object): Boolean {
    if (this === other)
      return true;
    if (!(other is Method))
      return false;
    var mth: Method = Method(other);
    return declaringClass === mth.declaringClass && modifiers == mth.modifiers && Object(name).equals__Ljava_lang_Object_2(mth.name);
  }
  public function get__Ljava_lang_Object_2(obj: Object): Object {
    if (obj.getClass__() != declaringClass) {
    //TODO throw exception
    return null;
    }
    return obj[name];
  }
  public function getDeclaringClass__(): Class__ {
    return declaringClass;
  }
  public function getModifiers__(): int {
    return modifiers;
  }
  public function getName__(): String {
    return name;
  }
}
}
