Returns the array of interfaces implemented by the ResourceGenerator

@param generator
the generator
@return the array of interfaces implemented by the ResourceGenerator
772694
private static Class<?>[] getGeneratorInterfaces(ResourceGenerator generator) {

		Set<Class<?>> interfaces = new HashSet<>();
		addInterfaces(generator, interfaces);
		return (Class[]) interfaces.toArray(new Class[] {});
	}
240371
def list_of(*generators):
    

    class ListOfGenerators(ArbitraryInterface):
        """
        A closure class around the generators specified above, which
        generates a list of the generators.
        """

        @classmethod
        def arbitrary(cls):
            """
            Generate a list of the enclosed generators.
            """
            arbitrary_list = []
            for generator in generators:
                arbitrary_list += [
                    arbitrary(generator)
                    # max_length / len(generators):
                    for _ in range(arbitrary(int) % 100)
                ]
            return arbitrary_list

    ListOfGenerators.__name__ = ''.join([
        'list_of(', ', '.join(generator.__name__ for generator in generators),
        ')'
    ])
    return ListOfGenerators
1369272
def viable_source_types_for_generator (generator):
    
    assert isinstance(generator, Generator)
    if generator not in __viable_source_types_cache:
        __vstg_cached_generators.append(generator)
        __viable_source_types_cache[generator] = viable_source_types_for_generator_real (generator)

    return __viable_source_types_cache[generator]
599188
private String getAllPublishedInterfaces(final GeneratorContext context)
			throws IOException {

		StringBuilder sb = new StringBuilder();

		Container container = getContainer(context);

		// The creatormanager holds the list of beans
		CreatorManager ctManager = (CreatorManager) container
				.getBean(CreatorManager.class.getName());
		if (null != ctManager) {
			Collection<String> creators;
			if (ctManager instanceof DefaultCreatorManager) {
				DefaultCreatorManager creatorManager = (DefaultCreatorManager) ctManager;
				boolean currentDebugValue = creatorManager.isDebug();
				creatorManager.setDebug(true); // DWR will throw a
												// SecurityException if not in
												// debug mode ...
				creators = ctManager.getCreatorNames(false);
				creatorManager.setDebug(currentDebugValue);
			} else {
				log.warn("Getting creator names from an unknown CreatorManager. This may fail ...");
				creators = ctManager.getCreatorNames(false);
			}
			List<String> creatorList = new ArrayList<>(creators);
			Collections.sort(creatorList);
			for (String name : creatorList) {
				if (log.isDebugEnabled())
					log.debug("_** mapping: generating found interface named: "
							+ name);
				InterfaceHandler handler = (InterfaceHandler) ContainerUtil
						.getHandlerForUrlProperty(container,
								INTERFACE_HANDLER_URL);
				sb.append(handler.generateInterfaceScript(context
						.getServletContext().getContextPath(), context
						.getConfig().getDwrMapping(), name));
			}
		}

		return sb.toString();
	}
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]);
    }
1270642
public <T extends DataObject> List<T> collect(Class<T> type, Callable<T> factory) {
        Generator<T> generator = new Generator<T>(type, factory);
        _generator = generator;
        return generator.list;
    }
642014
def get_implemented_interfaces(cls):
    
    if hasattr(cls, '__interfaces__'):
        return cls.__interfaces__
    return six.moves.reduce(
        lambda x, y: x.union(y),
        map(
            get_implemented_interfaces,
            inspect.getmro(cls)[1:]
        ),
        set()
    )
614238
private List<ResourceModel> generateResources(List<ResourceBuilderModel> resourceBuilders, EventModel event) {
        Optional<EventModel> parameter = event != null ? Optional.of(event) : Optional.empty();
        List<CompletableFuture<List<ResourceModel>>> futures = resourceBuilders.stream()
                .map(resourceB -> submit(() -> resourceB.provideResource(resourceB.announceResources(), parameter)))
                .collect(Collectors.toList());

        try {
            futures = timeOut(futures, 3000);
        } catch (InterruptedException e) {
            debug("interrupted while doing an time-out", e);
        }

        return futures.stream()
                .map(future -> {
                    try {
                        return future.get();
                    } catch (InterruptedException | ExecutionException e) {
                        debug("exception while trying to get the result from the future", e);
                        return null;
                    }
                })
                .filter(Objects::nonNull)
                .flatMap(Collection::stream)
                .collect(Collectors.toList());
    }
