ObjectListHandler
176405
@Override
    public boolean handleObject(ObjectInfo info) {
        logWriter.println(info.getPid());
        try {
            pauseOrCancelIfRequested();
            return true;
        } catch (TaskCanceledException e) {
            canceledException = e;
            return false;
        }
    }
942901
@SuppressWarnings("deprecation")
	public static Handler getHandler(List<Handler> handlerList, Handler actionHandler) {
		Handler result = actionHandler;
		
		for (int i=handlerList.size()-1; i>=0; i--) {
			Handler temp = handlerList.get(i);
			temp.next = result;
			temp.nextHandler = result;
			result = temp;
		}
		
		return result;
	}
519051
public List<T> handle(List<QueryParameters> outputList) throws MjdbcException {
        List<T> result = new ArrayList<T>();
        String parameterName = null;
        Object parameterValue = null;

        for (int i = 1; i < outputList.size(); i++) {
            if (this.columnName == null) {
                parameterName = outputList.get(i).getNameByPosition(this.columnIndex);
                parameterValue = outputList.get(i).getValue(parameterName);

                result.add((T) parameterValue);
            } else {
                parameterValue = outputList.get(i).getValue(this.columnName);

                result.add((T) parameterValue);
            }

        }

        return result;
    }
741781
def _protocolListGenerator(self, request, objectList):
        
        return self._protocolObjectGenerator(
            request, len(objectList), lambda index: objectList[index])
733374
def _objectListGenerator(self, request, objectList):
        
        return self._topLevelObjectGenerator(
            request, len(objectList), lambda index: objectList[index])
1054140
@Override
	protected void notifyHandler(ServerHandlerClass handler) {
	    Object instance = handler.newInstance();
	    assignDataToHandler(handler, instance);
	    ReflectMethodUtil.invokeHandleMethod(handler.getHandleMethod(), 
                instance, context);
	}
395449
public void sortByInstanceList(final List<Instance> _targetList,
                                   final Map<Instance, Integer> _currentList)
    {
        final List<Long> idListNew = new ArrayList<>();
        final List<Object> objectListNew = new ArrayList<>();
        for (final Instance instance : _targetList) {
            if (_currentList.containsKey(instance)) {
                final Integer i = _currentList.get(instance);
                idListNew.add(this.idList.get(i));
                objectListNew.add(this.objectList.get(i));
            }
        }
        this.idList.clear();
        this.idList.addAll(idListNew);
        this.objectList.clear();
        this.objectList.addAll(objectListNew);
    }
728986
HandleListInterface reAssociateHandleList() // d662032
    throws CSIException
    {
        HandleListInterface hl;

        if (connectionHandleList == null)
        {
            hl = HandleListProxy.INSTANCE;
        }
        else
        {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                Tr.debug(tc, "reAssociateHandleList: " + connectionHandleList);
            hl = connectionHandleList;

            try
            {
                hl.reAssociate();
            } catch (Exception ex)
            {
                throw new CSIException("", ex);
            }
        }

        return hl;
    }
845107
public H getHandler(Object o) {
    if(o == null) {
      return null;
    }
    // note that we start at the end of the list.
    ListIterator<Pair<Class<?>, H>> iter = handlers.listIterator(handlers.size());
    while(iter.hasPrevious()) {
      Pair<Class<?>, H> pair = iter.previous();
      try {
        // if we can cast to the restriction class, use the given handler.
        pair.getFirst().cast(o);
        return pair.getSecond();
      }
      catch(ClassCastException e) {
        // do nothing, but try previous in list
      }
    }
    return null;
  }
850138
private Class<?>[] getClassList(List<Object> objects) {
        Class<?>[] classes = new Class<?>[objects.size()];
        for (int i = 0; i < objects.size(); i++) {
            classes[i] = objects.get(i).getClass();
        }
        return classes;
    }
560828
def is_handler_subclass(cls, classnames=("ViewHandler", "APIHandler")):
    """"""
    if isinstance(cls, list):
        return any(is_handler_subclass(c) for c in cls)
    elif isinstance(cls, type):
        return any(c.__name__ in classnames for c in inspect.getmro(cls))
    else:
        raise TypeError(
            "Unexpected type `{}` for class `{}`".format(
                type(cls),
                cls
            )
        )
287726
private Object[] handleParameters(IoBuffer in, Notify notify, Input input) {
        Object[] params = new Object[] {};
        List<Object> paramList = new ArrayList<>();
        final Object obj = Deserializer.deserialize(input, Object.class);
        if (obj instanceof Map) {
            // Before the actual parameters we sometimes (connect) get a map of parameters, this is usually null, but if set should be
            // passed to the connection object.
            @SuppressWarnings("unchecked")
            final Map<String, Object> connParams = (Map<String, Object>) obj;
            notify.setConnectionParams(connParams);
        } else if (obj != null) {
            paramList.add(obj);
        }
        while (in.hasRemaining()) {
            paramList.add(Deserializer.deserialize(input, Object.class));
        }
        params = paramList.toArray();
        if (log.isDebugEnabled()) {
            log.debug("Num params: {}", paramList.size());
            for (int i = 0; i < params.length; i++) {
                log.debug(" > {}: {}", i, params[i]);
            }
        }
        return params;
    }
356464
def list_objects_access(f):
    """"""

    @functools.wraps(f)
    def wrapper(request, *args, **kwargs):
        if not django.conf.settings.PUBLIC_OBJECT_LIST:
            trusted(request)
        return f(request, *args, **kwargs)

    return wrapper
370263
public void synchronize(List<? extends E> list) {
		assert SwingUtilities.isEventDispatchThread() : ApplicationResources.accessor.getMessage("assert.notRunningInSwingEventThread");

		// Make sure the first element exists and matches
		int modelOffset;
		if(constantFirstRow!=null) {
			modelOffset = 1;
			if(getSize()==0) addElement(constantFirstRow);
			else if(!getElementAt(0).equals(constantFirstRow)) {
				insertElementAt(constantFirstRow, 0);
			}
		} else modelOffset = 0;

		// Synchronize the dynamic part of the list
		int size = list.size();
		for(int index=0; index<size; index++) {
			E obj = list.get(index);
			if(index>=(getSize()-modelOffset)) addElement(obj);
			else if(!obj.equals(getElementAt(index+modelOffset))) {
				// Objects don't match
				// If this object is found further down the list, then delete up to that object
				int foundIndex = -1;
				for(int searchIndex = index+1; searchIndex<(getSize()-modelOffset); searchIndex++) {
					if(obj.equals(getElementAt(searchIndex+modelOffset))) {
						foundIndex = searchIndex;
						break;
					}
				}
				if(foundIndex!=-1) {
					// No removeRange
					// removeRange(index+modelOffset, foundIndex-1+modelOffset);
					for(
						int removeIndex = foundIndex-1+modelOffset, end = index+modelOffset;
						removeIndex>=end;
						removeIndex--
					) removeElementAt(removeIndex);
				} else {
					// Otherwise, insert in the current index
					insertElementAt(obj, index+modelOffset);
				}
			}
		}
		// Remove any extra
		while((getSize()-modelOffset) > size) removeElementAt(getSize()-1);
	}
396454
public void returnHandlerObject(ModelHandler modelHandler) {
		if (modelHandler == null)
			return;
		try {
			handlerObjectFactory.returnHandlerObject(modelHandler);
		} catch (Exception ex) {
			Debug.logError("[JdonFramework] return modelHandler error" + ex, module);
		}

	}
978713
public void listAnyObject(PdfObject object)
    {
        switch (object.type()) {
        case PdfObject.ARRAY:
            listArray((PdfArray)object);
            break;
        case PdfObject.DICTIONARY:
            listDict((PdfDictionary) object);
            break;
        case PdfObject.STRING:
            out.println("(" + object.toString() + ")");
            break;
        default:
            out.println(object.toString());
            break;
        }
    }
1068551
def object_list(self):
        

        def _sort(ob, ol):
            reverse = ob.startswith("-")
            ob = ob[1:] if reverse else ob
            for column in self.columns:
                if column.sort_key_fn is not None and column.name == ob:
                    return sorted(ol, key=column.sort_key_fn, reverse=reverse)
            if self._meta.order_by and hasattr(ol, "order_by"):
                return list(ol.order_by(*self._meta.order_by.split("|")))
            return ol

        ol = self._object_list
        ob = self._meta.order_by
        if not ob: return ol
        if isinstance(ob, basestring):
            return _sort(ob, ol)
        elif isinstance(ob, list):
            ob.reverse()
            for fn in ob:
                ol = _sort(fn, ol)
        return ol