public class FileParameterParser extends AbstractParameterParser
locale
Constructor and Description |
---|
FileParameterParser()
Default constructor.
|
FileParameterParser(Locale locale)
Constructs a new file parameter parser using the given locale.
|
Modifier and Type | Method and Description |
---|---|
String |
getTypeToken()
Returns the string which serves as a value type token for parameters of
this type.
|
Constraints |
parse(Properties db,
TokenTranslator tr,
ParserLoader parserLoader)
Creates an instance of
FileConstraints . |
Serializable |
parse(String token,
Constraints constraints,
Parameters soFar)
Returns a non-null object if the parsing of the given token was
succesful and if the object value complied with the specified
constraints, if any were specified.
|
getLocale
public FileParameterParser()
public FileParameterParser(Locale locale)
locale
- Locale to associate with this parser.public String getTypeToken()
TypedParser
TypedParser.getTypeToken()
public Constraints parse(Properties db, TokenTranslator tr, ParserLoader parserLoader)
FileConstraints
.db
- Set of properties that can be used to parametrize the
constraints implementation.tr
- A token translator that can be used for
locale-specific or other types of value translation.parserLoader
- Reference to the parameter and constraints parser loader.FileConstraints
instance created using the
specified properties.ConstraintsParser.parse(java.util.Properties, com.hp.util.format.TokenTranslator, com.hp.util.syntax.ParserLoader)
public Serializable parse(String token, Constraints constraints, Parameters soFar)
token
- String to be decoded/parsed into a Serializable entity.constraints
- Constraints & hints to use for parsing
and for validating the resulting Serializable.soFar
- Parameters accumulated by the parsing process thus far.File
instance or null if the
resulting File value does not meet the constraints, if any.ParameterParser.parse(java.lang.String, com.hp.util.syntax.parsers.Constraints, com.hp.util.syntax.Parameters)
Copyright © 2015. All Rights Reserved.