Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String getJavaDoc(MethodDeclaration a) {
- try {
- String javadoc = a.getJavadoc().tags().get(0).toString();
- // javadoc = javadoc.split("\\.")[0].replace("*", "").trim();
- javadoc = javadoc.replace("*", "").trim();
- javadoc = javadoc.replaceAll("\\<.*?>",""); // Remove html tags
- if (javadoc.charAt(0) == '@' || !javadoc.matches("^\\p{ASCII}+$")) {
- javadoc = "";
- }
- return javadoc;
- } catch (Exception e) {
- return "";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement