Module org.tquadrat.foundation.util
Class FileStringConverter
java.lang.Object
org.tquadrat.foundation.util.stringconverter.FileStringConverter
- All Implemented Interfaces:
Serializable,StringConverter<File>
@ClassVersion(sourceVersion="$Id: FileStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $")
@API(status=STABLE,
since="0.0.6")
public final class FileStringConverter
extends Object
implements StringConverter<File>
An implementation of
The file or folder that will be identified by the respective
File names will not be normalised or canonicalized.
A file name of only blanks will be accepted as valid, while the empty String will cause an
StringConverter
for
File
values.The file or folder that will be identified by the respective
File object do not need to exist nor is it guaranteed that it can
be accessed or create through the current user.File names will not be normalised or canonicalized.
A file name of only blanks will be accepted as valid, while the empty String will cause an
IllegalArgumentException.- Author:
- Thomas Thrien (thomas.thrien@tquadrat.org)
- Version:
- $Id: FileStringConverter.java 1060 2023-09-24 19:21:40Z tquadrat $
- Since:
- 0.0.6
- See Also:
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.util.stringconverter.FileStringConverter"
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FileStringConverterAn instance of this class.static final StringThe error message for an invalid file name "\'%s\' cannot be parsed as a valid file name".Fields inherited from interface org.tquadrat.foundation.lang.StringConverter
METHOD_NAME_GetSubjectClass, METHOD_NAME_Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal FilefromString(CharSequence source) static final FileStringConverterprovider()This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.final String
-
Field Details
-
MSG_InvalidFileName
The error message for an invalid file name "\'%s\' cannot be parsed as a valid file name".- See Also:
-
INSTANCE
An instance of this class.
-
-
Constructor Details
-
FileStringConverter
public FileStringConverter()Creates a new instance ofFileStringConverter.
-
-
Method Details
-
fromString
- Specified by:
fromStringin interfaceStringConverter<File>- Throws:
IllegalArgumentException
-
provider
This method is used by theServiceLoaderto obtain the instance for thisStringConverterimplementation.- Returns:
- The instance for this
StringConverterimplementation.
-
toString
- Specified by:
toStringin interfaceStringConverter<File>
-
