org.multiverse.instrumentation
Class PreventReinstrumentationInstrumentationPhase
java.lang.Object
org.multiverse.instrumentation.AbstractInstrumentationPhase
org.multiverse.instrumentation.PreventReinstrumentationInstrumentationPhase
- All Implemented Interfaces:
- InstrumentationPhase
public class PreventReinstrumentationInstrumentationPhase
- extends AbstractInstrumentationPhase
A control flow InstrumentationPhase responsible for preventing that a class already has been
instrumented:
- If the class already is instrumented, it checks if the compiler name and version
match. If not, an error is thrown. Multiverse compilation is not backwards compatible
yet.
InstrumentationStamp
with a instrumentorName and instrumentorVersion based on the provided compiler. So next
time this class is going to be re-instrumented, the multiverse instrumentation
is skipped or an error is thrown if the instrumentorName/instrumentorVersion don't match.
- Author:
- Peter Veentjer
PreventReinstrumentationInstrumentationPhase
public PreventReinstrumentationInstrumentationPhase(Instrumentor instrumentor)
- Creates a new PreventReinstrumentationInstrumentationPhase.
- Parameters:
instrumentor - the Instrumentor that is going to compile the classes.
- Throws:
NullPointerException - if instrumentor is null.
doInstrument
protected Clazz doInstrument(Environment environment,
Clazz originalClazz)
- Specified by:
doInstrument in class AbstractInstrumentationPhase
Copyright © 2008-2010 Multiverse. All Rights Reserved.