Code example for Field

Methods: equals

0
 
    @Override 
    public boolean equals(Object obj) {
      if (obj != null && obj.getClass().equals(this.getClass())) {
        DirectAccessFieldDescriptor that = (DirectAccessFieldDescriptor) obj;
        return this.field.equals(that.field);
      } else { 
        return false; 
      } 
    } 
  } 
 
  /** 
   * A field descriptor accessing the value via a getter and setter. 
   */ 
  static class GetSetFieldDescriptor extends AbstractFieldDescriptor { 
    enum Type { 
      GETTER {
        @Override 
        String name(Method m) {
          if (m.getName().charAt(0) == 'i') {