Package org.jboss.resteasy.core
Class PropertyInjectorImpl
- java.lang.Object
-
- org.jboss.resteasy.core.PropertyInjectorImpl
-
- All Implemented Interfaces:
PropertyInjector
public class PropertyInjectorImpl extends java.lang.Object implements PropertyInjector
- Version:
- $Revision: 1 $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PropertyInjectorImpl.SetterMethod
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.Class<?>
clazz
protected java.util.HashMap<java.lang.reflect.Field,ValueInjector>
fieldMap
protected java.util.HashMap<java.lang.Long,java.lang.reflect.Method>
setterhashes
protected java.util.List<PropertyInjectorImpl.SetterMethod>
setters
-
Constructor Summary
Constructors Constructor Description PropertyInjectorImpl(java.lang.Class<?> clazz, ResteasyProviderFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.reflect.Field[]
getDeclaredFields(java.lang.Class<?> clazz)
private java.lang.reflect.Method[]
getDeclaredMethods(java.lang.Class<?> clazz)
private ValueInjector
getParameterExtractor(java.lang.Class<?> clazz, ResteasyProviderFactory factory, java.lang.reflect.AccessibleObject accessibleObject, java.lang.annotation.Annotation[] annotations, java.lang.Class<?> type, java.lang.reflect.Type genericType)
void
inject(java.lang.Object target)
Inject values into annotated properties (fields/setter methods) of the target object.void
inject(HttpRequest request, HttpResponse response, java.lang.Object target)
Inject values into annotated properties (fields/setter methods) of the target object.protected void
populateMap(java.lang.Class<?> clazz, ResteasyProviderFactory factory)
private void
setAccessible(java.lang.reflect.AccessibleObject member)
-
-
-
Field Detail
-
fieldMap
protected java.util.HashMap<java.lang.reflect.Field,ValueInjector> fieldMap
-
setters
protected java.util.List<PropertyInjectorImpl.SetterMethod> setters
-
setterhashes
protected java.util.HashMap<java.lang.Long,java.lang.reflect.Method> setterhashes
-
clazz
protected java.lang.Class<?> clazz
-
-
Constructor Detail
-
PropertyInjectorImpl
public PropertyInjectorImpl(java.lang.Class<?> clazz, ResteasyProviderFactory factory)
-
-
Method Detail
-
populateMap
protected void populateMap(java.lang.Class<?> clazz, ResteasyProviderFactory factory)
-
getParameterExtractor
private ValueInjector getParameterExtractor(java.lang.Class<?> clazz, ResteasyProviderFactory factory, java.lang.reflect.AccessibleObject accessibleObject, java.lang.annotation.Annotation[] annotations, java.lang.Class<?> type, java.lang.reflect.Type genericType)
-
inject
public void inject(HttpRequest request, HttpResponse response, java.lang.Object target) throws Failure
Description copied from interface:PropertyInjector
Inject values into annotated properties (fields/setter methods) of the target object. This method should only be used inside the scope of an HTTP request.- Specified by:
inject
in interfacePropertyInjector
- Throws:
Failure
-
inject
public void inject(java.lang.Object target)
Description copied from interface:PropertyInjector
Inject values into annotated properties (fields/setter methods) of the target object. This method should only be used outside the scope of an HTTP request.- Specified by:
inject
in interfacePropertyInjector
-
getDeclaredFields
private java.lang.reflect.Field[] getDeclaredFields(java.lang.Class<?> clazz)
-
getDeclaredMethods
private java.lang.reflect.Method[] getDeclaredMethods(java.lang.Class<?> clazz)
-
setAccessible
private void setAccessible(java.lang.reflect.AccessibleObject member)
-
-