String path = (String)annotation.get("value");
Integer priority = (Integer)annotation.get("priority");
HashMap<String, ParamDescriptor> parameters = null;
ExecutableElement exe = metaModel.processingContext.get(method.getMethod());
for (VariableElement ve : exe.getParameters()) {
Param param = ve.getAnnotation(Param.class);
if (param != null) {
if (parameters == null) {
parameters = new HashMap<String, ParamDescriptor>();
}
String name = ve.getSimpleName().toString();
ParameterMetaModel a = method.parameterBy(name);
if (a instanceof PhaseParameterMetaModel) {
PhaseParameterMetaModel b = (PhaseParameterMetaModel)a;
String pattern = param.pattern().length() == 0 ? null : param.pattern();
parameters.put(b.getMappedName(), new ParamDescriptor(pattern, param.preservePath(), param.captureGroup()));
} else {
throw new UnsupportedOperationException("Handle me gracefully");
}
}
}