org.multiverse.instrumentation
Interface InstrumentationPhase

All Known Implementing Classes:
AbstractInstrumentationPhase, JSRInlineInstrumentationPhase, PreventReinstrumentationInstrumentationPhase

public interface InstrumentationPhase

The compilation process can be split up in different steps; the InstrumentationPhase is one such step.

Author:
Peter Veentjer

Method Summary
 java.lang.String getName()
          Returns the name for this InstrumentationPhase.
 Clazz instrument(Environment environment, Clazz originalClazz)
          Compiles (transforms) the originalClazz.
 

Method Detail

getName

java.lang.String getName()
Returns the name for this InstrumentationPhase. It is only used for logging purposes.

Returns:
the name of this InstrumentationPhase.

instrument

Clazz instrument(Environment environment,
                 Clazz originalClazz)
Compiles (transforms) the originalClazz. If nothing is changed, the originalClazz can be returned. The returned value never should be null.

Parameters:
environment -
originalClazz - the originalClazz.
Returns:
the compiled clazz. Null means that following compile phases should be skipped. This makes it possible to add control flow compile phases (for example if the class already has been
Throws:
CompileException - if something fails while doing the processing.


Copyright © 2008-2010 Multiverse. All Rights Reserved.