net.craftforge.essential.controller.managers
Class InjectionManager
java.lang.Object
net.craftforge.essential.controller.managers.InjectionManager
public class InjectionManager
- extends Object
- Since:
- 21.08.11
- Author:
- Christian Bick
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InjectionManager
public InjectionManager(Consumer consumer,
BodyHandler bodyHandler,
HeaderHandler headerHandler,
ParameterHandler parameterHandler,
PropertyHandler propertyHandler)
getInputForField
public Object getInputForField(Field field)
throws ControllerException
- Gets the input for a field annotated with @Param from the corresponding parameter.
- Parameters:
field - The field to get the input for
- Returns:
- The input for the field
- Throws:
ControllerException - Failed to estimate a field's input
getInputForMethodParameters
public List<Object> getInputForMethodParameters(Method method)
throws ControllerException
- Gets the input for a method's parameters annotated with @Param from the corresponding parameter.
- Parameters:
method - The method to get the inputs for its parameters
- Returns:
- The list of inputs (ordered by parameter order)
- Throws:
ControllerException - Failed to estimate a parameter's input
getBodyInput
public Object getBodyInput(Consumer consumer,
Class<?> type)
throws ControllerException
- Throws:
ControllerException
getHeaderInput
public Object getHeaderInput(Class<?> type,
String headerName,
String[] defaultValues)
throws ControllerException
- Throws:
ControllerException
getParameterInput
public Object getParameterInput(Consumer consumer,
Class<?> type,
Type genericType,
String parameterName,
String[] defaultValues)
throws ControllerException
- Throws:
ControllerException
getPropertyInput
public Object getPropertyInput(Class<?> type,
String propertyName,
String[] defaultValues)
throws ControllerException
- Throws:
ControllerException
Copyright © 2011. All Rights Reserved.