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:
java.lang.Comparable<MessageInterface>,javax.lang.model.AnnotatedConstruct,javax.lang.model.element.Element,javax.lang.model.element.Parameterizable,javax.lang.model.element.QualifiedNameable,javax.lang.model.element.TypeElement,ClassType,DelegatingElement,DelegatingTypeElement,JavaDocComment,MessageInterface
- Enclosing class:
- MessageInterfaceFactory
private static class MessageInterfaceFactory.AptMessageInterface extends AbstractClassType implements MessageInterface
Message interface implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.PropertiesexpressionPropertiesprivate java.util.Set<MessageInterface>extendedInterfacesprivate java.lang.Stringfqcnprivate javax.lang.model.element.TypeElementgeneratedAnnotationprivate intidLenprivate javax.lang.model.element.TypeElementinterfaceElementprivate java.util.List<MessageMethod>messageMethodsprivate java.lang.StringpackageNameprivate java.lang.StringprojectCodeprivate java.lang.StringqualifiedNameprivate java.lang.StringsimpleNameprivate java.util.List<ValidIdRange>validIdRanges-
Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
-
Constructor Summary
Constructors Modifier Constructor Description privateAptMessageInterface(javax.lang.model.element.TypeElement interfaceElement, javax.annotation.processing.ProcessingEnvironment processingEnv, java.util.Properties expressionProperties, boolean addGeneratedAnnotation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(MessageInterface o)booleanequals(java.lang.Object obj)java.util.PropertiesexpressionProperties()The properties used to resolve expressions.java.util.Set<MessageInterface>extendedInterfaces()A set of qualified interface names this interface extends or an empty set.booleanextendsLoggerInterface()Checks the interface to see if thelogger interfaceis being extended in this interface.javax.lang.model.element.TypeElementgeneratedAnnotation()Returns the type to use for the@Generatedannotation.java.lang.StringgetComment()The JavaDoc comments if available ornullif there are no JavaDoc's present.javax.lang.model.element.TypeElementgetDelegate()The element to delegate the default methods to.intgetIdLength()The length to pad the id with.inthashCode()private voidinit()java.lang.StringloggingFQCN()The fully qualified class name to use for log methods.java.util.Collection<MessageMethod>methods()A collection of all the methods this interface needs to implement.java.lang.Stringname()The qualified name of the message interface.java.lang.StringpackageName()The package name of the message interface.java.lang.StringprojectCode()The project code for the message interface ornullif not annotated with@MessageBundleor@MessageLogger.java.lang.StringsimpleName()The name of the interface without the package.java.lang.StringtoString()java.util.List<ValidIdRange>validIdRanges()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 Detail
-
interfaceElement
private final javax.lang.model.element.TypeElement interfaceElement
-
extendedInterfaces
private final java.util.Set<MessageInterface> extendedInterfaces
-
messageMethods
private final java.util.List<MessageMethod> messageMethods
-
validIdRanges
private final java.util.List<ValidIdRange> validIdRanges
-
expressionProperties
private final java.util.Properties expressionProperties
-
generatedAnnotation
private final javax.lang.model.element.TypeElement generatedAnnotation
-
projectCode
private java.lang.String projectCode
-
packageName
private java.lang.String packageName
-
simpleName
private java.lang.String simpleName
-
qualifiedName
private java.lang.String qualifiedName
-
fqcn
private java.lang.String fqcn
-
idLen
private int idLen
-
-
Method Detail
-
extendsLoggerInterface
public boolean extendsLoggerInterface()
Description copied from interface:MessageInterfaceChecks the interface to see if thelogger interfaceis being extended in this interface.- Specified by:
extendsLoggerInterfacein interfaceMessageInterface- Returns:
trueif this interface extends the logger interface, otherwisefalse.
-
name
public java.lang.String name()
Description copied from interface:MessageInterfaceThe qualified name of the message interface.- Specified by:
namein interfaceMessageInterface- Returns:
- the qualified name.
-
extendedInterfaces
public java.util.Set<MessageInterface> extendedInterfaces()
Description copied from interface:MessageInterfaceA set of qualified interface names this interface extends or an empty set.- Specified by:
extendedInterfacesin interfaceMessageInterface- Returns:
- a set of interface names or an empty set.
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejavax.lang.model.element.Element- Overrides:
hashCodein classjava.lang.Object
-
methods
public java.util.Collection<MessageMethod> methods()
Description copied from interface:MessageInterfaceA collection of all the methods this interface needs to implement.- Specified by:
methodsin interfaceMessageInterface- Returns:
- a collection of methods.
-
compareTo
public int compareTo(MessageInterface o)
- Specified by:
compareToin interfacejava.lang.Comparable<MessageInterface>
-
projectCode
public java.lang.String projectCode()
Description copied from interface:MessageInterfaceThe project code for the message interface ornullif not annotated with@MessageBundleor@MessageLogger.- Specified by:
projectCodein interfaceMessageInterface- Returns:
- the project code or
nullif not annotated with@MessageBundleor@MessageLogger
-
init
private void init()
-
packageName
public java.lang.String packageName()
Description copied from interface:MessageInterfaceThe package name of the message interface.- Specified by:
packageNamein interfaceMessageInterface- Returns:
- the package name.
-
getComment
public java.lang.String getComment()
Description copied from interface:JavaDocCommentThe JavaDoc comments if available ornullif there are no JavaDoc's present.- Specified by:
getCommentin interfaceJavaDocComment- Returns:
- the JavaDoc comments or
null.
-
simpleName
public java.lang.String simpleName()
Description copied from interface:MessageInterfaceThe name of the interface without the package.- Specified by:
simpleNamein interfaceMessageInterface- Returns:
- the simple interface name.
-
loggingFQCN
public java.lang.String loggingFQCN()
Description copied from interface:MessageInterfaceThe fully qualified class name to use for log methods. This will generally be the same result asMessageInterface.name().- Specified by:
loggingFQCNin interfaceMessageInterface- Returns:
- the fully qualified class name to use for logging.
-
validIdRanges
public java.util.List<ValidIdRange> validIdRanges()
Description copied from interface:MessageInterfaceReturns a list ofvalid id ranges.- Specified by:
validIdRangesin interfaceMessageInterface- Returns:
- a list of valid id ranges or an empty list
-
getIdLength
public int getIdLength()
Description copied from interface:MessageInterfaceThe length to pad the id with. A value of less than 0 indicates no padding.- Specified by:
getIdLengthin interfaceMessageInterface- Returns:
- the length to pad the id with
-
getDelegate
public javax.lang.model.element.TypeElement getDelegate()
Description copied from interface:DelegatingElementThe element to delegate the default methods to.- Specified by:
getDelegatein interfaceDelegatingElement- Specified by:
getDelegatein interfaceDelegatingTypeElement- Returns:
- the delegate
-
generatedAnnotation
public javax.lang.model.element.TypeElement generatedAnnotation()
Description copied from interface:MessageInterfaceReturns the type to use for the@Generatedannotation. This may returnnullof the implementation should not be annotated.- Specified by:
generatedAnnotationin interfaceMessageInterface- Returns:
- the type for the generated annotation or
nullif no annotation is wanted
-
expressionProperties
public java.util.Properties expressionProperties()
Description copied from interface:MessageInterfaceThe properties used to resolve expressions.- Specified by:
expressionPropertiesin interfaceMessageInterface- Returns:
- the properties used to resolve expressions
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejavax.lang.model.element.Element- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-