Package org.jboss.logging.processor.apt
Class ParameterFactory.AptParameter
- java.lang.Object
-
- org.jboss.logging.processor.apt.AbstractClassType
-
- org.jboss.logging.processor.apt.ParameterFactory.AptParameter
-
- All Implemented Interfaces:
java.lang.Comparable<Parameter>,javax.lang.model.AnnotatedConstruct,javax.lang.model.element.Element,ClassType,DelegatingElement,Parameter
- Enclosing class:
- ParameterFactory
private static class ParameterFactory.AptParameter extends AbstractClassType implements Parameter
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringformatterClassprivate booleanisFormatArgprivate booleanisVarArgsprivate javax.lang.model.element.VariableElementparamprivate java.lang.StringqualifiedType-
Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
-
Constructor Summary
Constructors Constructor Description AptParameter(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.String qualifiedType, javax.lang.model.element.VariableElement param, java.lang.String formatterClass, boolean isVarArgs)Only allow construction from within the parent class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(Parameter other)booleanequals(java.lang.Object obj)java.lang.StringformatterClass()The formatter class, ornullif there is none.javax.lang.model.element.ElementgetDelegate()The element to delegate the default methods to.inthashCode()booleanisArray()Returnstrueif the type is an array, otherwisefalse.booleanisFormatParameter()Indicates whether or not the parameter is used a format parameter for the message.booleanisPrimitive()Returnstrueif the type is a primitive type, otherwisefalse.booleanisVarArgs()Returnstrueif the parameter is a var args parameter, otherwisefalse.java.lang.Stringname()The variable name of the parameter.java.lang.StringtargetName()Returns the name of the target field or method.java.lang.StringtoString()-
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, asType, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWith
-
Methods inherited from interface org.jboss.logging.processor.model.Parameter
isMessageMethod
-
-
-
-
Constructor Detail
-
AptParameter
AptParameter(javax.annotation.processing.ProcessingEnvironment processingEnv, java.lang.String qualifiedType, javax.lang.model.element.VariableElement param, java.lang.String formatterClass, boolean isVarArgs)Only allow construction from within the parent class.- Parameters:
processingEnv- the annotation processing environment.qualifiedType- the qualified type name of the parameter.param- the parameter.formatterClass- the formatter class, ornullif noneisVarArgs-trueif this is a vararg parameter, otherwisefalse.
-
-
Method Detail
-
formatterClass
public java.lang.String formatterClass()
Description copied from interface:ParameterThe formatter class, ornullif there is none.- Specified by:
formatterClassin interfaceParameter- Returns:
- the formatter class
-
name
public java.lang.String name()
Description copied from interface:ParameterThe variable name of the parameter.
-
isArray
public boolean isArray()
Description copied from interface:ParameterReturnstrueif the type is an array, otherwisefalse.
-
isPrimitive
public boolean isPrimitive()
Description copied from interface:ParameterReturnstrueif the type is a primitive type, otherwisefalse.- Specified by:
isPrimitivein interfaceParameter- Returns:
trueif primitive type, otherwisefalse
-
isVarArgs
public boolean isVarArgs()
Description copied from interface:ParameterReturnstrueif the parameter is a var args parameter, otherwisefalse.
-
isFormatParameter
public boolean isFormatParameter()
Description copied from interface:ParameterIndicates whether or not the parameter is used a format parameter for the message.- Specified by:
isFormatParameterin interfaceParameter- Returns:
trueif this parameter that should used as a format parameter for the message
-
targetName
public java.lang.String targetName()
Description copied from interface:ParameterReturns the name of the target field or method. For example if the parameter is annotated with@Fieldthe target name is the name of the field to set on thereturn type. If no target name is defined an empty String is returned.- Specified by:
targetNamein interfaceParameter- Returns:
- the target field name, method name or an empty string.
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacejavax.lang.model.element.Element- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equalsin interfacejavax.lang.model.element.Element- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(Parameter other)
- Specified by:
compareToin interfacejava.lang.Comparable<Parameter>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDelegate
public javax.lang.model.element.Element getDelegate()
Description copied from interface:DelegatingElementThe element to delegate the default methods to.- Specified by:
getDelegatein interfaceDelegatingElement- Returns:
- the delegate
-
-