Gets the list of watchers from the given Plexus context.

@param context the Plexus context
@return the list of watcher, empty if none. Modifying the resulting list, updates the stored list.
9890
static synchronized List<Watcher> get(Context context) {
        List<Watcher> watchers;
        if (context.contains(WATCHERS_KEY)) {
            try {
                watchers = (List<Watcher>) context.get(WATCHERS_KEY);
            } catch (ContextException e) {
                throw new IllegalStateException("Cannot extract the watcher from the context", e);
            }
        } else {
            watchers = new ArrayList<>();
            context.put(WATCHERS_KEY, watchers);
        }
        return watchers;
    }
592187
public static List<StringContext> getContextsFromExamples(List<CcgExample> examples) {
    List<StringContext> contexts = Lists.newArrayList();
    for (CcgExample example : examples) {
      AnnotatedSentence sentence = example.getSentence();
      int numTerminals = sentence.size();
      for (int i = 0; i < numTerminals; i++) {
        for (int j = i; j < numTerminals; j++) {
          contexts.add(new StringContext(i, j, sentence));
        }
      }
    }
    return contexts;
  }
937511
public Observable<Page<NetworkWatcherInner>> listAsync() {
        return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<NetworkWatcherInner>>, Page<NetworkWatcherInner>>() {
            @Override
            public Page<NetworkWatcherInner> call(ServiceResponse<List<NetworkWatcherInner>> response) {
                PageImpl1<NetworkWatcherInner> page = new PageImpl1<>();
                page.setItems(response.body());
                return page;
            }
        });
    }
575173
@RequiresPermission(ACCESS_WIFI_STATE)
  public static Observable<WifiSignalLevel> observeWifiSignalLevel(final Context context) {
    return observeWifiSignalLevel(context, WifiSignalLevel.getMaxLevel()).map(
        new Function<Integer, WifiSignalLevel>() {
          @Override public WifiSignalLevel apply(Integer level) throws Exception {
            return WifiSignalLevel.fromLevel(level);
          }
        });
  }
477662
public static WatchMonitor createAll(URI uri, int maxDepth, Watcher watcher) {
		return createAll(Paths.get(uri), maxDepth, watcher);
	}
1236416
@SuppressWarnings("unchecked")
    private ThreadContextDescriptor captureRaThreadContext(WSContextService contextSvc) {
        Map<String, String> execProps = new HashMap<String, String>();
        execProps.put(WSContextService.DEFAULT_CONTEXT, WSContextService.ALL_CONTEXT_TYPES);
        execProps.put(WSContextService.REQUIRE_AVAILABLE_APP, "false");

        return contextSvc.captureThreadContext(execProps);
    }
1116530
public static Collection<String> getRequestedScopes(final HttpServletRequest context) {
        val map = getRequestParameters(CollectionUtils.wrap(OAuth20Constants.SCOPE), context);
        if (map == null || map.isEmpty()) {
            return new ArrayList<>(0);
        }
        return (Collection<String>) map.get(OAuth20Constants.SCOPE);
    }
193232
private List<HandlerInterceptor> adaptInterceptors(List<Object> interceptors, ApplicationContext context) {
        List<HandlerInterceptor> handlerInterceptors = new ArrayList<HandlerInterceptor>();

        if (context.containsBean(LOGGING_INTERCEPTOR_BEAN_NAME)) {
            LoggingHandlerInterceptor loggingInterceptor = context.getBean(LOGGING_INTERCEPTOR_BEAN_NAME, LoggingHandlerInterceptor.class);
            handlerInterceptors.add(loggingInterceptor);
        }

        if (interceptors != null) {
            for (Object interceptor : interceptors) {
                if (interceptor instanceof MappedInterceptor) {
                    handlerInterceptors.add(new MappedInterceptorAdapter((MappedInterceptor)interceptor,
                            new UrlPathHelper(), new AntPathMatcher()));
                } else if (interceptor instanceof HandlerInterceptor) {
                    handlerInterceptors.add((HandlerInterceptor) interceptor);
                } else if (interceptor instanceof WebRequestInterceptor) {
                    handlerInterceptors.add(new WebRequestHandlerInterceptorAdapter((WebRequestInterceptor) interceptor));
                } else {
                    log.warn("Unsupported interceptor type: {}", interceptor.getClass().getName());
                }
            }
        }

        return handlerInterceptors;
    }
