From c01fd85adb8887410f9429dc708828656b34b3b0 Mon Sep 17 00:00:00 2001 From: Inderjeet Singh Date: Fri, 22 Oct 2010 15:12:05 +0000 Subject: [PATCH] Added toString() methods. --- .../google/gson/webservice/definition/rest/MetaData.java | 4 ++++ .../gson/webservice/definition/rest/RestCallSpec.java | 6 ++++++ .../java/com/google/gson/wsf/server/rest/MetaDataMap.java | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/rest/MetaData.java b/wsdef/src/main/java/com/google/gson/webservice/definition/rest/MetaData.java index 24cb6fa0..cb39e9ee 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/rest/MetaData.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/rest/MetaData.java @@ -76,6 +76,10 @@ public final class MetaData> { map.remove(key); } + @Override + public String toString() { + return String.format("%s", map); + } /** * Gson Type adapter for {@link MetaData}. The serialized representation on wire is just a * Map diff --git a/wsdef/src/main/java/com/google/gson/webservice/definition/rest/RestCallSpec.java b/wsdef/src/main/java/com/google/gson/webservice/definition/rest/RestCallSpec.java index c7163459..7bbcf768 100644 --- a/wsdef/src/main/java/com/google/gson/webservice/definition/rest/RestCallSpec.java +++ b/wsdef/src/main/java/com/google/gson/webservice/definition/rest/RestCallSpec.java @@ -109,4 +109,10 @@ public final class RestCallSpec { public Type getResourceType() { return resourceType; } + + @Override + public String toString() { + return String.format("path: %s, resourceType: %s, requestSpec: %s, responseSpec: %s", + path, resourceType, requestSpec, responseSpec); + } } diff --git a/wsf/src/main/java/com/google/gson/wsf/server/rest/MetaDataMap.java b/wsf/src/main/java/com/google/gson/wsf/server/rest/MetaDataMap.java index 93b269f0..645050be 100644 --- a/wsf/src/main/java/com/google/gson/wsf/server/rest/MetaDataMap.java +++ b/wsf/src/main/java/com/google/gson/wsf/server/rest/MetaDataMap.java @@ -44,4 +44,9 @@ public class MetaDataMap> { } return metaData; } + + @Override + public String toString() { + return String.format("%s", map); + } }