Package org.tentackle.buildsupport
Class BundleHandler
- java.lang.Object
-
- org.tentackle.buildsupport.AbstractAnalyzeHandler
-
- org.tentackle.buildsupport.BundleHandler
-
- All Implemented Interfaces:
AnalyzeHandler
- Direct Known Subclasses:
FxControllerBundleHandler
public class BundleHandler extends AbstractAnalyzeHandler
Handler to extract the name of the resource bundle from the class annotated with @Bundle.- Author:
- harald
-
-
Constructor Summary
Constructors Constructor Description BundleHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringgetBundleName(javax.lang.model.element.Element element, java.lang.String annotationName)Gets the bundlename from the annotated element.AnalyzeProcessorgetProcessor()Gets the annotation processor.voidprocessAnnotation(javax.lang.model.element.TypeElement annotationType, javax.annotation.processing.RoundEnvironment roundEnv)Processes the annotation.voidsetProcessor(AnalyzeProcessor processor)Sets the annotation processor.protected java.lang.StringxlateBundleName(java.lang.String bundleName)Translates the bundle name to a standard format.-
Methods inherited from class org.tentackle.buildsupport.AbstractAnalyzeHandler
getDirectory
-
-
-
-
Method Detail
-
setProcessor
public void setProcessor(AnalyzeProcessor processor)
Description copied from interface:AnalyzeHandlerSets the annotation processor.- Parameters:
processor- the annotation processor
-
getProcessor
public AnalyzeProcessor getProcessor()
Description copied from interface:AnalyzeHandlerGets the annotation processor.- Returns:
- the annotation processor
-
processAnnotation
public void processAnnotation(javax.lang.model.element.TypeElement annotationType, javax.annotation.processing.RoundEnvironment roundEnv)Description copied from interface:AnalyzeHandlerProcesses the annotation.- Parameters:
annotationType- the annotation typeroundEnv- the processing environment
-
getBundleName
protected java.lang.String getBundleName(javax.lang.model.element.Element element, java.lang.String annotationName)Gets the bundlename from the annotated element.- Parameters:
element- the bundle nameannotationName- the annotation name (e.g. ...Bundle)- Returns:
- the bundle name, null if no bundle
-
xlateBundleName
protected java.lang.String xlateBundleName(java.lang.String bundleName)
Translates the bundle name to a standard format.- Parameters:
bundleName- the name- Returns:
- the standardized name in dot format (without .class)
-
-