Package org.apache.maven.building
Class StringSource
java.lang.Object
org.apache.maven.building.StringSource
- All Implemented Interfaces:
Source
- Direct Known Subclasses:
StringModelSource
,StringSettingsSource
Deprecated.
Wraps an ordinary
CharSequence
as a source.-
Constructor Summary
ConstructorsConstructorDescriptionStringSource
(CharSequence content) Deprecated.Creates a new source backed by the specified string.StringSource
(CharSequence content, String location) Deprecated.Creates a new source backed by the specified string. -
Method Summary
-
Constructor Details
-
StringSource
Deprecated.Creates a new source backed by the specified string.- Parameters:
content
- The String representation, may be empty ornull
.
-
StringSource
Deprecated.Creates a new source backed by the specified string.- Parameters:
content
- The String representation, may be empty ornull
.location
- The location to report for this use, may benull
.
-
-
Method Details
-
getInputStream
Deprecated.Description copied from interface:Source
Gets a byte stream to the source contents. Closing the returned stream is the responsibility of the caller.- Specified by:
getInputStream
in interfaceSource
- Returns:
- A byte stream to the source contents, never
null
. - Throws:
IOException
- in case of IO issue
-
getLocation
Deprecated.Description copied from interface:Source
Provides a user-friendly hint about the location of the source. This could be a local file path, a URI or just an empty string. The intention is to assist users during error reporting.- Specified by:
getLocation
in interfaceSource
- Returns:
- A user-friendly hint about the location of the source, never
null
.
-
getContent
Deprecated.Gets the content of this source.- Returns:
- The underlying character stream, never
null
.
-
toString
Deprecated. -
hashCode
public int hashCode()Deprecated. -
equals
Deprecated.
-
org.apache.maven.api.services
instead