public final class AnnotationInjector extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.apache.commons.logging.Log |
LOG |
protected static org.apache.commons.logging.Log |
LOG_TIME |
Constructor and Description |
---|
AnnotationInjector() |
Modifier and Type | Method and Description |
---|---|
static Field[] |
findFieldsWithAnnotation(Object object,
Class<? extends Annotation> annnotationClass)
Finds the fields in the class or super class that are annotated with the
annnotationClass annotation.
|
static void |
inject(Object object,
Factory factory)
Inject ICS runtime objects into the object.
|
static void |
injectIntoField(Object object,
Factory factory,
Field field) |
static void |
injectIntoMethod(Object object,
Factory factory,
Method method) |
protected static final org.apache.commons.logging.Log LOG
protected static final org.apache.commons.logging.Log LOG_TIME
public static final void inject(Object object, Factory factory)
InjectForRequest
annotation will be populated by this method by
retrieving the value from the Factory.getObject(String,Class)
method.object
- the object to inject intofactory
- the factory that created the objects that need to be
injected.public static final Field[] findFieldsWithAnnotation(Object object, Class<? extends Annotation> annnotationClass)
object
- the object to inspect.annnotationClass
- the annotation to find.public static void injectIntoField(Object object, Factory factory, Field field) throws SecurityException
object
- factory
- field
- SecurityException
public static void injectIntoMethod(Object object, Factory factory, Method method) throws SecurityException
object
- factory
- method
- SecurityException
Copyright © 2010-2016 Oracle Corporation. All Rights Reserved.