コード例 #1
0
  /**
   * Creates a new Task using two strings, the Application name and Method name.
   *
   * @param a Application name.
   * @param m Method name
   * @return Task
   */
  public static Task Create(final String a, final String m) {
    Application application = new Application();
    application.setName(a);

    Method method = new Method();
    method.setName(m);

    return Create(application, method);
  }
コード例 #2
0
  private Method createCRUDMethod(
      final String name, final Parameter crudParameter, final Return crudReturn) {
    final Method method = new Method();
    method.setName(name);
    method.setReturn(crudReturn);
    method.getParameter().add(crudParameter);

    return method;
  }
コード例 #3
0
 private List<Method> parseMethods(List nodes, Node parent) {
   List<Method> methods = new ArrayList<Method>(nodes.size());
   for (Element node : (List<Element>) nodes) {
     Method method = new Method();
     method.setName(node.attributeValue("name"));
     method.setParent(parent);
     DocResult docResult = parseDoc(node, method);
     method.setReturntype(node.attributeValue("returntype"));
     method.setArgs(parseFields(node.elements("arg"), docResult, method));
     method.setExs(parseFields(node.elements("ex"), docResult, method));
     methods.add(method);
   }
   return methods;
 }