Package org.spockframework.guice
Class GuiceInterceptor
- java.lang.Object
-
- org.spockframework.runtime.extension.AbstractMethodInterceptor
-
- org.spockframework.guice.GuiceInterceptor
-
- All Implemented Interfaces:
IMethodInterceptor
public class GuiceInterceptor extends AbstractMethodInterceptor
Creates a Guice injector, and injects Guice-provided objects into specifications.- Author:
- Peter Niederwieser
-
-
Constructor Summary
Constructors Constructor Description GuiceInterceptor(SpecInfo spec, java.util.Set<java.lang.Class<? extends com.google.inject.Module>> moduleClasses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
interceptInitializerMethod(IMethodInvocation invocation)
void
interceptSharedInitializerMethod(IMethodInvocation invocation)
-
Methods inherited from class org.spockframework.runtime.extension.AbstractMethodInterceptor
intercept, interceptCleanupMethod, interceptCleanupSpecMethod, interceptDataProcessorMethod, interceptDataProviderMethod, interceptFeatureExecution, interceptFeatureMethod, interceptIterationExecution, interceptSetupMethod, interceptSetupSpecMethod, interceptSpecExecution
-
-
-
-
Constructor Detail
-
GuiceInterceptor
public GuiceInterceptor(SpecInfo spec, java.util.Set<java.lang.Class<? extends com.google.inject.Module>> moduleClasses)
-
-
Method Detail
-
interceptSharedInitializerMethod
public void interceptSharedInitializerMethod(IMethodInvocation invocation) throws java.lang.Throwable
- Overrides:
interceptSharedInitializerMethod
in classAbstractMethodInterceptor
- Throws:
java.lang.Throwable
-
interceptInitializerMethod
public void interceptInitializerMethod(IMethodInvocation invocation) throws java.lang.Throwable
- Overrides:
interceptInitializerMethod
in classAbstractMethodInterceptor
- Throws:
java.lang.Throwable
-
-