Class ElementsFinder

java.lang.Object
me.bristermitten.mittenlib.annotations.util.ElementsFinder

public class ElementsFinder extends Object
Helper class for working with Elements
  • Constructor Details

  • Method Details

    • getApplicableVariableElements

      public List<VariableElement> getApplicableVariableElements(TypeElement rootElement)
      Get all the VariableElements in a given TypeElement that should be included in the generated config class.

      This does not include fields with the transient or static modifiers, or fields inherited from superclasses.

      Parameters:
      rootElement - The element to find variables in
      Returns:
      All the VariableElements in the given element that are suitable for config generation
    • getAllMethods

      public List<ExecutableElement> getAllMethods(TypeElement rootElement)
      Get all the methods in a given TypeElement, including inherited ones. This will only return methods, not constructors or initializers.
      Parameters:
      rootElement - The type to search for methods
      Returns:
      All the methods in the given type
    • getPropertyMethods

      public List<ExecutableElement> getPropertyMethods(TypeElement rootElement)