Package org.jboss.logging.processor.apt
Class MessageInterfaceFactory.AptMessageInterface
java.lang.Object
org.jboss.logging.processor.apt.AbstractClassType
org.jboss.logging.processor.apt.MessageInterfaceFactory.AptMessageInterface
- All Implemented Interfaces:
Comparable<MessageInterface>
,AnnotatedConstruct
,Element
,Parameterizable
,QualifiedNameable
,TypeElement
,ClassType
,DelegatingElement
,DelegatingTypeElement
,JavaDocComment
,MessageInterface
- Enclosing class:
MessageInterfaceFactory
private static class MessageInterfaceFactory.AptMessageInterface
extends AbstractClassType
implements MessageInterface
Message interface implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Properties
private final Set
<MessageInterface> private String
private final TypeElement
private int
private final TypeElement
private final List
<MessageMethod> private String
private String
private String
private String
private final List
<ValidIdRange> Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
AptMessageInterface
(TypeElement interfaceElement, ProcessingEnvironment processingEnv, Properties expressionProperties, boolean addGeneratedAnnotation) -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
The properties used to resolve expressions.A set of qualified interface names this interface extends or an empty set.boolean
Checks the interface to see if thelogger interface
is being extended in this interface.Returns the type to use for the@Generated
annotation.The JavaDoc comments if available ornull
if there are no JavaDoc's present.The element to delegate the default methods to.int
The length to pad the id with.int
hashCode()
private void
init()
The fully qualified class name to use for log methods.methods()
A collection of all the methods this interface needs to implement.name()
The qualified name of the message interface.The package name of the message interface.The project code for the message interface ornull
if not annotated with@MessageBundle
or@MessageLogger
.The name of the interface without the package.toString()
Returns a list ofvalid id ranges
.Methods inherited from class org.jboss.logging.processor.apt.AbstractClassType
isAssignableFrom, isSameAs, isSubtypeOf
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jboss.logging.processor.model.ClassType
isAssignableFrom, isSameAs, isSubtypeOf
Methods inherited from interface org.jboss.logging.processor.model.DelegatingElement
accept, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getKind, getModifiers, isAnnotatedWith
Methods inherited from interface org.jboss.logging.processor.model.DelegatingTypeElement
asType, getEnclosedElements, getEnclosingElement, getInterfaces, getNestingKind, getQualifiedName, getSimpleName, getSuperclass, getTypeParameters
-
Field Details
-
interfaceElement
-
extendedInterfaces
-
messageMethods
-
validIdRanges
-
expressionProperties
-
generatedAnnotation
-
projectCode
-
packageName
-
simpleName
-
qualifiedName
-
fqcn
-
idLen
private int idLen
-
-
Constructor Details
-
AptMessageInterface
private AptMessageInterface(TypeElement interfaceElement, ProcessingEnvironment processingEnv, Properties expressionProperties, boolean addGeneratedAnnotation)
-
-
Method Details
-
extendsLoggerInterface
public boolean extendsLoggerInterface()Description copied from interface:MessageInterface
Checks the interface to see if thelogger interface
is being extended in this interface.- Specified by:
extendsLoggerInterface
in interfaceMessageInterface
- Returns:
true
if this interface extends the logger interface, otherwisefalse
.
-
name
Description copied from interface:MessageInterface
The qualified name of the message interface.- Specified by:
name
in interfaceMessageInterface
- Returns:
- the qualified name.
-
extendedInterfaces
Description copied from interface:MessageInterface
A set of qualified interface names this interface extends or an empty set.- Specified by:
extendedInterfaces
in interfaceMessageInterface
- Returns:
- a set of interface names or an empty set.
-
hashCode
public int hashCode() -
methods
Description copied from interface:MessageInterface
A collection of all the methods this interface needs to implement.- Specified by:
methods
in interfaceMessageInterface
- Returns:
- a collection of methods.
-
compareTo
- Specified by:
compareTo
in interfaceComparable<MessageInterface>
-
projectCode
Description copied from interface:MessageInterface
The project code for the message interface ornull
if not annotated with@MessageBundle
or@MessageLogger
.- Specified by:
projectCode
in interfaceMessageInterface
- Returns:
- the project code or
null
if not annotated with@MessageBundle
or@MessageLogger
-
init
private void init() -
packageName
Description copied from interface:MessageInterface
The package name of the message interface.- Specified by:
packageName
in interfaceMessageInterface
- Returns:
- the package name.
-
getComment
Description copied from interface:JavaDocComment
The JavaDoc comments if available ornull
if there are no JavaDoc's present.- Specified by:
getComment
in interfaceJavaDocComment
- Returns:
- the JavaDoc comments or
null
.
-
simpleName
Description copied from interface:MessageInterface
The name of the interface without the package.- Specified by:
simpleName
in interfaceMessageInterface
- Returns:
- the simple interface name.
-
loggingFQCN
Description copied from interface:MessageInterface
The fully qualified class name to use for log methods. This will generally be the same result asMessageInterface.name()
.- Specified by:
loggingFQCN
in interfaceMessageInterface
- Returns:
- the fully qualified class name to use for logging.
-
validIdRanges
Description copied from interface:MessageInterface
Returns a list ofvalid id ranges
.- Specified by:
validIdRanges
in interfaceMessageInterface
- Returns:
- a list of valid id ranges or an empty list
-
getIdLength
public int getIdLength()Description copied from interface:MessageInterface
The length to pad the id with. A value of less than 0 indicates no padding.- Specified by:
getIdLength
in interfaceMessageInterface
- Returns:
- the length to pad the id with
-
getDelegate
Description copied from interface:DelegatingElement
The element to delegate the default methods to.- Specified by:
getDelegate
in interfaceDelegatingElement
- Specified by:
getDelegate
in interfaceDelegatingTypeElement
- Returns:
- the delegate
-
generatedAnnotation
Description copied from interface:MessageInterface
Returns the type to use for the@Generated
annotation. This may returnnull
of the implementation should not be annotated.- Specified by:
generatedAnnotation
in interfaceMessageInterface
- Returns:
- the type for the generated annotation or
null
if no annotation is wanted
-
expressionProperties
Description copied from interface:MessageInterface
The properties used to resolve expressions.- Specified by:
expressionProperties
in interfaceMessageInterface
- Returns:
- the properties used to resolve expressions
-
equals
-
toString
-