Interface ISourceUnit

All Superinterfaces:
IAddressableUnit, IEventSource, IInteractiveUnit, IUnit, IUnitCreator, IUserDataSupport
All Known Subinterfaces:
IJavaSourceUnit, INativeSourceUnit

public interface ISourceUnit extends IInteractiveUnit
This interface is used to represent source code abstract syntax trees (AST). Such units are produced by IDecompilerUnits.
  • Method Details

    • getDecompiler

      IDecompilerUnit getDecompiler()
      Get the decompiler unit (possibly the parent, possibly null) that generated this unit.
      Returns:
      a decompiler unit, possibly null
    • getFileExtension

      String getFileExtension()
      Get the ideal or most commonly accepted file extension for the code represented by this source unit.
      Returns:
      an extension string (not prefixed by dot), or null if unknown
    • getFullyQualifiedName

      String getFullyQualifiedName()
      Get the fully-qualified, original name of this source entity. Since ISourceUnit are normally produced by decompilers, this method will likely return a class or method name.
      Returns:
      the name
    • getSourceDocument

      ITextDocument getSourceDocument()
      Get the text document representing the decompiled source.

      The caller is responsible for disposing the returned document after usage.

      Returns:
    • getSource

      String getSource()
      Generate the decompiled source text. Convenience method.
      Returns: