org.spockframework.guice
Class GuiceInterceptor

java.lang.Object
  extended by org.spockframework.runtime.extension.AbstractMethodInterceptor
      extended by 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
GuiceInterceptor(SpecInfo spec, java.util.Set<java.lang.Class<? extends com.google.inject.Module>> moduleClasses)
           
 
Method Summary
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 class AbstractMethodInterceptor
Throws:
java.lang.Throwable

interceptInitializerMethod

public void interceptInitializerMethod(IMethodInvocation invocation)
                                throws java.lang.Throwable
Overrides:
interceptInitializerMethod in class AbstractMethodInterceptor
Throws:
java.lang.Throwable


Copyright © 2013. All rights reserved