Returns a list of input connections from the scene that match the 
        inputed class for this node.
        
        :param      cls | <subclass of XNodeConnection> || None
        
        :return     [<XNodeConnection>, ..]
433260
def inputConnections(self, cls=None):
        
        scene = self.scene()
        if not scene:
            return []
        
        if not cls:
            cls = XNodeConnection
        
        output = []
        for item in scene.items():
            if not isinstance(item, cls):
                continue
            
            if item.inputNode() == self:
                output.append(item)
        
        return output
901952
def connected_objects(self, from_obj):
        
        return self.to_content_type.get_all_objects_for_this_type(pk__in=self.connected_object_ids(from_obj))
362092
@SuppressWarnings("unchecked")
    public static <T extends Node> void findNodes(List<Node> nodes, Class<T> cls, List<T> results) {
        for (Node n : nodes) {
            if (n instanceof ContainerNode) {
                findNodes(((ContainerNode) n).getNodes(), cls, results);
            }

            if (cls == n.getClass()) {
                results.add((T) n);
            }
        }
    }
2189
def _from_objects(cls, objects):
        
        vertices = ElementTransformSet(transform=id)
        out_edges = KeyTransformDict(transform=id)
        in_edges = KeyTransformDict(transform=id)
        for obj in objects:
            vertices.add(obj)
            out_edges[obj] = []
            in_edges[obj] = []

        # Edges are identified by simple integers, so
        # we can use plain dictionaries for mapping
        # edges to their heads and tails.
        edge_label = itertools.count()
        edges = set()
        head = {}
        tail = {}

        for referrer in vertices:
            for referent in gc.get_referents(referrer):
                if referent not in vertices:
                    continue
                edge = next(edge_label)
                edges.add(edge)
                tail[edge] = referrer
                head[edge] = referent
                out_edges[referrer].append(edge)
                in_edges[referent].append(edge)

        return cls._raw(
            vertices=vertices,
            edges=edges,
            out_edges=out_edges,
            in_edges=in_edges,
            head=head,
            tail=tail,
        )
910311
public static Set<Class<?>> getAllSuperTypes(final Class<?> cls) {
        final Set<Class<?>> superTypesFound = new LinkedHashSet<>();

        getAllSuperTypes(cls, superTypesFound);

        return superTypesFound;
    }
1305604
def with_class(self, cls):
        
        rcls = []
        for key, value in self._classification.items():
            if value[0] == cls:
                rcls.append(key)
        return rcls
1341580
def get_roots(self, relations=None, prefix=None):
        
        g = self.get_filtered_graph(relations=relations, prefix=prefix)
        # note: we also eliminate any singletons, which includes obsolete classes
        roots = [n for n in g.nodes() if len(list(g.predecessors(n))) == 0 and len(list(g.successors(n))) > 0]
        return roots
283115
def get_connections(self, data=False):
        
        if data:
            return self._connections
        return list(self._connections.keys())
747784
private final Field[] getFields (Class<? extends Object> cls) {
    	Field[] ret = SEEN_CLASSES.get(cls);
        if (ret != null) {
            return ret;
        }

        List<Field> retL = new ArrayList<Field>();
        for (Field f: cls.getDeclaredFields ()) {
        	if (!isSimpleType(f)) {
        		retL.add(f);
        		f.setAccessible(true);
        	}
        }

        //the 2nd case can occur if the incoming object is of type Object.class
        //--> See Test_084_SerailizationBugRefToPM.
        if (cls.getSuperclass() != Object.class && cls != Object.class) {
        	for (Field f: getFields(cls.getSuperclass())) {
        		retL.add(f);
        	}
        }
        ret = retL.toArray(new Field[retL.size()]);
        SEEN_CLASSES.put(cls, ret);
        return ret;
    }
311621
def selectedConnections( self ):
        
        output = []
        for item in self.selectedItems():
            if ( isinstance(item, XNodeConnection) ):
                output.append(item)
        return output
1013526
def get_inputs(node, kwargs):
    """"""
    name = node["name"]
    proc_nodes = kwargs["proc_nodes"]
    index_lookup = kwargs["index_lookup"]
    inputs = node["inputs"]
    attrs = node.get("attrs", {})

    input_nodes = []
    for ip in inputs:
        input_node_id = index_lookup[ip[0]]
        input_nodes.append(proc_nodes[input_node_id].name)

    return name, input_nodes, attrs
1220126
def list_of(cls):
    
    return lambda l: isinstance(l, list) and all(isinstance(x, cls) for x in l)
1105931
def input_connections(self, name):
        
        for input_name in self._compound_children[name].inputs:
            dest = name, input_name
            for src, dests in self._compound_linkages.items():
                if isinstance(dests[0], six.string_types):
                    dests = zip(dests[0::2], dests[1::2])
                if dest in dests:
                    yield src, dest
848423
def get_siblings(self):
        
        if self.parent:
            return get_result_class(self.__class__).objects.filter(
                parent=self.parent)
        return self.__class__.get_root_nodes()
361963
protected boolean nodeMatches(Node node, Class<? extends Node> cls, String uri) {
        if (node.getClass() == cls) {
            return uri == null || NodeUtil.isOriginalURI(node, uri);
        }

        return false;
    }
47521
def from_elements(cls, elts=None):
        
        node = cls()
        if elts is None:
            node.elts = []
        else:
            node.elts = [const_factory(e) if _is_const(e) else e for e in elts]
        return node
121629
def inherited_labels(cls):
        
        return [scls.__label__ for scls in cls.mro()
                if hasattr(scls, '__label__') and not hasattr(
                scls, '__abstract_node__')]