Class VariableElementMetadata

java.lang.Object
de.floydkretschmar.fixturize.domain.VariableElementMetadata

public class VariableElementMetadata extends Object
The metadata generated for a given VariableElement.
  • Method Details

    • getName

      public String getName()
      Returns the name of the underlying variable element.
      Returns:
      the name
    • getModifiers

      public Set<Modifier> getModifiers()
      Returns the modifiers of the underlying varibale element.
      Returns:
      the modifiers
    • getConstantValue

      public Object getConstantValue()
      Returns the constant value of the underlying variable element. Null if the variable element does not have a defined constant value.
      Returns:
      the constant value
    • getAnnotationsByType

      public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationClass)
      Returns the annotations of the underlying variable element of the given type.
      Type Parameters:
      A - - the type of the annotation
      Parameters:
      annotationClass - - for which the annotations should be retrieved
      Returns:
      the annotations
    • toString

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

    • getTypedElement

      public Element getTypedElement()
      The element for which defines the type of the underlying variable element. If the variable element was typed by a generic, the type defining element will be the TypeElement of the concrete implementation class. If the variable element was typed by a non-generic, the type defining element will be the original VariableElement.