Examples of DocTag


Examples of uk.co.badgersinfoil.metaas.dom.DocTag

  }

  public String getDescriptionString() {
    DocComment doc = getMethod().getDocumentation();
    String name = getName();
    DocTag tag = DocCommentUtils.findParam(doc, name);
    if (tag == null) {
      return null;
    }
    return tag.getBodyString().substring(name.length()+1);
  }
View Full Code Here

Examples of uk.co.badgersinfoil.metaas.dom.DocTag

  }

  public void setDescription(String description) {
    ASTDocComment doc = (ASTDocComment)getMethod().getDocumentation();
    String name = getName();
    DocTag tag = DocCommentUtils.findParam(doc, name);
    if (tag == null) {
      doc.addParaTag("param", name+" "+description);
    } else {
      tag.setBody(name+" "+description);
    }
  }
View Full Code Here

Examples of uk.co.badgersinfoil.metaas.dom.DocTag

    return stmtList().getStatementList();
  }

  public String getReturnDescriptionString() {
    DocComment doc = getDocumentation();
    DocTag ret = doc.findFirstTag("return");
    if (ret == null) {
      return null;
    }
    return ret.getBodyString();
  }
View Full Code Here

Examples of uk.co.badgersinfoil.metaas.dom.DocTag

    return ret.getBodyString();
  }

  public void setReturnDescription(String description) {
    DocComment doc = getDocumentation();
    DocTag ret = doc.findFirstTag("return");
    if (ret == null) {
      if (description != null) {
        doc.addParaTag("return", description);
      }
    } else {
      if (description == null) {
        doc.delete(ret);
      } else {
        ret.setBody(description);
      }
    }
  }
View Full Code Here

Examples of uk.co.badgersinfoil.metaas.dom.DocTag

  public static DocTag findParam(DocComment doc, String name) {
    Iterator params = doc.findTags("param");
    Pattern p = Pattern.compile("\\s*\\Q"+name+"\\E\\b");
    while (params.hasNext()) {
      DocTag param = (DocTag)params.next();
      if (p.matcher(param.getBodyString()).lookingAt()) {
        return param;
      }
    }
    return null;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.