/** * Enters and returns a new local context instance. * * @return Reference to the entered LocalContext */ public static LocalContext enter() { LocalContext ctx = current(LocalContext.class); if (ctx == null) { // Root. ctx = OSGiServices.getLocalContext(); } return (LocalContext) ctx.enterInner(); }
/** * Returns the current parameter value (the default value if not reconfigured nor {@link * LocalContext#supersede superseded}). */ public T get() { LocalContext ctx = current(LocalContext.class); return (ctx != null) ? ctx.getValue(this, super.get()) : super.get(); }