com.android.ide.common.blame
Class SourceFileJsonTypeAdapter
java.lang.Object
com.google.gson.TypeAdapter<com.android.ide.common.blame.SourceFile>
com.android.ide.common.blame.SourceFileJsonTypeAdapter
public class SourceFileJsonTypeAdapter
- extends com.google.gson.TypeAdapter<com.android.ide.common.blame.SourceFile>
JsonSerializer and Deserializer for SourceFile
.
The JsonDeserialiser accepts either a string of the file path or a json object of the form
{
"path":"/path/to/file.java",
"description": "short human-readable description"
}
where both
properties are optionally present, so unknown is represented by the empty object.
Method Summary |
com.android.ide.common.blame.SourceFile |
read(com.google.gson.stream.JsonReader in)
|
void |
write(com.google.gson.stream.JsonWriter out,
com.android.ide.common.blame.SourceFile src)
|
Methods inherited from class com.google.gson.TypeAdapter |
fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SourceFileJsonTypeAdapter
public SourceFileJsonTypeAdapter()
write
public void write(com.google.gson.stream.JsonWriter out,
com.android.ide.common.blame.SourceFile src)
throws java.io.IOException
- Specified by:
write
in class com.google.gson.TypeAdapter<com.android.ide.common.blame.SourceFile>
- Throws:
java.io.IOException
read
public com.android.ide.common.blame.SourceFile read(com.google.gson.stream.JsonReader in)
throws java.io.IOException
- Specified by:
read
in class com.google.gson.TypeAdapter<com.android.ide.common.blame.SourceFile>
- Throws:
java.io.IOException