Interface ISourceUnit
- All Superinterfaces:
IAddressableUnit,IEventSource,IInteractiveUnit,IUnit,IUnitCreator,IUserDataSupport
- All Known Subinterfaces:
IJavaSourceUnit,INativeSourceUnit
This interface is used to represent source code abstract syntax trees (AST). Such units are
produced by
IDecompilerUnits.-
Method Summary
Modifier and TypeMethodDescriptionGet the decompiler unit (possibly the parent, possibly null) that generated this unit.Get the ideal or most commonly accepted file extension for the code represented by this source unit.Get the fully-qualified, original name of this source entity.Generate the decompiled source text.Get the text document representing the decompiled source.Methods inherited from interface com.pnfsoftware.jeb.core.units.IAddressableUnit
getAddressLabel, getAddressLabels, getAddressOfItem, getCanonicalAddress, getItemAtAddress, getItemObject, getRelatedItems, getWellKnownAddresses, isValidAddressMethods inherited from interface com.pnfsoftware.jeb.util.events.IEventSource
addListener, countListeners, getListeners, getParentSource, insertListener, notifyListeners, removeListener, setParentSourceMethods inherited from interface com.pnfsoftware.jeb.core.units.IInteractiveUnit
addressToLocation, canExecuteAction, executeAction, executeAction, getAddressActions, getCommentManager, getFullComment, getFullComments, getGlobalActions, getInlineComment, getInlineComments, getItemActions, getMetadataManager, locationToAddress, prepareExecution, setInlineCommentMethods inherited from interface com.pnfsoftware.jeb.core.units.IUnit
addChild, addChild, canBePersisted, dispose, execprvfunc, generateQuickState, getChildren, getContributions, getCreationTimestamp, getDescription, getExtraInputs, getFormatter, getFormatType, getIconData, getInput, getInterpreters, getLock, getName, getNotes, getNotificationManager, getParent, getParentArtifact, getParentProject, getPropertyDefinitionManager, getPropertyManager, getRealName, getStatus, getUid, getUnitProcessor, initializePropertyObjects, isDisposed, isProcessed, isStale, isTransientChild, notifyGenericChange, postDeserialization, process, removeChild, setName, setNotes, setParent, setRealName, setUnitProcessorMethods inherited from interface com.pnfsoftware.jeb.core.IUserDataSupport
clearAllData, getAllData, getData, setData
-
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. SinceISourceUnitare 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:
-