Class AnnotationClassParser
java.lang.Object
org.apache.sling.caconfig.impl.metadata.AnnotationClassParser
Helper methods for parsing metadata from configuration annotation classes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ConfigurationMetadata
buildConfigurationMetadata
(Class<?> clazz) Build configuration metadata by parsing the given annotation interface class and it's configuration annotations.static String
getConfigurationName
(Class<?> clazz) Get configuration name for given configuration annotation class.static String
getPropertyName
(String methodName) Implements the method name mapping as defined in OSGi R6 Compendium specification, Chapter 112.static boolean
isContextAwareConfig
(Class<?> clazz) Checks if the given class is suitable to be mapped with context-aware configuration.
-
Method Details
-
isContextAwareConfig
Checks if the given class is suitable to be mapped with context-aware configuration. The given class has to be an annotation class, and theConfiguration
annotation has to be present.- Parameters:
clazz
- Given class- Returns:
- True if class is suitable for context-aware configuration
-
getConfigurationName
Get configuration name for given configuration annotation class.- Parameters:
clazz
- Annotation class- Returns:
- Configuration name
-
getPropertyName
Implements the method name mapping as defined in OSGi R6 Compendium specification, Chapter 112. Declarative Services Specification, Chapter 112.8.2.1. Component Property Mapping.- Parameters:
methodName
- Method name- Returns:
- Mapped property name
-
buildConfigurationMetadata
Build configuration metadata by parsing the given annotation interface class and it's configuration annotations.- Parameters:
clazz
- Configuration annotation class- Returns:
- Configuration metadata
-