code: public static void renderHeaderResponse(final IHeaderResponse response,
  		final Class<?> componentClass)
  	{
  		final Set<PackageResourceReferenceWrapper> headerContributors = PackageResourceReferences
  			.getInstance().getPackageResourceReference(componentClass);
  		if ((null != headerContributors) && !headerContributors.isEmpty())
  		{
  			for (final PackageResourceReferenceWrapper packageResourceReference : headerContributors)
  			{
  				if (packageResourceReference.getType().equals(ResourceReferenceType.JS))
  				{
  					final JavaScriptResourceReference reference = new JavaScriptResourceReference(
  						componentClass,
  						packageResourceReference.getPackageResourceReference().getName());
  					if (!response.wasRendered(reference))
  					{
  						final JavaScriptReferenceHeaderItem headerItem = JavaScriptHeaderItem
  							.forReference(reference);
  						response.render(headerItem);
  					}
  				}
  				if (packageResourceReference.getType().equals(ResourceReferenceType.CSS))
  				{
  					final CssResourceReference reference = new CssResourceReference(componentClass,
  						packageResourceReference.getPackageResourceReference().getName());
  					if (!response.wasRendered(reference))
  					{
  						final CssReferenceHeaderItem headerItem = CssHeaderItem
  							.forReference(reference);
  						response.render(headerItem);
  					}
  				}
  			}
  		}
  	}
docs: Render header response.
  
  @param response
  the response
  @param componentClass
  the component class