if (Modifier.isStatic(field.getModifiers())) {
staticField = true;
}
RegExParam regExParam = Processor.getAnnotation(field, RegExParam.class);
if (Processor.isCompatible(field, RegExParam.class, Pattern.class)) {
try {
router.param(regExParam.value(), (Pattern) field.get(staticField ? null : instance));
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
if (Processor.isCompatible(field, RegExParam.class, String.class)) {
try {
router.param(regExParam.value(), Pattern.compile((String) field.get(staticField ? null : instance)));
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
}