private static Component buildComponent(Component component, final String id, Node child) {
    Class<?> clazz = component.getClass();
    while (Component.class.isAssignableFrom(clazz)) {
      Component value = null;
      // look for annotated field
      for (Field iter : clazz.getDeclaredFields()) {
        if (iter.isAnnotationPresent(AutoComponent.class)) {
          value = getValue(component, iter);
          if (value != null && value.getId().equals(id)) {
            child.field = iter;
            break;
          }
          else {
            value = null;
          }
        }
      }
      if (value != null) {
        return value;
      }
      clazz = clazz.getSuperclass();
    }
    return null;
  }