The attributes you can set in include are:
- imports: adds the imports.
- fields: adds the fields of the main class.
- class: adds all the content of the main class.
- enum=<classname>: adds the enum with the given name. The enum should be defined inside the class we are adding.
- annotation=<classname>: same as enum but for annotations.
- class=<classname>: same as enum but for inner classes.
- contructor=<constructorName>(<parameterType1>,<parameterType2>, ....): adds the defined constructor. In this case we must set the constructor name and the type of each parameter. For example: MyClass(String).
- method=<returnType> <methodName>(<parameterType1>, <parameterType2>, ...): same as constructor but for methods, which implies adding the return type. Note that it is not required to add any modifier nor throws classes.
Now we can use our classes within our documentation and by adding the required block.
This version of plugin works with Java 1.7 and before, not with Java 1.8 but it could work in some cases.
The extension is published on bintray, so to install you simply have to add bintray repository and the required dependency:
The project is hosted at: https://github.com/lordofthejars/asciidoctorj-extensions
We keep learning,
I feel shouting ya-hoo, And me still feeling hungry, Cowabunga!!, Cookie monster went and ate the new red two. Monster Went and Ate My Red 2 - Elvis Costello & ElmoMusic: https://www.youtube.com/watch?v=KxardpBReQc