code: boolean isMemberPresent(ClassFile targetClass,
                              String targetName,
                              String targetDesc,
                              boolean checkMethod)
              throws ConstantPoolException {
          if (checkMethod) {
              for (Method m : targetClass.methods) {
                  String mname = m.getName(targetClass.constant_pool);
                  String mdesc = targetClass.constant_pool.getUTF8Value(m.descriptor.index);
                  if (targetName.equals(mname) && targetDesc.equals(mdesc)) {
                      return true;
                  }
              }
          } else {
              for (Field f : targetClass.fields) {
                  String fname = f.getName(targetClass.constant_pool);
                  if (targetName.equals(fname)) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Checks whether a member (method or field) is present in a class.
  The checkMethod parameter determines whether this checks for a method
  or for a field.
  
  @param targetClass the ClassFile of the class to search
  @param targetName the method or field's name
  @param targetDesc the methods descriptor (ignored if checkMethod is false)
  @param checkMethod true if checking for method, false if checking for field
  @return boolean indicating whether the member is present
  @throws ConstantPoolException if a constant pool entry cannot be found