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:
Comparable<Parameter>
,AnnotatedConstruct
,Element
,ClassType
,DelegatingElement
,Parameter
- Enclosing class:
- ParameterFactory
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final boolean
private final boolean
private final VariableElement
private final String
Fields inherited from class org.jboss.logging.processor.apt.AbstractClassType
elements, processingEnv, typeMirror, types
-
Constructor Summary
ConstructorsConstructorDescriptionAptParameter
(ProcessingEnvironment processingEnv, String qualifiedType, VariableElement param, String formatterClass, boolean isVarArgs) Only allow construction from within the parent class. -
Method Summary
Modifier and TypeMethodDescriptionint
boolean
The formatter class, ornull
if there is none.The element to delegate the default methods to.int
hashCode()
boolean
isArray()
Returnstrue
if the type is an array, otherwisefalse
.boolean
Indicates whether or not the parameter is used a format parameter for the message.boolean
Returnstrue
if the type is a primitive type, otherwisefalse
.boolean
Returnstrue
if the parameter is a var args parameter, otherwisefalse
.name()
The variable name of the parameter.Returns the name of the target field or method.toString()
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
-
Field Details
-
param
-
qualifiedType
-
formatterClass
-
isVarArgs
private final boolean isVarArgs -
isFormatArg
private final boolean isFormatArg
-
-
Constructor Details
-
AptParameter
AptParameter(ProcessingEnvironment processingEnv, String qualifiedType, VariableElement param, 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, ornull
if noneisVarArgs
-true
if this is a vararg parameter, otherwisefalse
.
-
-
Method Details
-
formatterClass
Description copied from interface:Parameter
The formatter class, ornull
if there is none.- Specified by:
formatterClass
in interfaceParameter
- Returns:
- the formatter class
-
name
Description copied from interface:Parameter
The variable name of the parameter. -
isArray
public boolean isArray()Description copied from interface:Parameter
Returnstrue
if the type is an array, otherwisefalse
. -
isPrimitive
public boolean isPrimitive()Description copied from interface:Parameter
Returnstrue
if the type is a primitive type, otherwisefalse
.- Specified by:
isPrimitive
in interfaceParameter
- Returns:
true
if primitive type, otherwisefalse
-
isVarArgs
public boolean isVarArgs()Description copied from interface:Parameter
Returnstrue
if the parameter is a var args parameter, otherwisefalse
. -
isFormatParameter
public boolean isFormatParameter()Description copied from interface:Parameter
Indicates whether or not the parameter is used a format parameter for the message.- Specified by:
isFormatParameter
in interfaceParameter
- Returns:
true
if this parameter that should used as a format parameter for the message
-
targetName
Description copied from interface:Parameter
Returns the name of the target field or method. For example if the parameter is annotated with@Field
the 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:
targetName
in interfaceParameter
- Returns:
- the target field name, method name or an empty string.
-
hashCode
public int hashCode() -
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Parameter>
-
toString
-
getDelegate
Description copied from interface:DelegatingElement
The element to delegate the default methods to.- Specified by:
getDelegate
in interfaceDelegatingElement
- Returns:
- the delegate
-