Package org.codehaus.commons.compiler.util.resource

# Class FileResourceFinder

java.lang.Object
org.codehaus.commons.compiler.util.resource.ResourceFinder
org.codehaus.commons.compiler.util.resource.ListableResourceFinder
org.codehaus.commons.compiler.util.resource.FileResourceFinder

Direct Known Subclasses:
  `DirectoryResourceFinder`

public abstract class FileResourceFinder extends ListableResourceFinder
This class specializes the `ResourceFinder` for finding resources in `File`s.

It finds `FileResource`s instead of simple `Resource`s.

## Field Summary

### Fields inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder

`EMPTY_RESOURCE_FINDER`

## Constructor Summary

Constructors
Constructor
Description
`FileResourceFinder()`

## Method Summary

Modifier and Type
Method
Description
`final Resource`
`findResource(String resourceName)`
Finds a resource by name and return it as a `Resource` object.
`protected abstract File`
`findResourceAsFile(String resourceName)`
Converts a given resource resource name into a `File`.

### Methods inherited from class org.codehaus.commons.compiler.util.resource.ListableResourceFinder

`list`

### Methods inherited from class org.codehaus.commons.compiler.util.resource.ResourceFinder

`findResourceAsStream`

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

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

## Constructor Details

### FileResourceFinder

public FileResourceFinder()

## Method Details

### findResource

@Nullable public final Resource findResource(String resourceName)
Description copied from class: `ResourceFinder`
Finds a resource by name and return it as a `Resource` object.

Specified by:
  `findResource` in class `ResourceFinder`
Parameters:
  `resourceName` - Designates the resource; typically structured by slashes ("/") like "`com/foo/pkg/Bar.class`"
Returns:
  `null` if the resource could not be found

### findResourceAsFile

@Nullable protected abstract File findResourceAsFile(String resourceName)
Converts a given resource resource name into a `File`.