Class MojoExecutionScope
- java.lang.Object
-
- org.apache.maven.execution.scope.internal.MojoExecutionScope
-
- All Implemented Interfaces:
com.google.inject.Scope,MojoExecutionListener
public class MojoExecutionScope extends java.lang.Object implements com.google.inject.Scope, MojoExecutionListener
MojoExecutionScope
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classMojoExecutionScope.ScopeState
-
Field Summary
Fields Modifier and Type Field Description private static com.google.inject.Provider<java.lang.Object>SEEDED_KEY_PROVIDERprivate java.lang.ThreadLocal<java.util.LinkedList<MojoExecutionScope.ScopeState>>values
-
Constructor Summary
Constructors Constructor Description MojoExecutionScope()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterExecutionFailure(MojoExecutionEvent event)voidafterMojoExecutionSuccess(MojoExecutionEvent event)voidbeforeMojoExecution(MojoExecutionEvent event)voidenter()voidexit()private java.util.Collection<WeakMojoExecutionListener>getProvidedListeners()private MojoExecutionScope.ScopeStategetScopeState()<T> com.google.inject.Provider<T>scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped)<T> voidseed(java.lang.Class<T> clazz, com.google.inject.Provider<T> value)<T> voidseed(java.lang.Class<T> clazz, T value)static <T> com.google.inject.Provider<T>seededKeyProvider()
-
-
-
Field Detail
-
SEEDED_KEY_PROVIDER
private static final com.google.inject.Provider<java.lang.Object> SEEDED_KEY_PROVIDER
-
values
private final java.lang.ThreadLocal<java.util.LinkedList<MojoExecutionScope.ScopeState>> values
-
-
Method Detail
-
enter
public void enter()
-
getScopeState
private MojoExecutionScope.ScopeState getScopeState()
-
exit
public void exit() throws MojoExecutionException- Throws:
MojoExecutionException
-
seed
public <T> void seed(java.lang.Class<T> clazz, com.google.inject.Provider<T> value)
-
seed
public <T> void seed(java.lang.Class<T> clazz, T value)
-
scope
public <T> com.google.inject.Provider<T> scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped)- Specified by:
scopein interfacecom.google.inject.Scope
-
seededKeyProvider
public static <T> com.google.inject.Provider<T> seededKeyProvider()
-
beforeMojoExecution
public void beforeMojoExecution(MojoExecutionEvent event) throws MojoExecutionException
- Specified by:
beforeMojoExecutionin interfaceMojoExecutionListener- Throws:
MojoExecutionException
-
afterMojoExecutionSuccess
public void afterMojoExecutionSuccess(MojoExecutionEvent event) throws MojoExecutionException
- Specified by:
afterMojoExecutionSuccessin interfaceMojoExecutionListener- Throws:
MojoExecutionException
-
afterExecutionFailure
public void afterExecutionFailure(MojoExecutionEvent event)
- Specified by:
afterExecutionFailurein interfaceMojoExecutionListener
-
getProvidedListeners
private java.util.Collection<WeakMojoExecutionListener> getProvidedListeners()
-
-