Class ParameterFactory.AptParameter

    • Field Detail

      • param

        private final javax.lang.model.element.VariableElement param
      • qualifiedType

        private final java.lang.String qualifiedType
      • formatterClass

        private final java.lang.String formatterClass
      • isVarArgs

        private final boolean isVarArgs
      • isFormatArg

        private final boolean isFormatArg
    • 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, or null if none
        isVarArgs - true if this is a vararg parameter, otherwise false.
    • Method Detail

      • formatterClass

        public java.lang.String formatterClass()
        Description copied from interface: Parameter
        The formatter class, or null if there is none.
        Specified by:
        formatterClass in interface Parameter
        Returns:
        the formatter class
      • name

        public java.lang.String name()
        Description copied from interface: Parameter
        The variable name of the parameter.
        Specified by:
        name in interface Parameter
        Returns:
        the variable name of the parameter.
      • isArray

        public boolean isArray()
        Description copied from interface: Parameter
        Returns true if the type is an array, otherwise false.
        Specified by:
        isArray in interface Parameter
        Returns:
        true if an array, otherwise false
      • isPrimitive

        public boolean isPrimitive()
        Description copied from interface: Parameter
        Returns true if the type is a primitive type, otherwise false.
        Specified by:
        isPrimitive in interface Parameter
        Returns:
        true if primitive type, otherwise false
      • isVarArgs

        public boolean isVarArgs()
        Description copied from interface: Parameter
        Returns true if the parameter is a var args parameter, otherwise false.
        Specified by:
        isVarArgs in interface Parameter
        Returns:
        true if var args parameter, otherwise false.
      • 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 interface Parameter
        Returns:
        true if this parameter that should used as a format parameter for the message
      • targetName

        public java.lang.String 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 the return type. If no target name is defined an empty String is returned.
        Specified by:
        targetName in interface Parameter
        Returns:
        the target field name, method name or an empty string.
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface javax.lang.model.element.Element
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Specified by:
        equals in interface javax.lang.model.element.Element
        Overrides:
        equals in class java.lang.Object
      • compareTo

        public int compareTo​(Parameter other)
        Specified by:
        compareTo in interface java.lang.Comparable<Parameter>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDelegate

        public javax.lang.model.element.Element getDelegate()
        Description copied from interface: DelegatingElement
        The element to delegate the default methods to.
        Specified by:
        getDelegate in interface DelegatingElement
        Returns:
        the delegate