@Target(value={METHOD,CONSTRUCTOR,FIELD,PARAMETER}) @Retention(value=RUNTIME) @Documented @Repeatable(value=IoCContexts.class) public @interface IoCContext
| Modifier and Type | Optional Element and Description |
|---|---|
Class<?>[] |
classes
Classes that define the context we wish to work with.
|
Class<? extends org.aopalliance.intercept.MethodInterceptor> |
implementedBy
implementedBy() returns a Class that implements MethodInterceptor. |
String |
instance
Only meaningful when used as Parameter annotation.
|
String |
name
Names can be used to identify specific ObjectFactories for method injection on a test, if no name is specified, then a default
name will be used, and parameters of the test will fail if the reference an annotation with a name that does not exits.
|
Class<? extends ObjectFactory> |
objectFactoryClass
Classes of object factory we wish to use, if none is specified a discovery of object factories will ensue, if only one is
supported by the current classloader, it will be used.
|
public abstract String name
public abstract String instance
IoCContextpublic abstract Class<?>[] classes
objectFactoryClass())public abstract Class<? extends ObjectFactory> objectFactoryClass
ObjectFactory we wish to use to build the contextpublic abstract Class<? extends org.aopalliance.intercept.MethodInterceptor> implementedBy
implementedBy() returns a Class that implements MethodInterceptor. This field will
be accessed via reflection so the name must be exact. If the class also implements Closeable the
Closeable.close() method will be called at the close of the global context.MethodInterceptor used to build the context, should never need to be changed.Copyright © 2016–2020 AdvisedTesting. All rights reserved.