Package org.apache.sling.servlets.resolver.internal.helper

# Class NamedScriptResourceCollector

java.lang.Object
org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector
org.apache.sling.servlets.resolver.internal.helper.NamedScriptResourceCollector

public class NamedScriptResourceCollector extends AbstractResourceCollector
The `ResourceCollector` class provides a single public method - `#getServlets(ResourceResolver)` - which is used to find an ordered collection of `Resource` instances which may be used to find a servlet or script to handle a request to the given resource.

## Field Summary

### Fields inherited from class org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector

`baseResourceType, CACHE_KEY_CHILDREN_LIST, CACHE_KEY_RESOURCES, executionPaths, extension, hashCode, resourceSuperType, resourceType, useResourceCaching`

## Constructor Summary

Constructors
Constructor
Description
`NamedScriptResourceCollector(String baseResourceType, String resourceType, String resourceSuperType, String scriptName, String extension, String[] executionPaths, boolean useResourceCaching)`

## Method Summary

Modifier and Type
Method
Description
`static NamedScriptResourceCollector`
`create(String name, org.apache.sling.api.resource.Resource resource, String[] executionPaths, boolean useResourceCaching)`
`boolean`
`equals(Object obj)`
`protected void`
`getWeightedResources(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, org.apache.sling.api.resource.Resource location)`
`int`
`hashCode()`

### Methods inherited from class org.apache.sling.servlets.resolver.internal.helper.AbstractResourceCollector

`addWeightedResource, clearCache, getResource, getResourceOrNull, getServlets, stringEquals`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### NamedScriptResourceCollector

public NamedScriptResourceCollector(String baseResourceType, String resourceType, String resourceSuperType, String scriptName, String extension, String[] executionPaths, boolean useResourceCaching)

## Method Details

### create

public static NamedScriptResourceCollector create(String name, org.apache.sling.api.resource.Resource resource, String[] executionPaths, boolean useResourceCaching)

### getWeightedResources

protected void getWeightedResources(Set<org.apache.sling.servlets.resolver.internal.helper.WeightedResource> resources, org.apache.sling.api.resource.Resource location)

Specified by:
  `getWeightedResources` in class `AbstractResourceCollector`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `AbstractResourceCollector`

### equals

public boolean equals(Object obj)

Overrides:
  `equals` in class `AbstractResourceCollector`