JBoss Logging I18n Annotation Processor 1.0.3.Final-redhat-2

org.jboss.logging.processor.model
Class ClassModelFactory

java.lang.Object
  extended by org.jboss.logging.processor.model.ClassModelFactory

public class ClassModelFactory
extends Object

Creates a class model for the message interface.

Author:
James R. Perkins

Method Summary
static ClassModel implementation(MessageInterface messageInterface, boolean useLogging31)
          Creates an implementation code model from the message interface.
static ClassModel translation(MessageInterface messageInterface, String translationSuffix, Map<MessageMethod,String> translations)
          Creates a class model for created translation implementations of the message interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

implementation

public static ClassModel implementation(MessageInterface messageInterface,
                                        boolean useLogging31)
                                 throws IllegalArgumentException
Creates an implementation code model from the message interface.

Parameters:
messageInterface - the message interface to implement.
Returns:
the class model used to implement the interface.
Throws:
IllegalArgumentException - if MessageInterface.isMessageBundle() or MessageInterface.isMessageLogger() returns false.

translation

public static ClassModel translation(MessageInterface messageInterface,
                                     String translationSuffix,
                                     Map<MessageMethod,String> translations)
                              throws IllegalArgumentException
Creates a class model for created translation implementations of the message interface.

Note: The implementation class must exist before the translation implementations can be created.

Parameters:
messageInterface - the message interface to implement.
translationSuffix - the translation locale suffix.
translations - a map of the translations for the methods.
Returns:
the class model used to create translation implementations of the interface.
Throws:
IllegalArgumentException - if MessageInterface.isMessageBundle() or MessageInterface.isMessageLogger() returns false.

JBoss Logging I18n Annotation Processor 1.0.3.Final-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.