Returns the list of plugin resources belonging to the specified resource class. Never null.

@param <E> A subclass of PluginResource.
@param clazz The resource class being sought.
@return List of associated resources.
192806
@SuppressWarnings("unchecked")
    public <E extends IPluginResource> List<E> getResources(Class<E> clazz) {
        List<E> list = new ArrayList<>();

        for (IPluginResource resource : resources) {
            if (clazz.isInstance(resource)) {
                list.add((E) resource);
            }
        }

        return list;
    }
184125
public static List<Field> findFields(final Class<?> clazz) {
        List<Field> foundFields = new ArrayList<>();
        Class<?> searchType = clazz;
        while (!Object.class.equals(searchType) && (searchType != null)) {
            Field[] fields = searchType.getDeclaredFields();
            for (Field field : fields) {
                field.setAccessible(true);
                foundFields.add(field);
            }
            searchType = searchType.getSuperclass();
        }
        return foundFields;
    }
1290860
public List<ResourceFileSource> getSources() {
		List<ResourceFileSource> sources = new ArrayList<ResourceFileSource>();
		sources.add(this);
		return sources;
	}
369934
public @NotNull List<Resource> getResources(@NotNull Predicate<Resource> filter) {
    return getResources(filter, (Resource)null);
  }
1009202
public static Collection<String> getPropertyNames(
                    final Class<?> clazz
                    )
    {
        if (clazz == null) {
            throw new IllegalArgumentException( "no class specified" );
        }

        Map<String, PropertyAccessor>  accessors = _getAccessors( clazz );

        return accessors.keySet();
    }
45465
public static String getResourceType(Class<? extends BoxResource> clazz) {
        BoxResourceType resource = clazz.getAnnotation(BoxResourceType.class);
        if (resource == null) {
            throw new IllegalArgumentException("Provided BoxResource type does not have @BoxResourceType annotation.");
        }
        return resource.value();
    }
1238079
public static <T> T getResourceFromJson(Class clazz, JsonObject jsonEntity) {
        return (T) gson.fromJson(jsonEntity, clazz);
    }
1060241
public static Class<?>[] getAllSuperClasses(Class<?> clz) {
    List<Class<?>> list = new ArrayList<>();
    while ((clz = clz.getSuperclass()) != null) {
      list.add(clz);
    }
    return list.toArray(new Class<?>[list.size()]);
  }
1262284
public static Field[] getAllFields(final Class<?> clazz) {
        final List<Field> allFields = new ArrayList<>();
        addFields(allFields, clazz);
        return allFields.toArray(new Field[allFields.size()]);
    }
803727
public static List<String> readResource(Class<?> clazz, String fn) throws IOException {
		try (final Reader reader = asReaderUTF8Lenient(getResourceAsStream(clazz, fn))) {
			return readToList(reader);
		}
	}
928253
public <T extends ServiceConfiguration<?>> List<T> getExistingServiceConfigurations(Class<T> clazz) {
    ArrayList<T> results = new ArrayList<>();
    for (ServiceConfiguration<?> serviceConfiguration : serviceConfigurations) {
      if (clazz.equals(serviceConfiguration.getClass())) {
        results.add(clazz.cast(serviceConfiguration));
      }
    }
    return results;
  }
568559
public static Image getImageFromResources(Class<?> clazz, String name) throws IOException {
		return getImageFromResources(clazz, name, Toolkit.getDefaultToolkit());
	}
468726
@Override
    public Collection<Resource> getResources() {
        return resources == null ? Collections.<Resource>emptyList() : resources;
    }
942919
public List getPlugins(final Class pluginClass) {
        synchronized (pluginMap) {
            List pluginList = new ArrayList(pluginMap.size());
            Iterator iter = pluginMap.values().iterator();

            while (iter.hasNext()) {
                Object plugin = iter.next();

                if (pluginClass.isInstance(plugin)) {
                    pluginList.add(plugin);
                }
            }
            return pluginList;
        }
    }
764983
@Override
    public Enumeration<URL> getResources(String name) throws IOException {
        if (this.rootClassLoader == null) {
            return findResources(name);
        }
        return new ResourceEnumeration(this.rootClassLoader.getResources(name),
                findResources(name));
    }
1250403
public static Resources getClassResources( Class clazz, Locale locale )
    {
        return getBaseResources( getClassResourcesBaseName( clazz ), locale, clazz.getClassLoader() );
    }
862854
public List<ResourceMeta> getZanataResources() {
        ClientResponse<List<ResourceMeta>> response = null;
        try {
            final ISourceDocResource client = proxyFactory.getSourceDocResource(details.getProject(), details.getVersion());
            response = client.get(null);

            final Status status = Response.Status.fromStatusCode(response.getStatus());

            if (status == Response.Status.OK) {
                final List<ResourceMeta> entities = response.getEntity();
                return entities;
            } else {
                log.error(
                        "REST call to get() did not complete successfully. HTTP response code was " + status.getStatusCode() + ". Reason " +
                                "was " + status.getReasonPhrase());
            }
        } catch (final Exception ex) {
            log.error("Failed to retrieve the list of Zanata Source Documents", ex);
        } finally {
            /*
             * If you are using RESTEasy client framework, and returning a Response from your service method, you will
             * explicitly need to release the connection.
             */
            if (response != null) response.releaseConnection();
            
            /* Perform a small wait to ensure zanata isn't overloaded */
            performZanataRESTCallWaiting();
        }

        return null;
    }