org.tinyjee.maven.dim.spi
Class AbstractSource
java.lang.Object
org.tinyjee.maven.dim.spi.AbstractSource
- All Implemented Interfaces:
- Source
- Direct Known Subclasses:
- AbstractBufferedSource, FixedContentSource, UrlSource
public abstract class AbstractSource
- extends Object
- implements Source
Base implementation for sources.
- Author:
- Juergen_Kellerer, 2011-10-19
sourceUrl
protected final URL sourceUrl
parameters
protected final Map<String,Object> parameters
AbstractSource
protected AbstractSource(URL sourceUrl,
Map<String,Object> parameters)
- Constructs a new instance of AbstractSource.
- Parameters:
sourceUrl
- the source 'url' or null if the source is not bound to an url.parameters
- the macro parameters assigned with this source.
getUrl
public URL getUrl()
- Description copied from interface:
Source
- Returns the underlying source URL or 'null' if this Source doesn't refer to an URL.
- Specified by:
getUrl
in interface Source
- Returns:
- the underlying source URL or 'null' if this Source doesn't refer to an URL.
getContent
public Source.Content getContent()
- Description copied from interface:
Source
- Retrieves the source content.
- Specified by:
getContent
in interface Source
- Returns:
- the source content.
toString
public String toString()
- Overrides:
toString
in class Object