ITransformUnit

public interface ITransformUnit<I extends IUnit> extends IUnit

Unit representing a transformed source file.

Parameters:
  • <I> – Type of input unit.

Methods

action

TransformActionContrib action()
Returns:The action that was used to execute the transformation.

context

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

duration

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

input

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

messages

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

outputs

Iterable<? extends ITransformOutput> outputs()
Returns:Outputs of the transformation. Empty if valid() returns false.

success

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

valid

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