A B C G I O P R S T V

A

afterInit() - Method in class org.unitils.inject.InjectModule
No after initialization needed for this module
afterTestMethod(Object, Method, Throwable) - Method in class org.unitils.inject.InjectModule.InjectTestListener
After test execution, if requested restore all values that were replaced in the static injection.

B

beforeTestMethod(Object, Method) - Method in class org.unitils.inject.InjectModule.InjectTestListener
Before executing a test method (i.e. after the fixture methods), the injection is performed, since objects to inject or targets are possibly instantiated during the fixture.

C

createObjectForField(Object, Field) - Method in class org.unitils.inject.InjectModule
Creates an objects of the given fields' declared type and assigns it to this field on the given testObject
createTestedObjectsIfNull(Object) - Method in class org.unitils.inject.InjectModule
For all fields annotated with TestedObject that are still null after the test fixture, an object is created of the field's declared type and assigned to the field.

G

getFieldType() - Method in class org.unitils.inject.util.ValueToRestore
 
getObjectToInject(Object, Field) - Method in class org.unitils.inject.InjectModule
Gets the value from the given field.
getObjectToInjectType(Object, Field) - Method in class org.unitils.inject.InjectModule
Gets the type of the given field.
getProperty() - Method in class org.unitils.inject.util.ValueToRestore
 
getPropertyAccessType() - Method in class org.unitils.inject.util.ValueToRestore
 
getSituatedErrorMessage(Class<? extends Annotation>, Field, String) - Method in class org.unitils.inject.InjectModule
Given the errorDescription, returns a situated error message, i.e. specifying the annotated field and the annotation type that was used.
getTarget(Object, Field) - Method in class org.unitils.inject.InjectModule
 
getTargetClass() - Method in class org.unitils.inject.util.ValueToRestore
 
getTargets(Class<? extends Annotation>, Field, String, Object) - Method in class org.unitils.inject.InjectModule
Returns the target(s) for the injection, given the specified name of the target and the test object.
getTestListener() - Method in class org.unitils.inject.InjectModule
 
getValue() - Method in class org.unitils.inject.util.ValueToRestore
 

I

