JBoss Logging I18n Tools 1.0.0.Beta7

org.jboss.logging.validation.validator
Class LoggerReturnTypeValidator

java.lang.Object
  extended by org.jboss.logging.validation.validator.LoggerReturnTypeValidator
All Implemented Interfaces:
ElementValidator

public class LoggerReturnTypeValidator
extends Object

Validates the return type for logger methods.

Must have a return type of void.

Author:
James R. Perkins

Constructor Summary
LoggerReturnTypeValidator(Types typeUtil)
           
 
Method Summary
 Collection<ValidationMessage> checkExceptionConstructor(ExecutableElement method)
          Validates the exception constructor.
 Collection<ValidationMessage> checkMessageBundleMethod(TypeElement root, ExecutableElement method)
          Validates a message bundle method.
 Collection<ValidationMessage> validate(TypeElement element, Collection<ExecutableElement> elementMethods)
          Validates the collection of methods that were passed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerReturnTypeValidator

public LoggerReturnTypeValidator(Types typeUtil)
Method Detail

validate

public Collection<ValidationMessage> validate(TypeElement element,
                                              Collection<ExecutableElement> elementMethods)
Validates the collection of methods that were passed.

Parameters:
element - the root element, generally the interface.
elementMethods - the methods of the interface.
Returns:
a collection of messages or a an empty collection if no errors or warnings were found.

checkMessageBundleMethod

public final Collection<ValidationMessage> checkMessageBundleMethod(TypeElement root,
                                                                    ExecutableElement method)
Validates a message bundle method.

Parameters:
root - the interface.
method - the method to validate.
Returns:
a collection of validation messages or an empty collection.

checkExceptionConstructor

public final Collection<ValidationMessage> checkExceptionConstructor(ExecutableElement method)
Validates the exception constructor.

Parameters:
method - the method to validate.
Returns:
a collection of validation messages or an empty collection.

JBoss Logging I18n Tools 1.0.0.Beta7

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