public class AptHelperImpl extends Object implements AptHelper
| Constructor and Description |
|---|
AptHelperImpl() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMessageId(javax.lang.model.element.ExecutableElement method)
Checks to see if the method has a message id.
|
boolean |
inheritsMessageId(javax.lang.model.element.ExecutableElement method)
Checks to see if the method should inherit the message id from a different method if applicable.
|
String |
loggerMethod(Annotations.FormatType formatType)
Returns the logger method name to use or an empty string if the method is not a logger method.
|
String |
logLevel(javax.lang.model.element.ExecutableElement method)
Returns the log level enum.
|
Annotations.FormatType |
messageFormat(javax.lang.model.element.ExecutableElement method)
Returns the method format type.
|
int |
messageId(javax.lang.model.element.ExecutableElement method)
Returns the message id.
|
String |
messageValue(javax.lang.model.element.ExecutableElement method)
Returns the message value for the method.
|
String |
projectCode(javax.lang.model.element.TypeElement intf)
The project code from the interface.
|
String |
targetName(javax.lang.model.element.VariableElement param)
Returns the target field or method name for the annotated parameter.
|
public Annotations.FormatType messageFormat(javax.lang.model.element.ExecutableElement method)
AptHelpermessageFormat in interface AptHelpermethod - the method with the Message annotation.null if the format type
was not found.public String projectCode(javax.lang.model.element.TypeElement intf)
AptHelperprojectCode in interface AptHelperintf - the interface to find the project code on.null if one was not found.public boolean hasMessageId(javax.lang.model.element.ExecutableElement method)
AptHelperhasMessageId in interface AptHelpermethod - the method to check.true if the message id was found, otherwise false.public boolean inheritsMessageId(javax.lang.model.element.ExecutableElement method)
AptHelperinheritsMessageId in interface AptHelpermethod - the method to check.true if the message id should be inherited, otherwise false.public int messageId(javax.lang.model.element.ExecutableElement method)
AptHelperpublic String messageValue(javax.lang.model.element.ExecutableElement method)
AptHelpermessageValue in interface AptHelpermethod - the method to check.null is
returned.public String loggerMethod(Annotations.FormatType formatType)
AptHelperloggerMethod in interface AptHelperformatType - the format type for the method.public String logLevel(javax.lang.model.element.ExecutableElement method)
AptHelperpublic String targetName(javax.lang.model.element.VariableElement param)
AptHelperAnnotations.field() or
Annotations.property() an empty string should be returned.
If the parameter is annotated with Annotations.property(), the name should
be prepended with set. For example a property name of value should return setValue.
If the annotation does not have a defined value, the parameter name should be returned.targetName in interface AptHelperparam - the parameter to check for the annotation.Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.