- if include contains a java file, like first example, the whole class is read and inserted within AsciiDoc source code blocks.
- if include contains a java file but with # symbol, like second one, the right part of # will be used as method name of given class. So for example Project#setId(String, String) will include a method of Project's class called setId and receiving two string parameters.
- if include contains an xml file, the file is inserted "as is" within AsciiDoc source code block.
- if include contains an xml file and between brackets there is an xpath expression, the result of that expression will be inserted.
- any other include is left "as is", so it will be processed by AsciiDoc(tor) processor.
Also note that the include files will be resolved relative from place where the CLI is being run, typically from the root of the project.
You can use callouts inside java and xml code and the processor will render it in the proper way.
In java you can write a callout as a single line comment with callout number between <, > at start.
To render previous class we can call as:
java -jar docstract-<version>.jar --input=src/test/java/com/lordofthejars/asciidoctorfy/MM.java --output=README.adoc
Weiß mit dem Locken umzugehn, Und mich auf's Pfeifen zu verstehn. Drum kann ich froh und lustig sein, Denn alle Vögel sind ja mein. (Die Zauberflöte - Wolfgang Amadeus Mozart)Music: https://www.youtube.com/watch?v=PRtvVQ1fq8s