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 Stringprivate final booleanprivate final booleanprivate final VariableElementprivate final StringFields 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 TypeMethodDescriptionintbooleanThe formatter class, ornullif there is none.The element to delegate the default methods to.inthashCode()booleanisArray()Returnstrueif the type is an array, otherwisefalse.booleanIndicates whether or not the parameter is used a format parameter for the message.booleanReturnstrueif the type is a primitive type, otherwisefalse.booleanReturnstrueif 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, isSubtypeOfMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.jboss.logging.processor.model.ClassType
isAssignableFrom, isSameAs, isSubtypeOfMethods inherited from interface org.jboss.logging.processor.model.DelegatingElement
accept, asType, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, isAnnotatedWithMethods 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, ornullif noneisVarArgs-trueif this is a vararg parameter, otherwisefalse.
-
-
Method Details
-
formatterClass
Description copied from interface:ParameterThe formatter class, ornullif there is none.- Specified by:
formatterClassin interfaceParameter- Returns:
- the formatter class
-
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
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() -
equals
-
compareTo
- Specified by:
compareToin interfaceComparable<Parameter>
-
toString
-
getDelegate
Description copied from interface:DelegatingElementThe element to delegate the default methods to.- Specified by:
getDelegatein interfaceDelegatingElement- Returns:
- the delegate
-