A B C D F G I N O P R S T V
All Classes All Packages
All Classes All Packages
All Classes All Packages
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
TestedObjectthat are still null after the test fixture, an object is created of the field's declared type and assigned to the field.
D
- DEFAULT - org.unitils.inject.util.PropertyAccess
-
Field or setter injection, defined by the configured default value
- DEFAULT - org.unitils.inject.util.Restore
-
OLD_VALUE, NO_RESTORE or NULL_VALUE as defined by the default value in the configuration.
F
- FIELD - org.unitils.inject.util.PropertyAccess
-
Field injection
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(Object, Object, String) - Static method in class org.unitils.inject.util.InjectionUtils
-
Explicit injection of the objectToInject into the specified property of the target.
- InjectInto - Annotation Type in org.unitils.inject.annotation
-
Annotation indicating that the the
InjectModuleshould 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 withTestedObject. - 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(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.
- InjectIntoByType - Annotation Type in org.unitils.inject.annotation
-
Annotation indicating that the the
InjectModuleshould 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 withTestedObject. - 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.
- InjectIntoStatic - Annotation Type in org.unitils.inject.annotation
-
Annotation indicating that the the
InjectModuleshould 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.
- InjectIntoStaticByType - Annotation Type in org.unitils.inject.annotation
-
Annotation indicating that the
InjectModuleshould try to inject the object assigned to the annotated field to a static property of the class defined by the target attribute. - 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
TestListenerfor this module - 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.
- InjectTestListener() - Constructor for class org.unitils.inject.InjectModule.InjectTestListener
N
- NO_RESTORE - org.unitils.inject.util.Restore
-
Leave the injected field
- NULL_OR_0_VALUE - org.unitils.inject.util.Restore
-
Set the injected field to the null or 0 value
O
- OLD_VALUE - org.unitils.inject.util.Restore
-
Reset the injected field back to its original value
- 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
- property() - Method in annotation type org.unitils.inject.annotation.InjectInto
-
OGNL expression that defines the property to which the object referenced by the annotated field is injected
- property() - Method in annotation type org.unitils.inject.annotation.InjectIntoStatic
-
OGNL expression that defines the property to which the object referenced by the annotated fiel is injected
- propertyAccess() - Method in annotation type org.unitils.inject.annotation.InjectIntoByType
-
The property access that should be used for injection.
- propertyAccess() - Method in annotation type org.unitils.inject.annotation.InjectIntoStaticByType
-
The property access that is used for injection
- PropertyAccess - Enum in org.unitils.inject.util
-
The type of accessing properties: by field or by setter.
R
- restore() - Method in annotation type org.unitils.inject.annotation.InjectIntoStatic
-
The action that needs to be performed after the test was performed.
- restore() - Method in annotation type org.unitils.inject.annotation.InjectIntoStaticByType
-
The action that needs to be performed after the test was performed.
- 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
- SETTER - org.unitils.inject.util.PropertyAccess
-
Setter injection
- 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
- target() - Method in annotation type org.unitils.inject.annotation.InjectInto
-
The name of the field that references the object to which the object in the annotated field should be injected.
- target() - Method in annotation type org.unitils.inject.annotation.InjectIntoByType
-
The name of the field that references the object to which the object in the annotated field should be injected.
- target() - Method in annotation type org.unitils.inject.annotation.InjectIntoStatic
-
The target class to which the object referenced by the annotated field is injected
- target() - Method in annotation type org.unitils.inject.annotation.InjectIntoStaticByType
-
The target class to which the object referenced by the annotated field is injected
- 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
All Classes All Packages