Package org.jboss.msc.inject
Class FieldInjector<T>
- java.lang.Object
-
- org.jboss.msc.inject.FieldInjector<T>
-
-
Constructor Summary
Constructors Constructor Description FieldInjector(Value<?> target, java.lang.reflect.Field field)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinject(T value)Inject the given value.voiduninject()Uninject the given value (in other words, cancel or undo a previous injection).private voiduninjectPrimitive(java.lang.reflect.Field field, java.lang.Class<?> fieldType, java.lang.Object targetValue)
-
-
-
Field Detail
-
target
private final Value<?> target
-
field
private final java.lang.reflect.Field field
-
-
Constructor Detail
-
FieldInjector
public FieldInjector(Value<?> target, java.lang.reflect.Field field)
Construct a new instance.- Parameters:
target- the object whose field is to be updatedfield- the field to update
-
-
Method Detail
-
inject
public void inject(T value)
Inject the given value.
-
uninject
public void uninject()
Uninject the given value (in other words, cancel or undo a previous injection). Only called afterinject()has been called.
-
uninjectPrimitive
private void uninjectPrimitive(java.lang.reflect.Field field, java.lang.Class<?> fieldType, java.lang.Object targetValue) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException- Throws:
java.lang.IllegalArgumentExceptionjava.lang.IllegalAccessException
-
-