org.acra.collector
Class CrashReportData

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.EnumMap<ReportField,String>
          extended by org.acra.collector.CrashReportData
All Implemented Interfaces:
Serializable, Cloneable, Map<ReportField,String>

public final class CrashReportData
extends EnumMap<ReportField,String>

Stores a crash reports data with ReportField enum values as keys. This is basically the source of Properties adapted to extend an EnumMap instead of Hashtable and with a few tweaks to avoid losing crazy amounts of android time in the generation of a date comment when storing to file.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
CrashReportData()
          Constructs a new Properties object.
 
Method Summary
 String getProperty(ReportField key)
          Returns the property with the specified name.
 org.json.JSONObject toJSON()
           
 
Methods inherited from class java.util.EnumMap
clear, clone, containsKey, containsValue, entrySet, equals, get, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
hashCode, isEmpty, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CrashReportData

public CrashReportData()
Constructs a new Properties object.

Method Detail

getProperty

public String getProperty(ReportField key)
Returns the property with the specified name.

Parameters:
key - the name of the property to find.
Returns:
the named property value, or null if it can't be found.

toJSON

public org.json.JSONObject toJSON()
                           throws org.acra.util.JSONReportBuilder.JSONReportException
Throws:
org.acra.util.JSONReportBuilder.JSONReportException


Copyright © 2010-2013. All Rights Reserved.