Package net.sf.jguiraffe.locators
Class AbstractLocator
- java.lang.Object
-
- net.sf.jguiraffe.locators.AbstractLocator
-
- All Implemented Interfaces:
Locator
- Direct Known Subclasses:
AbstractStreamLocator
,ClassPathLocator
,FileLocator
,URLLocator
public abstract class AbstractLocator extends Object implements Locator
An adapter class for implementing concrete
Locator
classes.This class implements the
Locator
interface and provides dummy implementations for most of the methods defined in this interface. It can serve as a starting point for the implementation of customLocator
classes; then the developer only needs to deal with the methods that are really required.Because the
getURL()
method must be implemented in every locator, no dummy implementation for this method is provided.- Version:
- $Id: AbstractLocator.java 205 2012-01-29 18:29:57Z oheger $
- Author:
- Oliver Heger
-
-
Constructor Summary
Constructors Constructor Description AbstractLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
Dummy implementation of this interface method.InputStream
getInputStream()
Dummy implementation of this interface method.
-
-
-
Method Detail
-
getFile
public File getFile() throws LocatorException
Dummy implementation of this interface method. Always returns null.- Specified by:
getFile
in interfaceLocator
- Returns:
- a file object for the represented resource
- Throws:
LocatorException
- if an error occurs
-
getInputStream
public InputStream getInputStream() throws IOException, LocatorException
Dummy implementation of this interface method. Always returns null.- Specified by:
getInputStream
in interfaceLocator
- Returns:
- an input stream for the represented resource
- Throws:
IOException
- if an IO error occursLocatorException
- if an internal error occurs
-
-