Skip to content

Commit

Permalink
Added JavaDoc example
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Dec 29, 2014
1 parent 8228990 commit ae5c707
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ javaClass.addMethod()
System.out.println(javaClass);
```
JavaDoc creation and parsing
-----------------------------------

Here is an example on how to add JavaDoc to a class:

```java
JavaClassSource javaClass =
Roaster.parse(JavaClassSource.class, "public class SomeClass {}");
JavaDocSource javaDoc = javaClass.getJavaDoc();

javaDoc.setFullText("Full class documentation");
// or
javaDoc.setText("Class documentation text");
javaDoc.addTagValue("@author","George Gastaldi");

System.out.println(javaClass);
```

Formatting the Java Source Code
-------------------------------
Expand Down

0 comments on commit ae5c707

Please sign in to comment.