|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.findbugs.ba.interproc.PropertyDatabase<KeyType,ValueType>
KeyType
- key type: either MethodDescriptor or FieldDescriptorValueType
- value type: a value that summarizes some property of the associated keypublic abstract class PropertyDatabase<KeyType extends FieldOrMethodDescriptor,ValueType>
Property database for interprocedural analysis.
Constructor Summary | |
---|---|
protected |
PropertyDatabase()
Constructor. |
Method Summary | |
---|---|
protected abstract ValueType |
decodeProperty(java.lang.String propStr)
Subclasses must define this to instantiate the actual property value from its string encoding. |
protected abstract java.lang.String |
encodeProperty(ValueType property)
Subclasses must define this to encode a property as a string for output to a file. |
java.util.Collection<java.util.Map.Entry<KeyType,ValueType>> |
entrySet()
|
java.util.Set<KeyType> |
getKeys()
|
ValueType |
getProperty(KeyType key)
Get a property. |
boolean |
isEmpty()
Return whether or not the database is empty. |
protected abstract KeyType |
parseKey(java.lang.String s)
Parse a key from a String. |
void |
read(java.io.InputStream in)
Read property database from an input stream. |
void |
readFromFile(java.lang.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(java.io.OutputStream out)
Write property database to an OutputStream. |
protected abstract void |
writeKey(java.io.Writer writer,
KeyType key)
Write an encoded key to given Writer. |
void |
writeToFile(java.lang.String fileName)
Write property database to given file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected PropertyDatabase()
Method Detail |
---|
public void setProperty(KeyType key, ValueType property)
key
- the keyproperty
- the propertypublic ValueType getProperty(KeyType key)
key
- the key
public java.util.Set<KeyType> getKeys()
public java.util.Collection<java.util.Map.Entry<KeyType,ValueType>> entrySet()
public boolean isEmpty()
public ValueType removeProperty(KeyType key)
key
- the key
public void readFromFile(java.lang.String fileName) throws java.io.IOException, PropertyDatabaseFormatException
fileName
- name of the database file
java.io.IOException
MethodPropertyDatabaseFormatException
PropertyDatabaseFormatException
public void read(@WillClose java.io.InputStream in) throws java.io.IOException, PropertyDatabaseFormatException
in
- the InputStream
java.io.IOException
MethodPropertyDatabaseFormatException
PropertyDatabaseFormatException
public void writeToFile(java.lang.String fileName) throws java.io.IOException
fileName
- name of the database file
java.io.IOException
public void write(@WillClose java.io.OutputStream out) throws java.io.IOException
out
- the OutputStream
java.io.IOException
protected abstract KeyType parseKey(java.lang.String s) throws PropertyDatabaseFormatException
s
- a String
PropertyDatabaseFormatException
protected abstract void writeKey(java.io.Writer writer, KeyType key) throws java.io.IOException
writer
- the Writerkey
- the key
java.io.IOException
protected abstract ValueType decodeProperty(java.lang.String propStr) throws PropertyDatabaseFormatException
propStr
- String containing the encoded property
MethodPropertyDatabaseFormatException
PropertyDatabaseFormatException
protected abstract java.lang.String encodeProperty(ValueType property)
property
- the property
|
FindBugs™ 1.3.9 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |