private void parseMethodParameters(Method method, MethodMetadata methodMetadata) {
Annotation[][] parameterAnnotations = method.getParameterAnnotations();
Type[] paramTypes = method.getGenericParameterTypes();
boolean entityParamExists = false;
for (int pos = 0, limit = paramTypes.length; pos < limit; pos++) {
Injectable fp =
InjectableFactory.getInstance().create(paramTypes[pos],
parameterAnnotations[pos],
method,
getMetadata().isEncoded() || methodMetadata
.isEncoded(),
methodMetadata.getDefaultValue());
if (fp.getParamType() == Injectable.ParamType.ENTITY) {
if (entityParamExists) {
// we are allowed to have only one entity parameter
String methodName =
method.getDeclaringClass().getName() + "." + method.getName();
throw new IllegalStateException("Resource method " + methodName