|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.tutorial.config.doc.PropertyDocumentationTutorial
@Document(title="Providing Configuration Keys", sortKey="basics1100") @DocCategory(value="basics") public class PropertyDocumentationTutorial
This tutorial shows how documentation information is provided at runtime.
Constructor Summary | |
---|---|
PropertyDocumentationTutorial() |
Method Summary | |
---|---|
void |
accessJavadocComment() To access the Javadoc comment of a property, the properties definition bundle requires metadata information in it's META-INF folder. |
void |
accessPropertyRangeComment() |
void |
accessValueComment() If the value comment is an enumeration type, the comments of the elements is also accessible. |
void |
setUp() |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PropertyDocumentationTutorial()
Method Detail |
---|
public void setUp()
@DocChapter public void accessJavadocComment()
To access the Javadoc comment of a property, the properties definition bundle requires metadata information in it's META-INF
folder. This is automatically provided by the smartics-properties-maven-plugin. Please refer to the documentation of this plugin for information about how to configure a properties definition project to make use of this plugin (or have a look at the test-module-agile project).
For this example we assume that the properties definition have been successfully provided.
The comment is provided via the PropertyDescriptor
(). At the comment is read and it shows the text provided by the developer in the Javadoc comment. This is a simple example since there are no constraints.
@DocChapter public void accessPropertyRangeComment()
@DocChapter public void accessValueComment()
If the value comment is an enumeration type, the comments of the elements is also accessible.
At we again access the Javadoc comment of the property. In this case the type of the property Priority
which is an enumeration type (). Therefore the comment of the enumeration type and the comments from the enumeration elements are also accessible. At the comment of the enumeration type is accessed, at the individual comments of the enumeration type.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |