ComponentInjector<ViewableRule> ci = new ComponentInjector(injectableContext,
ViewableRule.class);
List<PatternRulePair<UriRule>> patterns = new ArrayList<PatternRulePair<UriRule>>();
if (config.getFeature(ResourceConfig.FEATURE_IMPLICIT_VIEWABLES)) {
ViewableRule r = new ViewableRule();
ci.inject(r);
// The matching rule for a sub-resource template
patterns.add(new PatternRulePair<UriRule>(
new UriPattern("/([^/]+)"), r));
// The matching rule for an index template