de.smartics.properties.spi.core.metadata.projectdoc
Class ProjectdocAnnotationCollector

Package class diagram package ProjectdocAnnotationCollector
java.lang.Object
  extended by de.smartics.properties.spi.core.metadata.projectdoc.ProjectdocAnnotationCollector

public final class ProjectdocAnnotationCollector
     
     
extends Object

Collects annotation information on QDox structures.


Nested Class Summary
static interface ProjectdocAnnotationCollector.Defaults
          Provider for default values.
 
Constructor Summary
ProjectdocAnnotationCollector(Class<?> type, ProjectdocAnnotationCollector.Defaults parentDefaults, ProjectdocAnnotationCollector.Defaults defaults)
          Default constructor.
 
Method Summary
protected static boolean addMetadata(ProjectdocMetaData metadata, Annotation annotation)
          Add metadata read from the annotation.
 ProjectdocMetaData createMetaDataFromAnnotations(Method element)
          Adds annotations of the given element.
 ProjectdocMetaData getParentMetadata()
          Returns the meta data collected from the parent element.
protected static String normalizeString(Object object)
          Helper to normalize an annotation value.
protected  void setDefaults(Member element, ProjectdocMetaData metadata)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectdocAnnotationCollector

public ProjectdocAnnotationCollector(Class<?> type,
                                     ProjectdocAnnotationCollector.Defaults parentDefaults,
                                     ProjectdocAnnotationCollector.Defaults defaults)
Default constructor.

Parameters:
type - the parent type.
parentDefaults - the defaults for metadata to use. May be null if no defaults are provided.
defaults - the provider for default values.
Method Detail

getParentMetadata

public ProjectdocMetaData getParentMetadata()
Returns the meta data collected from the parent element. This is usually the type the annotated elements are part of.

Returns:
the meta data collected from the parent element.

createMetaDataFromAnnotations

public ProjectdocMetaData createMetaDataFromAnnotations(Method element)
Adds annotations of the given element.

Parameters:
element - the element whose annotations are to be fetched.
Returns:
the document instance meta data for the given element.

setDefaults

protected void setDefaults(Member element,
                           ProjectdocMetaData metadata)

addMetadata

protected static boolean addMetadata(ProjectdocMetaData metadata,
                                     Annotation annotation)
Add metadata read from the annotation.

Parameters:
metadata - the instance to add to.
annotation - the annotation to access information to add to the metadata instance.
Returns:
true if the metadata has been added, false if the annotation was not recognized.

normalizeString

protected static final String normalizeString(Object object)
Helper to normalize an annotation value.

Parameters:
object - the information to normalize.
Returns:
the normalized string.


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