Interface Tracability

All Known Subinterfaces:
CodeGenerationContext, TransformationContext, ValidationContext

@Beta public interface Tracability
Support for navigating between the primary AST structure representing the Xtend code and the corresponding Java elements derived from that.
Author:
Sven Efftinge
See Also:
  • Method Details

    • isSource

      boolean isSource(Element element)
      Parameters:
      element -
      Returns:
      whether the given element is a source (i.e Xtend) element.
      Since:
      2.7
    • isGenerated

      boolean isGenerated(Element element)
      Parameters:
      element -
      Returns:
      whether the given element is a Java element derived from the currently processed CompilationUnit
      Since:
      2.7
    • isExternal

      boolean isExternal(Element element)
      Parameters:
      element -
      Returns:
      whether the given element is a Java element not derived from the currently processed CompilationUnit
      Since:
      2.7
    • getPrimaryGeneratedJavaElement

      Element getPrimaryGeneratedJavaElement(Element source)
      Parameters:
      source -
      Returns:
      the primary generated element (Java) derived from the given source element (Xtend).
      Since:
      2.7
    • isThePrimaryGeneratedJavaElement

      boolean isThePrimaryGeneratedJavaElement(Element target)
      Parameters:
      target -
      Returns:
      whether this element was already present in the Xtend source AST.
      Since:
      2.7
    • getPrimarySourceElement

      Element getPrimarySourceElement(Element target)
      Parameters:
      target -
      Returns:
      the source element (Xtend) the given target (Java) element is derived from
      Since:
      2.7