Class PropertiesSourceFormat
java.lang.Object
org.apache.torque.generator.source.stream.PropertiesSourceFormat
- All Implemented Interfaces:
StreamSourceFormat
The source type representing an properties source.
$Id: PropertiesSourceFormat.java 1917241 2024-04-21 13:29:41Z tv $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether other is equal to this instance.Gets the filename extension this source type typically has.getKey()Returns an unique key for the source type.inthashCode()Returns a hash code of this instance consistent with equals.parse(InputStream inputStream, ControllerState controllerState) Parses a Stream in Properties format and returns the root element of the created element tree.toString()
-
Field Details
-
ROOT_ELEMENT_NAME
The name of the root element.- See Also:
-
ENTRY_ELEMENT_NAME
The name of the entry element.- See Also:
-
KEY_ATTRIBUTE_NAME
The name of the key attribute of the entry element.- See Also:
-
-
Constructor Details
-
PropertiesSourceFormat
public PropertiesSourceFormat()
-
-
Method Details
-
getKey
Returns an unique key for the source type.- Specified by:
getKeyin interfaceStreamSourceFormat- Returns:
- "properties".
-
getFilenameExtension
Gets the filename extension this source type typically has.- Specified by:
getFilenameExtensionin interfaceStreamSourceFormat- Returns:
- "properties".
-
parse
public SourceElement parse(InputStream inputStream, ControllerState controllerState) throws SourceException Parses a Stream in Properties format and returns the root element of the created element tree.- Specified by:
parsein interfaceStreamSourceFormat- Parameters:
inputStream- the input stream to parse, not null.controllerState- the controller state.- Returns:
- the root element of the created tree, not null.
- Throws:
SourceException- if an error occurred when reading from the input stream.IllegalArgumentException- if the input stream contains a malformed unicode escape sequence.NullPointerException- if inputStream is null.
-
hashCode
public int hashCode()Returns a hash code of this instance consistent with equals. As all instances of this class are equal to each other, the hash code is always the same. -
equals
Checks whether other is equal to this instance. All instances of this class are equal to each other. -
toString
-