de.smartics.properties.tutorial.config.doc
Class PropertyDocumentationTutorial

Package class diagram package PropertyDocumentationTutorial
java.lang.Object
  extended by de.smartics.properties.tutorial.config.doc.PropertyDocumentationTutorial

@Document(title="Providing Configuration Keys",
          sortKey="basics1100")
@DocCategory(value="basics")
public class PropertyDocumentationTutorial
     
     
extends Object

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

PropertyDocumentationTutorial

public PropertyDocumentationTutorial()
Method Detail

setUp

public void setUp()

accessJavadocComment

@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.


accessPropertyRangeComment

@DocChapter
public void accessPropertyRangeComment()


accessValueComment

@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.



Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.