/** * Coerce a Grapht context to a LensKit context. * * @param ctx The context. * @return A LensKit context, as a wrapper if necessary. */ protected static LenskitConfigContext wrapContext(Context ctx) { if (ctx instanceof LenskitConfigContext) { return (LenskitConfigContext) ctx; } else { return new ContextWrapper(ctx); } }
@Override public LenskitConfigContext at(@Nullable Annotation qualifier, Class<?> type) { return wrapContext(base.at(qualifier, type)); } }
@Override public LenskitConfigContext within(Class<?> type) { return wrapContext(base.within(type)); }
/** * Coerce a Grapht context to a LensKit context. * * @param ctx The context. * @return A LensKit context, as a wrapper if necessary. */ protected static LenskitConfigContext wrapContext(Context ctx) { if (ctx instanceof LenskitConfigContext) { return (LenskitConfigContext) ctx; } else { return new ContextWrapper(ctx); } }
@Override public LenskitConfigContext at(Class<?> type) { return wrapContext(base.at(type)); }
@Override public LenskitConfigContext within(@Nullable Annotation qualifier, Class<?> type) { return wrapContext(base.within(qualifier, type)); }
@Override public LenskitConfigContext matching(ContextPattern pattern) { return wrapContext(base.matching(pattern)); }
@Override public LenskitConfigContext at(@Nullable Class<? extends Annotation> qualifier, Class<?> type) { return wrapContext(base.at(qualifier, type)); }
@Override public LenskitConfigContext within(@Nullable Class<? extends Annotation> qualifier, Class<?> type) { return wrapContext(base.within(qualifier, type)); }
@Override public LenskitConfigContext at(@Nullable Annotation qualifier, Class<?> type) { return wrapContext(base.at(qualifier, type)); } }
@Override public LenskitConfigContext within(@Nullable Class<? extends Annotation> qualifier, Class<?> type) { return wrapContext(base.within(qualifier, type)); }
@Override public LenskitConfigContext at(@Nullable Class<? extends Annotation> qualifier, Class<?> type) { return wrapContext(base.at(qualifier, type)); }
@Override public LenskitConfigContext within(Class<?> type) { return wrapContext(base.within(type)); }
@Override public LenskitConfigContext at(Class<?> type) { return wrapContext(base.at(type)); }
@Override public LenskitConfigContext within(@Nullable Annotation qualifier, Class<?> type) { return wrapContext(base.within(qualifier, type)); }
@Override public LenskitConfigContext matching(ContextPattern pattern) { return wrapContext(base.matching(pattern)); }