1325498
public List<FacesConfigApplicationResourceLibraryContractsType<FacesConfigApplicationType<T>>> getAllResourceLibraryContracts()
   {
      List<FacesConfigApplicationResourceLibraryContractsType<FacesConfigApplicationType<T>>> list = new ArrayList<FacesConfigApplicationResourceLibraryContractsType<FacesConfigApplicationType<T>>>();
      List<Node> nodeList = childNode.get("resource-library-contracts");
      for(Node node: nodeList)
      {
         FacesConfigApplicationResourceLibraryContractsType<FacesConfigApplicationType<T>>  type = new FacesConfigApplicationResourceLibraryContractsTypeImpl<FacesConfigApplicationType<T>>(this, "resource-library-contracts", childNode, node);
         list.add(type);
      }
      return list;
   }
945225
public IGeneratorSet getGeneratorSet()
    {
    return
      getType() == JSON?
      new GeneratorSetJsonReader( open()).getGeneratorSet() :

      new GeneratorSetDocReader( open()).getGeneratorSet();
    }
1247605
@NotNull
    public final List<GeneratorConfig> findGeneratorsForParser(@NotNull final String parserName) {
        Contract.requireArgNotNull("parserName", parserName);

        final List<GeneratorConfig> list = new ArrayList<>();
        final List<GeneratorConfig> gcList = generators.getList();
        for (final GeneratorConfig gc : gcList) {
            if (gc.getParser().equals(parserName)) {
                list.add(gc);
            }
        }
        return list;
    }
1299029
private Enumeration<NetworkInterface> getNetworkInterfaces() throws HarvestException {
		try {
			return NetworkInterface.getNetworkInterfaces();
		} catch (SocketException e) {
			throw new HarvestException("Could not retrieve list of available Network Interfaces.", e);
		}
	}
190244
public static void getAllInterfaces(Class<?> classObject, ArrayList<Type> interfaces) {
        Type[] superInterfaces = classObject.getGenericInterfaces();
        interfaces.addAll((Arrays.asList(superInterfaces)));

        // for cases where the extended class is defined with a Generic.
        Type tgs = classObject.getGenericSuperclass();
        if (tgs != null) {
            if ((tgs) instanceof ParameterizedType) {
                interfaces.add(tgs);
            }
        }

        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "updated interfaces to: " + interfaces);
        }

        Class<?> superClass = classObject.getSuperclass();
        if (superClass != null) {
            getAllInterfaces(superClass, interfaces);
        }
    }
746748
public List<ResourceModel> generateResources(EventModel<?> event) {
        if(!event.getAllInformations().stream()
                .anyMatch(eventSubscribers::containsKey)) return new LinkedList<>();

        List<ResourceBuilderModel> resourceBuilders = event.getAllInformations().stream()
                .map(eventSubscribers::get)
                .filter(Objects::nonNull)
                .flatMap(Collection::stream)
                .distinct()
                .collect(Collectors.toList());
        
        return generateResources(resourceBuilders, event);
    }
528170
def interfaces(self) -> Iterable[ConstantClass]:
        
        return [self._constants[idx] for idx in self._interfaces]
193196
private static void addInterfaces(Object obj, Set<Class<?>> interfaces) {

		Class<?>[] generatorInterfaces = null;
		Class<?> superClass = null;
		if (obj instanceof Class) {
			generatorInterfaces = ((Class<?>) obj).getInterfaces();
			superClass = ((Class<?>) obj).getSuperclass();
		} else {
			generatorInterfaces = obj.getClass().getInterfaces();
			superClass = obj.getClass().getSuperclass();
		}
		for (Class<?> generatorInterface : generatorInterfaces) {
			interfaces.add(generatorInterface);
			addInterfaces(generatorInterface, interfaces);
		}

		if (superClass != null && superClass != Object.class) {
			addInterfaces(superClass, interfaces);
		}
	}
588734
def generators(self):
        
        if not self._generators:
            generators = list(self.graph.nodes_by_attribute('generator'))
            generators.extend(list(self.graph.nodes_by_attribute(
                'generator_aggr')))
            return generators
        else:
            return self._generators