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

private static class ParameterFactory.AptParameter extends AbstractClassType implements Parameter
  • Field Details

    • param

      private final VariableElement param
    • qualifiedType

      private final String qualifiedType
    • formatterClass

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

    • formatterClass

      public 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 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 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 Element
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface Element
      Overrides:
      equals in class Object
    • compareTo

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

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

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