init(Properties) - Method in class org.unitils.inject.InjectModule
Initializes this module using the given configuration.
inject(Object, Field) - Method in class org.unitils.inject.InjectModule
Injects the fieldToInject.
injectAll(Object) - Method in class org.unitils.inject.InjectModule
Injects all fields that are annotated with InjectInto.
injectAllByType(Object) - Method in class org.unitils.inject.InjectModule
Auto-injects all fields that are annotated with InjectIntoByType
injectAllStatic(Object) - Method in class org.unitils.inject.InjectModule
Injects all fields that are annotated with InjectIntoStatic.
injectAllStaticByType(Object) - Method in class org.unitils.inject.InjectModule
Auto-injects all fields that are annotated with InjectIntoStaticByType
injectByType(Object, Field) - Method in class org.unitils.inject.InjectModule
Auto-injects the fieldToInject by trying to match the fields declared type with a property of the target.
InjectInto - Annotation Type in org.unitils.inject.annotation
Annotation indicating that the the InjectModule should try to inject the object assigned to the annotated field to the object defined by the target attribute (or the object(s) assigned to the field annotated with TestedObject.
injectInto(Object, Object, String) - Static method in class org.unitils.inject.util.InjectionUtils
Explicit injection of the objectToInject into the specified property of the target.
injectIntoAnnotated(Object, Object, Class<? extends Annotation>) - Static method in class org.unitils.inject.util.InjectionUtils
 
injectIntoAnnotatedFields(Object, Object, Class<? extends Annotation>) - Static method in class org.unitils.inject.util.InjectionUtils
 
injectIntoAnnotatedMethods(Object, Object, Class<? extends Annotation>) - Static method in class org.unitils.inject.util.InjectionUtils
 
InjectIntoByType - Annotation Type in org.unitils.inject.annotation
Annotation indicating that the the InjectModule should try to inject the object assigned to the annotated field to the object defined by the target attribute (or the object(s) assigned to the field annotated with TestedObject.
injectIntoByType(Object, Type, Object, PropertyAccess) - Static method in class org.unitils.inject.util.InjectionUtils
Performs auto-injection by type of the objectToInject on the target object.
InjectIntoStatic - Annotation Type in org.unitils.inject.annotation
Annotation indicating that the the InjectModule should try to inject the object assigned to the annotated field to a static property of the class defined by the target attribute.
injectIntoStatic(Object, Class<?>, String) - Static method in class org.unitils.inject.util.InjectionUtils
Explicit injection of the objectToInject into the specified static property of the target class.
InjectIntoStaticByType - Annotation Type in org.unitils.inject.annotation
Annotation indicating that the InjectModule should try to inject the object assigned to the annotated field to a static property of the class defined by the target attribute.
injectIntoStaticByType(Object, Type, Class<?>, PropertyAccess) - Static method in class org.unitils.inject.util.InjectionUtils
Performs auto-injection by type of the objectToInject into the target class.
InjectionUtils - Class in org.unitils.inject.util
Class containing static methods that implement explicit injection using OGNL expressions, and auto-injection by type.
InjectionUtils() - Constructor for class org.unitils.inject.util.InjectionUtils
 
InjectModule - Class in org.unitils.inject
Module for injecting annotated objects into other objects.
InjectModule() - Constructor for class org.unitils.inject.InjectModule
 
InjectModule.InjectTestListener - Class in org.unitils.inject
The TestListener for this module
InjectModule.InjectTestListener() - Constructor for class org.unitils.inject.InjectModule.InjectTestListener
 
injectObjects(Object) - Method in class org.unitils.inject.InjectModule
Performs all supported kinds of injection on the given object's fields
injectStatic(Object, Field) - Method in class org.unitils.inject.InjectModule
Injects the fieldToAutoInjectStatic into the specified target class.
injectStaticByType(Object, Field) - Method in class org.unitils.inject.InjectModule
Auto-injects the fieldToInject by trying to match the fields declared type with a property of the target class.

O

org.unitils.inject - package org.unitils.inject
 
org.unitils.inject.annotation - package org.unitils.inject.annotation
 
org.unitils.inject.util - package org.unitils.inject.util
 

P

PropertyAccess - Enum in org.unitils.inject.util
The type of accessing properties: by field or by setter.

R

restore(ValueToRestore) - Method in class org.unitils.inject.InjectModule
Restores the given value.
Restore - Enum in org.unitils.inject.util
The type of accessing properties: by field or by setter.
restoreStaticInjectedObjects() - Method in class org.unitils.inject.InjectModule
Restores the values that were stored using InjectModule.storeValueToRestoreAfterTest(Class, String, Class, org.unitils.inject.util.PropertyAccess, Object, org.unitils.inject.util.Restore).

S

storeValueToRestoreAfterTest(Class<?>, String, Class<?>, PropertyAccess, Object, Restore) - Method in class org.unitils.inject.InjectModule
Stores the old value that was replaced during the injection so that it can be restored after the test was performed.

T

TestedObject - Annotation Type in org.unitils.inject.annotation
Annotation indicating the object under test.

V

valueOf(String) - Static method in enum org.unitils.inject.util.PropertyAccess
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum org.unitils.inject.util.Restore
Returns the enum constant of this type with the specified name.
values() - Static method in enum org.unitils.inject.util.PropertyAccess
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum org.unitils.inject.util.Restore
Returns an array containing the constants of this enum type, in the order they are declared.
ValueToRestore - Class in org.unitils.inject.util
Class for holding values that need to be restored after a test was performed.
ValueToRestore(Class<?>, String, Class<?>, PropertyAccess, Object) - Constructor for class org.unitils.inject.util.ValueToRestore
 

A B C G I O P R S T V

Copyright © 2011. All Rights Reserved.