JBoss Logging I18n Tools 1.0.0.Beta7

org.jboss.logging
Class BaseAnnotations

java.lang.Object
  extended by org.jboss.logging.BaseAnnotations
All Implemented Interfaces:
Annotations

public class BaseAnnotations
extends Object
implements Annotations

Author:
James R. Perkins - 19.Feb.2011

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.logging.Annotations
Annotations.FormatType
 
Field Summary
static Class<org.jboss.logging.Cause> CAUSE_ANNOTATION
           
static Class<org.jboss.logging.FormatWith> FORMAT_WITH_ANNOTATION
           
static Class<org.jboss.logging.LogMessage> LOG_MESSAGE_ANNOTATION
           
static Class<org.jboss.logging.Message> MESSAGE_ANNOTATION
           
static Class<org.jboss.logging.MessageBundle> MESSAGE_BUNDLE_ANNOTATION
           
static Class<org.jboss.logging.MessageLogger> MESSAGE_LOGGER_ANNOTATION
           
 
Constructor Summary
BaseAnnotations()
           
 
Method Summary
 Class<? extends Annotation> cause()
          Returns the cause annotation class.
 Class<? extends Annotation> formatWith()
          Returns the format with annotation class.
 boolean hasMessageId(ExecutableElement method)
          Checks to see if the method has a message id.
 boolean inheritsMessageId(ExecutableElement method)
          Checks to see if the method should inherit the message id from a different method if applicable.
 String loggerMethod(ExecutableElement method, Annotations.FormatType formatType)
          Returns the logger method name to use.
 String logLevel(ExecutableElement method)
          Returns the log level enum.
 Class<? extends Annotation> logMessage()
          Returns the log message annotation class.
 Class<? extends Annotation> message()
          Returns the message annotation class.
 Class<? extends Annotation> messageBundle()
          Returns the message bundle annotation class.
 Annotations.FormatType messageFormat(ExecutableElement method)
          Returns the method format type.
 int messageId(ExecutableElement method)
          Returns the message id.
 Class<? extends Annotation> messageLogger()
          Returns the message logger annotation class.
 String messageValue(ExecutableElement method)
          Returns the message value for the method.
 String projectCode(TypeElement intf)
          The project code from the interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FORMAT_WITH_ANNOTATION

public static final Class<org.jboss.logging.FormatWith> FORMAT_WITH_ANNOTATION

CAUSE_ANNOTATION

public static final Class<org.jboss.logging.Cause> CAUSE_ANNOTATION

MESSAGE_BUNDLE_ANNOTATION

public static final Class<org.jboss.logging.MessageBundle> MESSAGE_BUNDLE_ANNOTATION

MESSAGE_LOGGER_ANNOTATION

public static final Class<org.jboss.logging.MessageLogger> MESSAGE_LOGGER_ANNOTATION

LOG_MESSAGE_ANNOTATION

public static final Class<org.jboss.logging.LogMessage> LOG_MESSAGE_ANNOTATION

MESSAGE_ANNOTATION

public static final Class<org.jboss.logging.Message> MESSAGE_ANNOTATION
Constructor Detail

BaseAnnotations

public BaseAnnotations()
Method Detail

cause

public Class<? extends Annotation> cause()
Description copied from interface: Annotations
Returns the cause annotation class.

Specified by:
cause in interface Annotations
Returns:
the cause annotation.

formatWith

public Class<? extends Annotation> formatWith()
Description copied from interface: Annotations
Returns the format with annotation class.

Specified by:
formatWith in interface Annotations
Returns:
the format with annotation.

logMessage

public Class<? extends Annotation> logMessage()
Description copied from interface: Annotations
Returns the log message annotation class.

Specified by:
logMessage in interface Annotations
Returns:
the log message annotation.

message

public Class<? extends Annotation> message()
Description copied from interface: Annotations
Returns the message annotation class.

Specified by:
message in interface Annotations
Returns:
the message annotation.

messageBundle

public Class<? extends Annotation> messageBundle()
Description copied from interface: Annotations
Returns the message bundle annotation class.

Specified by:
messageBundle in interface Annotations
Returns:
the message bundle annotation.

messageLogger

public Class<? extends Annotation> messageLogger()
Description copied from interface: Annotations
Returns the message logger annotation class.

Specified by:
messageLogger in interface Annotations
Returns:
the message logger annotation.

messageFormat

public Annotations.FormatType messageFormat(ExecutableElement method)
Description copied from interface: Annotations
Returns the method format type.

Specified by:
messageFormat in interface Annotations
Parameters:
method - the method with the Message annotation.
Returns:
the format type of the message or null if the format type was not found.

projectCode

public String projectCode(TypeElement intf)
Description copied from interface: Annotations
The project code from the interface.

Specified by:
projectCode in interface Annotations
Parameters:
intf - the interface to find the project code on.
Returns:
the project code or null if one was not found.

hasMessageId

public boolean hasMessageId(ExecutableElement method)
Description copied from interface: Annotations
Checks to see if the method has a message id.

Specified by:
hasMessageId in interface Annotations
Parameters:
method - the method to check.
Returns:
true if the message id was found, otherwise false.

inheritsMessageId

public boolean inheritsMessageId(ExecutableElement method)
Description copied from interface: Annotations
Checks to see if the method should inherit the message id from a different method if applicable.

Specified by:
inheritsMessageId in interface Annotations
Parameters:
method - the method to check.
Returns:
true if the message id should be inherited, otherwise false.

messageId

public int messageId(ExecutableElement method)
Description copied from interface: Annotations
Returns the message id.

Specified by:
messageId in interface Annotations
Parameters:
method - the method to check.
Returns:
the message id or 0 if one was not found.

messageValue

public String messageValue(ExecutableElement method)
Description copied from interface: Annotations
Returns the message value for the method.

Specified by:
messageValue in interface Annotations
Parameters:
method - the method to check.
Returns:
the message for the method, if no method found null is returned.

loggerMethod

public String loggerMethod(ExecutableElement method,
                           Annotations.FormatType formatType)
Description copied from interface: Annotations
Returns the logger method name to use.

Specified by:
loggerMethod in interface Annotations
Parameters:
method - the method used to determine the log method.
formatType - the format type for the method.
Returns:
the name of the logger method.

logLevel

public String logLevel(ExecutableElement method)
Description copied from interface: Annotations
Returns the log level enum. For example Logger.Level.INFO.

Specified by:
logLevel in interface Annotations
Parameters:
method - the method used to determine the log method.
Returns:
the log level.

JBoss Logging I18n Tools 1.0.0.Beta7

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