IAnalyzeUnit

public interface IAnalyzeUnit extends IUnit

Unit representing an analyzed source file. An analyze unit can be passed to the ITransformService to transform the parse unit into a ITransformUnit

Methods

context

IContext context()
Returns:The context that was used during analysis.

duration

long duration()
Returns:Analysis duration in nanoseconds, or -1 if the duration is unknown.

input

IParseUnit input()
Returns:The parse unit this unit was made with.

messages

Iterable<IMessage> messages()
Returns:Messages produced by the analyzer.

success

boolean success()
Returns:True if analysis was successful, i.e. the analyzed produced a result and no errors were encountered. False otherwise.

valid

boolean valid()
Returns:True if this unit is valid, i.e. the analyzer analyzed the parse unit without exceptions. Even when the unit is valid, it may still be unsuccessful, use success() to check for that.