public class MojoExecutionScope extends java.lang.Object implements com.google.inject.Scope, MojoExecutionListener
Modifier and Type | Class and Description |
---|---|
private static class |
MojoExecutionScope.ScopeState |
Modifier and Type | Field and Description |
---|---|
private static com.google.inject.Provider<java.lang.Object> |
SEEDED_KEY_PROVIDER |
private java.lang.ThreadLocal<java.util.LinkedList<MojoExecutionScope.ScopeState>> |
values |
Constructor and Description |
---|
MojoExecutionScope() |
Modifier and Type | Method and Description |
---|---|
void |
afterExecutionFailure(MojoExecutionEvent event) |
void |
afterMojoExecutionSuccess(MojoExecutionEvent event) |
void |
beforeMojoExecution(MojoExecutionEvent event) |
void |
enter() |
void |
exit() |
private java.util.Collection<WeakMojoExecutionListener> |
getProvidedListeners() |
private MojoExecutionScope.ScopeState |
getScopeState() |
<T> com.google.inject.Provider<T> |
scope(com.google.inject.Key<T> key,
com.google.inject.Provider<T> unscoped) |
<T> void |
seed(java.lang.Class<T> clazz,
com.google.inject.Provider<T> value) |
<T> void |
seed(java.lang.Class<T> clazz,
T value) |
static <T> com.google.inject.Provider<T> |
seededKeyProvider() |
private static final com.google.inject.Provider<java.lang.Object> SEEDED_KEY_PROVIDER
private final java.lang.ThreadLocal<java.util.LinkedList<MojoExecutionScope.ScopeState>> values
public void enter()
private MojoExecutionScope.ScopeState getScopeState()
public void exit() throws MojoExecutionException
MojoExecutionException
public <T> void seed(java.lang.Class<T> clazz, com.google.inject.Provider<T> value)
public <T> void seed(java.lang.Class<T> clazz, T value)
public <T> com.google.inject.Provider<T> scope(com.google.inject.Key<T> key, com.google.inject.Provider<T> unscoped)
scope
in interface com.google.inject.Scope
public static <T> com.google.inject.Provider<T> seededKeyProvider()
public void beforeMojoExecution(MojoExecutionEvent event) throws MojoExecutionException
beforeMojoExecution
in interface MojoExecutionListener
MojoExecutionException
public void afterMojoExecutionSuccess(MojoExecutionEvent event) throws MojoExecutionException
afterMojoExecutionSuccess
in interface MojoExecutionListener
MojoExecutionException
public void afterExecutionFailure(MojoExecutionEvent event)
afterExecutionFailure
in interface MojoExecutionListener
private java.util.Collection<WeakMojoExecutionListener> getProvidedListeners()