private void buildEnumCollection() {
    this.enums = new HashSet<JavaType>();

    BeanProperty[] properties = javaClass.getBeanProperties(true);
    for (int i = 0; i < properties.length; i++) {
      if (isValidProperty(properties[i]) && properties[i].getType().getJavaClass().isEnum()) {
        this.enums.add(new QDoxTypeAdapter(properties[i].getType()));
      }
    }

    com.thoughtworks.qdox.model.JavaMethod[] methods = javaClass.getMethods(true);
    for (int i = 0; i < methods.length; i++) {
      com.thoughtworks.qdox.model.JavaParameter[] parameters = methods[i].getParameters();
      for (int j = 0; j < parameters.length; j++) {
        if (parameters[j].getType().getJavaClass().isEnum()) {
          this.enums.add(new QDoxTypeAdapter(parameters[j].getType()));
        } else if (parameters[j].getType().isA(LIST_TYPE)
            && parameters[j].getType().getActualTypeArguments() != null
            && parameters[j].getType().getActualTypeArguments()[0].getJavaClass().isEnum()) {
          this.enums.add(new QDoxTypeAdapter(parameters[j].getType().getActualTypeArguments()[0]));
        } else if (parameters[j].getType().isA(MAP_TYPE)
            && parameters[j].getType().getActualTypeArguments() != null
            && parameters[j].getType().getActualTypeArguments()[0].getJavaClass().isEnum()) {
          this.enums.add(new QDoxTypeAdapter(parameters[j].getType().getActualTypeArguments()[0]));
        } else if (parameters[j].getType().isA(MAP_TYPE)
            && parameters[j].getType().getActualTypeArguments() != null
            && parameters[j].getType().getActualTypeArguments()[1].getJavaClass().isEnum()) {
          this.enums.add(new QDoxTypeAdapter(parameters[j].getType().getActualTypeArguments()[1]));
        }
      }
    }
  }
  private void buildPropertyCollection() {
    this.properties = new ArrayList<JavaProperty>();

    BeanProperty[] properties = javaClass.getBeanProperties(true);
    for (int i = 0; i < properties.length; i++) {
      if (isValidProperty(properties[i])) {
        com.thoughtworks.qdox.model.JavaField field =
            javaClass.getFieldByName(properties[i].getName());
        this.properties.add(new QDoxPropertyAdapter(properties[i], field));
      }
    }
  }