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, Set<Class<? extends Module>> moduleClasses)
           
 
Method Summary
 void interceptSetupMethod(IMethodInvocation invocation)
           
 void interceptSetupSpecMethod(IMethodInvocation invocation)
           
 
Methods inherited from class org.spockframework.runtime.extension.AbstractMethodInterceptor
intercept, interceptCleanupMethod, interceptCleanupSpecMethod, interceptDataProcessorMethod, interceptDataProviderMethod, interceptFeatureExecution, interceptFeatureMethod, 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,
                        Set<Class<? extends Module>> moduleClasses)
Method Detail

interceptSetupSpecMethod

public void interceptSetupSpecMethod(IMethodInvocation invocation)
                              throws Throwable
Overrides:
interceptSetupSpecMethod in class AbstractMethodInterceptor
Throws:
Throwable

interceptSetupMethod

public void interceptSetupMethod(IMethodInvocation invocation)
                          throws Throwable
Overrides:
interceptSetupMethod in class AbstractMethodInterceptor
Throws:
Throwable


Copyright © 2010. All Rights Reserved.