Return all interfaces (and subinterfaces) on the system
761780
static List<NetworkInterface> getInterfaces() throws SocketException {
        List<NetworkInterface> all = new ArrayList<NetworkInterface>();
        addAllInterfaces(all, Collections.list(NetworkInterface.getNetworkInterfaces()));
        return all;
    }
711248
def [](id)
      interfaces_hash.fetch(id.to_s) do
        raise UnknownInterface.new(id.to_s),
              "Unknown interface: #{id}"
      end
    end
317100
public ClassDoc[] interfaces() {
        ListBuffer<ClassDocImpl> ta = new ListBuffer<>();
        for (Type t : env.types.interfaces(type)) {
            ta.append(env.getClassDoc((ClassSymbol)t.tsym));
        }
        //### Cache ta here?
        return ta.toArray(new ClassDocImpl[ta.length()]);
    }
739656
def EnumerateInterfacesFromClient(args):
  """"""
  del args  # Unused

  libc = ctypes.cdll.LoadLibrary(ctypes.util.find_library("c"))
  ifa = Ifaddrs()
  p_ifa = ctypes.pointer(ifa)
  libc.getifaddrs(ctypes.pointer(p_ifa))

  for iface in ParseIfaddrs(p_ifa):
    yield iface

  libc.freeifaddrs(p_ifa)
1009071
public ClassDoc[] interfaces() {
        ListBuffer<ClassDocImpl> ret = new ListBuffer<ClassDocImpl>();
        for (ClassDocImpl c : getClasses(true)) {
            if (c.isInterface()) {
                ret.append(c);
            }
        }
        return ret.toArray(new ClassDocImpl[ret.length()]);
    }
262132
def fetch_interfaces(self):
        
        return get('ISteamWebAPIUtil', 'GetSupportedAPIList', 1,
            https=self.https,
            apihost=self.apihost,
            caller=None,
            session=self.session,
            params={'format': 'json',
                    'key': self.key,
                    },
            )
214354
private static void getInterfaceMethods(Class<?> cls,
                                            Map<Signature, Method> sigs) {
        Class<?>[] intfs = cls.getInterfaces();
        for (int i=0; i < intfs.length; i++) {
            Class<?> intf = intfs[i];
            boolean done = getInternalPublicMethods(intf, sigs);
            if (!done) {
                getInterfaceMethods(intf, sigs);
            }
        }
    }
1213505
public static String[] getInterfaceNames(Class<?> c) {
        Class<?>[] interfaces = c.getInterfaces();
        List<String> names = new ArrayList<>();
        for (Class<?> i : interfaces) {
            names.add(i.getName());
        }
        return names.toArray(new String[0]);
    }
728563
def interfaces(self):
        """"""
        
        ifaces = []
        for f in sorted(os.listdir(CTRL_IFACE_DIR)):
            sock_file = '/'.join([CTRL_IFACE_DIR, f])
            mode = os.stat(sock_file).st_mode
            if stat.S_ISSOCK(mode):
                iface = {}
                iface['name'] = f
                ifaces.append(iface)
                self._connect_to_wpa_s(f)

        return ifaces
399010
def Get(self, interface_name, property_name):
        ''''''

        self.log('Get %s.%s' % (interface_name, property_name))

        if not interface_name:
            interface_name = self.interface
        try:
            return self.GetAll(interface_name)[property_name]
        except KeyError:
            raise dbus.exceptions.DBusException(
                'no such property ' + property_name,
                name=self.interface + '.UnknownProperty')
1034148
def ethernet_interfaces(self):
        """"""
        return ethernet_interface.EthernetInterfaceCollection(
            self._conn,
            self._get_hpe_sub_resource_collection_path('EthernetInterfaces'),
            redfish_version=self.redfish_version)
32287
private Class[] getInterfaces(Class clazz) {
        Class superClazz = clazz;
        Class[] interfaces = clazz.getInterfaces();

        // clazz can be an interface itself and when getInterfaces()
        // is called on an interface it returns only the extending
        // interfaces, not the interface itself.
        if (clazz.isInterface()) {
            Class[] tempInterfaces = new Class[interfaces.length + 1];
            tempInterfaces[0] = clazz;

            System.arraycopy(interfaces, 0, tempInterfaces, 1, interfaces.length);
            interfaces = tempInterfaces;
        }

        // add all interfaces implemented by superclasses to the interfaces array
        while ((superClazz = superClazz.getSuperclass()) != null) {
            Class[] superInterfaces = superClazz.getInterfaces();
            Class[] combInterfaces = new Class[interfaces.length + superInterfaces.length];
            System.arraycopy(interfaces, 0, combInterfaces, 0, interfaces.length);
            System.arraycopy(superInterfaces, 0, combInterfaces, interfaces.length, superInterfaces.length);
            interfaces = combInterfaces;
        }

        /**
         * Must remove duplicate interfaces before calling Proxy.getProxyClass().
         * Duplicates can occur if a subclass re-declares that it implements
         * the same interface as one of its ancestor classes.
         **/
        HashMap unique = new HashMap();
        for (int i = 0; i < interfaces.length; i++) {
            unique.put(interfaces[i].getName(), interfaces[i]);
        }
        /* Add the OJBProxy interface as well */
        unique.put(OJBProxy.class.getName(), OJBProxy.class);

        interfaces = (Class[])unique.values().toArray(new Class[unique.size()]);

        return interfaces;
    }
815035
def fetch_interfaces(self, interface, way):
        
        if not interface:
            return []
        if way == 'requires':
            request = '&requires=' + interface
        else:
            request = '&provides=' + interface
        url = (self.url + '/search?' +
               'include=charm-metadata&include=stats&include=supported-series'
               '&include=extra-info&include=bundle-unit-count'
               '&limit=1000&include=owner' + request)
        data = self._get(url)
        return data.json().values()
939121
public final Iterable<ObjectType> getAllImplementedInterfaces() {
    // Store them in a linked hash set, so that the compile job is
    // deterministic.
    Set<ObjectType> interfaces = new LinkedHashSet<>();

    for (ObjectType type : getImplementedInterfaces()) {
      addRelatedInterfaces(type, interfaces);
    }
    return interfaces;
  }
912838
def __collect_interfaces_return(interfaces):
        """"""
        acc = []
        for (interfaceName, interfaceData) in interfaces.items():
            signalValues = interfaceData.get("signals", {})
            for (signalName, signalValue) in signalValues.items():
                pinName = "{0}.{1}".format(interfaceName, signalName)
                acc.append({'id': pinName, 'value': signalValue})
        return acc
644518
def _parse_interfaces(self):
        
        interfaces = dict()
        names = re.findall(r'^interface (Po.+)$', self.config, re.M)
        for name in names:
            config = self.get_block('interface %s' % name)
            match = re.search(r'mlag (\d+)', config)
            if match:
                interfaces[name] = dict(mlag_id=match.group(1))
        return dict(interfaces=interfaces)
1260968
public static List<Class<?>> findAllSuperInterfaces(final Class<?> a) {
        LinkedList<Class<?>> list = new LinkedList<Class<?>>();
        Queue<Class<?>> queue = new LinkedList<Class<?>>();
        queue.add(a);
        while (!queue.isEmpty()) {
            Class<?> c = queue.poll();
            if (c.isInterface()) {
                list.addFirst(c);
            }
            queue.addAll(Arrays.asList(c.getInterfaces()));
        }
        return list;
    }