org.test4j.module.inject.utility
类 InjectionModuleHelper

java.lang.Object
  继承者 org.test4j.module.inject.utility.InjectionModuleHelper

public class InjectionModuleHelper
extends Object

Class containing static methods that implement explicit injection using OGNL expressions, and auto-injection by type.


构造方法摘要
InjectionModuleHelper()
           
 
方法摘要
static Object injectInto(Object objectToInject, Object target, String property)
          Explicit injection of the objectToInject into the specified property of the target.
static void injectIntoAnnotated(Object objectToInject, Object target, Class<? extends Annotation> annotation)
           
static void injectIntoAnnotatedFields(Object objectToInject, Object target, Class<? extends Annotation> annotation)
           
static void injectIntoAnnotatedMethods(Object objectToInject, Object target, Class<? extends Annotation> annotation)
           
static Object injectIntoByType(Object objectToInject, Type objectToInjectType, Object target)
          Performs auto-injection by type of the objectToInject on the target object.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

InjectionModuleHelper

public InjectionModuleHelper()
方法详细信息

injectInto

public static Object injectInto(Object objectToInject,
                                Object target,
                                String property)
Explicit injection of the objectToInject into the specified property of the target. The property should be a correct OGNL expression.

参数:
objectToInject - The object that is injected
target - The target object
property - The OGNL expression that defines where the object will be injected, not null
返回:
The object that was replaced by the injection

injectIntoByType

public static Object injectIntoByType(Object objectToInject,
                                      Type objectToInjectType,
                                      Object target)
Performs auto-injection by type of the objectToInject on the target object.

参数:
objectToInject - The object that is injected
objectToInjectType - The type of the object. This should be the type of the object or one of his super-types or implemented interfaces. This type is used for property type matching on the target object
target - The object into which the objectToInject is injected
propertyAccess - Defines if field or setter injection is used
返回:
The object that was replaced by the injection

injectIntoAnnotated

public static void injectIntoAnnotated(Object objectToInject,
                                       Object target,
                                       Class<? extends Annotation> annotation)

injectIntoAnnotatedMethods

public static void injectIntoAnnotatedMethods(Object objectToInject,
                                              Object target,
                                              Class<? extends Annotation> annotation)

injectIntoAnnotatedFields

public static void injectIntoAnnotatedFields(Object objectToInject,
                                             Object target,
                                             Class<? extends Annotation> annotation)


Copyright © 2013. All rights reserved.