edu.umd.cs.findbugs.ba.interproc
public abstract class PropertyDatabase<KeyType extends ClassMember,ValueType> extends Object
Parameters:
| Constructor Summary | |
|---|---|
| protected | PropertyDatabase()
Constructor.
|
| Method Summary | |
|---|---|
| protected abstract ValueType | decodeProperty(String propStr)
Subclasses must define this to instantiate the actual property
value from its string encoding.
|
| protected abstract String | encodeProperty(ValueType property)
Subclasses must define this to encode a property
as a string for output to a file.
|
| Set<KeyType> | getKeys() |
| ValueType | getProperty(KeyType key)
Get a property.
|
| boolean | isEmpty()
Return whether or not the database is empty.
|
| protected abstract KeyType | parseKey(String s)
Parse a key from a String.
|
| void | read(InputStream in)
Read property database from an input stream.
|
| void | readFromFile(String fileName)
Read property database from given file.
|
| ValueType | removeProperty(KeyType key)
Remove a property.
|
| void | setProperty(KeyType key, ValueType property)
Set a property.
|
| void | write(OutputStream out)
Write property database to an OutputStream.
|
| protected abstract void | writeKey(Writer writer, KeyType key)
Write an encoded key to given Writer.
|
| void | writeToFile(String fileName)
Write property database to given file.
|
Parameters: propStr String containing the encoded property
Returns: the property
Throws: MethodPropertyDatabaseFormatException
Parameters: property the property
Returns: a String which encodes the property
Parameters: key the key
Returns: the property, or null if no property is set for this key
Returns: true if the database is empty, false it it has at least one entry
Parameters: s a String
Returns: the decoded key
Throws: PropertyDatabaseFormatException
Parameters: in the InputStream
Throws: IOException MethodPropertyDatabaseFormatException
Parameters: fileName name of the database file
Throws: IOException MethodPropertyDatabaseFormatException
Parameters: key the key
Returns: the old property, or null if there was no property defined for this key
Parameters: key the key property the property
Parameters: out the OutputStream
Throws: IOException
Parameters: writer the Writer key the key
Parameters: fileName name of the database file
Throws: IOException