InternedString (final DependencyContext context, final String val) { return new InternedString() { @Override public DependencyContext getContext() { return context; } @Override public int asInt() { return context.get(val); } @Override public String asString() { return val; } }; }