522988
def get_watchers(self, username, offset=0, limit=10):

        

        response = self._req('/user/watchers/{}'.format(username), {
            'offset' : offset,
            'limit' : limit
        })

        watchers = []

        for item in response['results']:
            w = {}
            w['user'] = User()
            w['user'].from_dict(item['user'])
            w['is_watching'] = item['is_watching']
            w['lastvisit'] = item['lastvisit']
            w['watch'] = {
                "friend" : item['watch']['friend'],
                "deviations" : item['watch']['deviations'],
                "journals" : item['watch']['journals'],
                "forum_threads" : item['watch']['forum_threads'],
                "critiques" : item['watch']['critiques'],
                "scraps" : item['watch']['scraps'],
                "activity" : item['watch']['activity'],
                "collections" : item['watch']['collections']
            }

            watchers.append(w)

        return {
            "results" : watchers,
            "has_more" : response['has_more'],
            "next_offset" : response['next_offset']
        }
1101328
public void getChildren(String path, boolean watch, Children2Callback cb,
            Object ctx) {
        getChildren(path, watch ? watchManager.defaultWatcher : null, cb, ctx);
    }
887755
public List<?> getList(PMContext ctx) throws PMException {
        final EntityFilter filter = (ctx != null && this.equals(ctx.getEntity())) ? ctx.getEntityContainer().getFilter() : null;
        return getList(ctx, filter, null, null, null);
    }
1131637
@Provides protected TvShowCollectionRendererBuilder provideTvShowCollectionRendererBuilder(
      Context context) {
    List<Renderer<TvShowViewModel>> prototypes = new LinkedList<Renderer<TvShowViewModel>>();
    prototypes.add(new TvShowRenderer(context));
    return new TvShowCollectionRendererBuilder(prototypes);
  }
392765
public final DTMIterator getContextNodes()
  {

    try
    {
      DTMIterator cnl = getContextNodeList();

      if (null != cnl)
        return cnl.cloneWithReset();
      else
        return null;  // for now... this might ought to be an empty iterator.
    }
    catch (CloneNotSupportedException cnse)
    {
      return null;  // error reporting?
    }
  }
892382
@Override
    public <T extends ApiGameUser> List<T> getSpectatorsList(Class<?> clazz) {
        return CommandUtil.getApiGameUserList(room.getSpectatorsList(), clazz);
    }
421974
public void init(ClassLoader loader,
                     ContextSource[] contextSources,
                     String[] prefixes, boolean profilingEnabled) throws Exception {


        mSources = contextSources;
        int len = contextSources.length;
        ArrayList<Class<?>> contextList = new ArrayList<Class<?>>(len);
        ArrayList<ClassLoader> delegateList = new ArrayList<ClassLoader>(len);

        for (int j = 0; j < contextSources.length; j++) {
            Class<?> type = contextSources[j].getContextType();
            if (type != null) {
                contextList.add(type);
                ClassLoader scout = type.getClassLoader();
                if (scout != null && !delegateList.contains(scout)) {
                    delegateList.add(scout);
                }
            }
        }

        mContextsInOrder = contextList.toArray(new Class[contextList.size()]);
        ClassLoader[] delegateLoaders =
            delegateList.toArray(new ClassLoader[delegateList.size()]);

        mInjector = new ClassInjector
            (new DelegateClassLoader(loader, delegateLoaders));

        mProfilingEnabled = profilingEnabled;

        int observerMode = profilingEnabled ? MergedClass.OBSERVER_ENABLED | MergedClass.OBSERVER_EXTERNAL : MergedClass.OBSERVER_ENABLED;

        // temporarily include interface for UtilityContext for backwards
        // compatibility with old code relying on it.
        Class<?>[] interfaces = { UtilityContext.class };
        mConstr = MergedClass.getConstructor2(mInjector,
                                              mContextsInOrder,
                                              prefixes,
                                              interfaces,
                                              observerMode);
    }
1170788
public List<String> getChildren(String path, Stat stat, Watcher watcher)
    throws KeeperException.NoNodeException {
        return dataTree.getChildren(path, stat, watcher);
    }
609912
public function getPluginNodesWithViewDefinitions(ContentContext $context)
    {
        $pluginNodes = [];
        foreach ($this->getPluginNodes($context) as $pluginNode) {
            /** @var NodeInterface $pluginNode */
            if ($this->getPluginViewDefinitionsByPluginNodeType($pluginNode->getNodeType()) !== []) {
                $pluginNodes[] = $pluginNode;
            }
        }
        return $pluginNodes;
    }