JBoss Logging I18n Tools 1.0.0.Beta7

org.jboss.logging.generator
Class TranslationFileGenerator

java.lang.Object
  extended by org.jboss.logging.AbstractTool
      extended by org.jboss.logging.generator.TranslationFileGenerator

@SupportedOptions(value="generatedTranslationFilesPath")
public final class TranslationFileGenerator
extends AbstractTool

The generator of skeletal translations files.

Author:
Kevin Pollet - SERLI - (kevin.pollet@serli.com)

Field Summary
static String GENERATED_FILE_EXTENSION
           
static String GENERATED_FILES_PATH_OPTION
           
 
Constructor Summary
TranslationFileGenerator(ProcessingEnvironment processingEnv)
          The constructor.
 
Method Summary
 void generateSkeletalTranslationFile(String relativePath, String fileName, MethodDescriptors methodDescriptors)
          Generate the translation file containing the given translations.
 void processTypeElement(TypeElement annotation, TypeElement element, MethodDescriptors methodDescriptors)
          Processes a type element.
 
Methods inherited from class org.jboss.logging.AbstractTool
elementUtils, filer, getName, getSupportedOptions, logger, processingEnv, typeUtils
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GENERATED_FILES_PATH_OPTION

public static final String GENERATED_FILES_PATH_OPTION
See Also:
Constant Field Values

GENERATED_FILE_EXTENSION

public static final String GENERATED_FILE_EXTENSION
See Also:
Constant Field Values
Constructor Detail

TranslationFileGenerator

public TranslationFileGenerator(ProcessingEnvironment processingEnv)
The constructor.

Parameters:
processingEnv - the processing env
Method Detail

processTypeElement

public void processTypeElement(TypeElement annotation,
                               TypeElement element,
                               MethodDescriptors methodDescriptors)
Processes a type element.

Specified by:
processTypeElement in class AbstractTool
Parameters:
annotation - the annotation who trigger the processing
element - the element that contains the methods.
methodDescriptors - the method descriptors.

generateSkeletalTranslationFile

public void generateSkeletalTranslationFile(String relativePath,
                                            String fileName,
                                            MethodDescriptors methodDescriptors)
Generate the translation file containing the given translations.

Parameters:
relativePath - the relative path
fileName - the file name
translations - the translations

JBoss Logging I18n Tools 1.0.0.Beta7

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.