org.multiverse.instrumentation
Class AbstractInstrumentationPhase
java.lang.Object
org.multiverse.instrumentation.AbstractInstrumentationPhase
- All Implemented Interfaces:
- InstrumentationPhase
- Direct Known Subclasses:
- JSRInlineInstrumentationPhase, PreventReinstrumentationInstrumentationPhase
public abstract class AbstractInstrumentationPhase
- extends Object
- implements InstrumentationPhase
Abstract InstrumentationPhase that provides some basic plumbing.
- Author:
- Peter Veentjer
AbstractInstrumentationPhase
public AbstractInstrumentationPhase(String name)
getName
public String getName()
- Description copied from interface:
InstrumentationPhase
- Returns the name for this InstrumentationPhase. It is only used for logging purposes.
- Specified by:
getName in interface InstrumentationPhase
- Returns:
- the name of this InstrumentationPhase.
instrument
public Clazz instrument(Environment environment,
Clazz originalClazz)
- Description copied from interface:
InstrumentationPhase
- Compiles (transforms) the originalClazz. If nothing is changed, the originalClazz
can be returned. The returned value never should be null.
- Specified by:
instrument in interface InstrumentationPhase
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
toString
public String toString()
- Overrides:
toString in class Object
doInit
protected void doInit()
doInstrument
protected abstract Clazz doInstrument(Environment environment,
Clazz clazz)
Copyright © 2008-2010 Multiverse. All Rights Reserved.