From d9a2c2f20184b4f18ee97af1d8b47daad7d3bac6 Mon Sep 17 00:00:00 2001 From: bdragan Date: Wed, 30 Sep 2015 00:44:49 +0200 Subject: [PATCH] #101: Added toString to Takes and Responses. --- src/main/java/org/takes/facets/auth/RsLogout.java | 2 ++ src/main/java/org/takes/facets/auth/TkAuth.java | 2 ++ src/main/java/org/takes/facets/auth/TkSecure.java | 2 ++ src/main/java/org/takes/facets/fallback/TkFallback.java | 2 ++ src/main/java/org/takes/facets/flash/RsFlash.java | 8 +++----- src/main/java/org/takes/facets/flash/TkFlash.java | 2 ++ src/main/java/org/takes/facets/fork/RsFork.java | 2 ++ src/main/java/org/takes/facets/fork/TkConsumes.java | 2 ++ src/main/java/org/takes/facets/fork/TkFork.java | 2 ++ src/main/java/org/takes/facets/fork/TkMethods.java | 2 ++ src/main/java/org/takes/facets/fork/TkProduces.java | 2 ++ src/main/java/org/takes/facets/forward/RsFailure.java | 2 ++ src/main/java/org/takes/facets/forward/RsForward.java | 2 ++ src/main/java/org/takes/facets/forward/TkForward.java | 3 +++ src/main/java/org/takes/facets/ret/RsReturn.java | 2 ++ src/main/java/org/takes/facets/ret/TkReturn.java | 2 ++ src/main/java/org/takes/facets/slf4j/TkLogged.java | 2 ++ src/main/java/org/takes/rs/RsBuffered.java | 2 ++ src/main/java/org/takes/rs/RsEmpty.java | 2 ++ src/main/java/org/takes/rs/RsFluent.java | 2 ++ src/main/java/org/takes/rs/RsGzip.java | 2 ++ src/main/java/org/takes/rs/RsHTML.java | 2 ++ src/main/java/org/takes/rs/RsJSON.java | 2 ++ src/main/java/org/takes/rs/RsPrettyJSON.java | 2 ++ src/main/java/org/takes/rs/RsPrettyXML.java | 2 ++ src/main/java/org/takes/rs/RsPrint.java | 2 ++ src/main/java/org/takes/rs/RsRedirect.java | 2 ++ src/main/java/org/takes/rs/RsSimple.java | 2 ++ src/main/java/org/takes/rs/RsText.java | 2 ++ src/main/java/org/takes/rs/RsVelocity.java | 2 ++ src/main/java/org/takes/rs/RsWithBody.java | 2 ++ src/main/java/org/takes/rs/RsWithCookie.java | 2 ++ src/main/java/org/takes/rs/RsWithHeader.java | 2 ++ src/main/java/org/takes/rs/RsWithHeaders.java | 2 ++ src/main/java/org/takes/rs/RsWithStatus.java | 2 ++ src/main/java/org/takes/rs/RsWithType.java | 2 ++ src/main/java/org/takes/rs/RsWithoutHeader.java | 2 ++ src/main/java/org/takes/rs/RsWrap.java | 2 ++ src/main/java/org/takes/rs/RsXSLT.java | 2 ++ src/main/java/org/takes/rs/xe/RsXembly.java | 2 ++ src/main/java/org/takes/tk/TkCORS.java | 2 ++ src/main/java/org/takes/tk/TkClasspath.java | 2 ++ src/main/java/org/takes/tk/TkEmpty.java | 2 ++ src/main/java/org/takes/tk/TkFailure.java | 2 ++ src/main/java/org/takes/tk/TkFiles.java | 2 ++ src/main/java/org/takes/tk/TkFixed.java | 2 ++ src/main/java/org/takes/tk/TkGreedy.java | 2 ++ src/main/java/org/takes/tk/TkGzip.java | 2 ++ src/main/java/org/takes/tk/TkHTML.java | 2 ++ src/main/java/org/takes/tk/TkMeasured.java | 2 ++ src/main/java/org/takes/tk/TkRedirect.java | 2 ++ src/main/java/org/takes/tk/TkText.java | 2 ++ src/main/java/org/takes/tk/TkVerbose.java | 2 ++ src/main/java/org/takes/tk/TkVersioned.java | 2 ++ src/main/java/org/takes/tk/TkWithCookie.java | 2 ++ src/main/java/org/takes/tk/TkWithHeader.java | 2 ++ src/main/java/org/takes/tk/TkWithHeaders.java | 2 ++ src/main/java/org/takes/tk/TkWithType.java | 2 ++ src/main/java/org/takes/tk/TkWrap.java | 2 ++ 59 files changed, 120 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/takes/facets/auth/RsLogout.java b/src/main/java/org/takes/facets/auth/RsLogout.java index 81d47fa57..768286fcc 100644 --- a/src/main/java/org/takes/facets/auth/RsLogout.java +++ b/src/main/java/org/takes/facets/auth/RsLogout.java @@ -24,6 +24,7 @@ package org.takes.facets.auth; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.rs.RsWithCookie; import org.takes.rs.RsWrap; @@ -37,6 +38,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsLogout extends RsWrap { diff --git a/src/main/java/org/takes/facets/auth/TkAuth.java b/src/main/java/org/takes/facets/auth/TkAuth.java index 2355598e7..bf59e0688 100644 --- a/src/main/java/org/takes/facets/auth/TkAuth.java +++ b/src/main/java/org/takes/facets/auth/TkAuth.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -40,6 +41,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(of = { "origin", "pass", "header" }) @EqualsAndHashCode(of = { "origin", "pass", "header" }) public final class TkAuth implements Take { diff --git a/src/main/java/org/takes/facets/auth/TkSecure.java b/src/main/java/org/takes/facets/auth/TkSecure.java index 64fb0febf..0f03d7567 100644 --- a/src/main/java/org/takes/facets/auth/TkSecure.java +++ b/src/main/java/org/takes/facets/auth/TkSecure.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.util.logging.Level; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(of = { "origin", "loc" }) @EqualsAndHashCode(of = { "origin", "loc" }) public final class TkSecure implements Take { diff --git a/src/main/java/org/takes/facets/fallback/TkFallback.java b/src/main/java/org/takes/facets/fallback/TkFallback.java index f75b16be9..b6f6e478d 100644 --- a/src/main/java/org/takes/facets/fallback/TkFallback.java +++ b/src/main/java/org/takes/facets/fallback/TkFallback.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -43,6 +44,7 @@ * @since 0.1 * @checkstyle IllegalCatchCheck (500 lines) */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) @SuppressWarnings("PMD.AvoidCatchingThrowable") public final class TkFallback extends TkWrap { diff --git a/src/main/java/org/takes/facets/flash/RsFlash.java b/src/main/java/org/takes/facets/flash/RsFlash.java index d242f8a57..95543e20f 100644 --- a/src/main/java/org/takes/facets/flash/RsFlash.java +++ b/src/main/java/org/takes/facets/flash/RsFlash.java @@ -31,6 +31,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Level; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.misc.Sprintf; import org.takes.rs.RsWithCookie; @@ -87,12 +88,14 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true, of = "text") @EqualsAndHashCode(callSuper = true) public final class RsFlash extends RsWrap { /** * To string. */ + @SuppressWarnings("unused") private final transient String text; /** @@ -152,11 +155,6 @@ public RsFlash(final String msg, final Level level, final String cookie) this.text = String.format("%s/%s", level, msg); } - @Override - public String toString() { - return this.text; - } - /** * Make a response. * @param msg Message diff --git a/src/main/java/org/takes/facets/flash/TkFlash.java b/src/main/java/org/takes/facets/flash/TkFlash.java index a8a59df39..2fff394da 100644 --- a/src/main/java/org/takes/facets/flash/TkFlash.java +++ b/src/main/java/org/takes/facets/flash/TkFlash.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.util.Iterator; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -58,6 +59,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(of = { "origin", "cookie" }) @EqualsAndHashCode(of = { "origin", "cookie" }) public final class TkFlash implements Take { diff --git a/src/main/java/org/takes/facets/fork/RsFork.java b/src/main/java/org/takes/facets/fork/RsFork.java index 3cbb3d3c6..ae833faac 100644 --- a/src/main/java/org/takes/facets/fork/RsFork.java +++ b/src/main/java/org/takes/facets/fork/RsFork.java @@ -28,6 +28,7 @@ import java.net.HttpURLConnection; import java.util.Arrays; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -43,6 +44,7 @@ * @version $Id$ * @since 0.6 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsFork extends RsWrap { diff --git a/src/main/java/org/takes/facets/fork/TkConsumes.java b/src/main/java/org/takes/facets/fork/TkConsumes.java index ca259d6e2..017e72bb9 100644 --- a/src/main/java/org/takes/facets/fork/TkConsumes.java +++ b/src/main/java/org/takes/facets/fork/TkConsumes.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -39,6 +40,7 @@ * @version $Id$ * @since 1.0 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkConsumes extends TkWrap { /** diff --git a/src/main/java/org/takes/facets/fork/TkFork.java b/src/main/java/org/takes/facets/fork/TkFork.java index f76f283f6..43697a182 100644 --- a/src/main/java/org/takes/facets/fork/TkFork.java +++ b/src/main/java/org/takes/facets/fork/TkFork.java @@ -29,6 +29,7 @@ import java.util.Collection; import java.util.Collections; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -62,6 +63,7 @@ * @see org.takes.facets.fork.FkRegex * @see org.takes.facets.fork.FkParams */ +@ToString(of = "forks") @EqualsAndHashCode(of = "forks") public final class TkFork implements Take { diff --git a/src/main/java/org/takes/facets/fork/TkMethods.java b/src/main/java/org/takes/facets/fork/TkMethods.java index 55268babb..1fc80a4fe 100644 --- a/src/main/java/org/takes/facets/fork/TkMethods.java +++ b/src/main/java/org/takes/facets/fork/TkMethods.java @@ -24,6 +24,7 @@ package org.takes.facets.fork; import java.util.Arrays; +import lombok.ToString; import org.takes.Take; import org.takes.tk.TkWrap; @@ -34,6 +35,7 @@ * @author Aleksey Popov (alopen@yandex.ru) * @version $Id$ */ +@ToString(callSuper = true) public class TkMethods extends TkWrap { /** * Ctor. diff --git a/src/main/java/org/takes/facets/fork/TkProduces.java b/src/main/java/org/takes/facets/fork/TkProduces.java index be9cb1f51..5e25966c7 100644 --- a/src/main/java/org/takes/facets/fork/TkProduces.java +++ b/src/main/java/org/takes/facets/fork/TkProduces.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -39,6 +40,7 @@ * @version $Id$ * @since 0.14 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkProduces extends TkWrap { diff --git a/src/main/java/org/takes/facets/forward/RsFailure.java b/src/main/java/org/takes/facets/forward/RsFailure.java index 4680fe800..1c8f31577 100644 --- a/src/main/java/org/takes/facets/forward/RsFailure.java +++ b/src/main/java/org/takes/facets/forward/RsFailure.java @@ -26,6 +26,7 @@ import java.io.UnsupportedEncodingException; import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.facets.flash.RsFlash; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.18 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class RsFailure extends RsForward { diff --git a/src/main/java/org/takes/facets/forward/RsForward.java b/src/main/java/org/takes/facets/forward/RsForward.java index b60131e3e..5fca14d8f 100644 --- a/src/main/java/org/takes/facets/forward/RsForward.java +++ b/src/main/java/org/takes/facets/forward/RsForward.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Response; import org.takes.misc.Sprintf; @@ -44,6 +45,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true, of = "origin") @EqualsAndHashCode(callSuper = true, of = "origin") public class RsForward extends HttpException implements Response { diff --git a/src/main/java/org/takes/facets/forward/TkForward.java b/src/main/java/org/takes/facets/forward/TkForward.java index 5f919c2f5..36a5b4d8f 100644 --- a/src/main/java/org/takes/facets/forward/TkForward.java +++ b/src/main/java/org/takes/facets/forward/TkForward.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -43,6 +44,7 @@ * @since 0.1 * @see org.takes.facets.forward.TkForward */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public final class TkForward implements Take { @@ -73,6 +75,7 @@ public Response act(final Request req) throws IOException { /** * Safe response. */ + @ToString(of = { "origin", "saved" }) private static final class Safe implements Response { /** * Original response. diff --git a/src/main/java/org/takes/facets/ret/RsReturn.java b/src/main/java/org/takes/facets/ret/RsReturn.java index d97136852..46271178b 100644 --- a/src/main/java/org/takes/facets/ret/RsReturn.java +++ b/src/main/java/org/takes/facets/ret/RsReturn.java @@ -29,6 +29,7 @@ import java.util.Date; import java.util.Locale; import java.util.concurrent.TimeUnit; +import lombok.ToString; import org.takes.Response; import org.takes.rs.RsWithCookie; import org.takes.rs.RsWrap; @@ -40,6 +41,7 @@ * @version $Id$ * @since 0.20 */ +@ToString(callSuper = true) public final class RsReturn extends RsWrap { /** * Ctor. diff --git a/src/main/java/org/takes/facets/ret/TkReturn.java b/src/main/java/org/takes/facets/ret/TkReturn.java index 4ec876e39..c8ca79fe9 100644 --- a/src/main/java/org/takes/facets/ret/TkReturn.java +++ b/src/main/java/org/takes/facets/ret/TkReturn.java @@ -28,6 +28,7 @@ import java.nio.charset.Charset; import java.util.Iterator; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -44,6 +45,7 @@ * @version $Id$ * @since 0.20 */ +@ToString(of = { "origin", "cookie" }) @EqualsAndHashCode(of = { "origin", "cookie" }) public final class TkReturn implements Take { diff --git a/src/main/java/org/takes/facets/slf4j/TkLogged.java b/src/main/java/org/takes/facets/slf4j/TkLogged.java index f4ec6ed56..5e7b01145 100644 --- a/src/main/java/org/takes/facets/slf4j/TkLogged.java +++ b/src/main/java/org/takes/facets/slf4j/TkLogged.java @@ -26,6 +26,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.11.2 */ +@ToString(of = { "origin", "target" }) @EqualsAndHashCode(of = { "origin", "target" }) public final class TkLogged implements Take { diff --git a/src/main/java/org/takes/rs/RsBuffered.java b/src/main/java/org/takes/rs/RsBuffered.java index 7c7ec66fa..9a15039bc 100644 --- a/src/main/java/org/takes/rs/RsBuffered.java +++ b/src/main/java/org/takes/rs/RsBuffered.java @@ -27,6 +27,7 @@ import java.io.IOException; import java.io.InputStream; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.16 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsBuffered extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsEmpty.java b/src/main/java/org/takes/rs/RsEmpty.java index 8bdc6d7d0..ce788656c 100644 --- a/src/main/java/org/takes/rs/RsEmpty.java +++ b/src/main/java/org/takes/rs/RsEmpty.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.util.Collections; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.1 */ +@ToString @EqualsAndHashCode public final class RsEmpty implements Response { diff --git a/src/main/java/org/takes/rs/RsFluent.java b/src/main/java/org/takes/rs/RsFluent.java index 9f949b25f..cc001d6cb 100644 --- a/src/main/java/org/takes/rs/RsFluent.java +++ b/src/main/java/org/takes/rs/RsFluent.java @@ -25,6 +25,7 @@ import java.io.InputStream; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -36,6 +37,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsFluent extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsGzip.java b/src/main/java/org/takes/rs/RsGzip.java index 74bb136e6..c5ca8182d 100644 --- a/src/main/java/org/takes/rs/RsGzip.java +++ b/src/main/java/org/takes/rs/RsGzip.java @@ -31,6 +31,7 @@ import java.util.concurrent.CopyOnWriteArrayList; import java.util.zip.GZIPOutputStream; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -42,6 +43,7 @@ * @version $Id$ * @since 0.10 */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public final class RsGzip implements Response { diff --git a/src/main/java/org/takes/rs/RsHTML.java b/src/main/java/org/takes/rs/RsHTML.java index be9f07f2b..915465802 100644 --- a/src/main/java/org/takes/rs/RsHTML.java +++ b/src/main/java/org/takes/rs/RsHTML.java @@ -27,6 +27,7 @@ import java.net.HttpURLConnection; import java.net.URL; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsHTML extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsJSON.java b/src/main/java/org/takes/rs/RsJSON.java index 4c563706b..0d70a0a04 100644 --- a/src/main/java/org/takes/rs/RsJSON.java +++ b/src/main/java/org/takes/rs/RsJSON.java @@ -30,6 +30,7 @@ import javax.json.JsonStructure; import javax.json.JsonWriter; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsJSON extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsPrettyJSON.java b/src/main/java/org/takes/rs/RsPrettyJSON.java index e7cab776a..40beca252 100644 --- a/src/main/java/org/takes/rs/RsPrettyJSON.java +++ b/src/main/java/org/takes/rs/RsPrettyJSON.java @@ -36,6 +36,7 @@ import javax.json.JsonWriter; import javax.json.stream.JsonGenerator; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -47,6 +48,7 @@ * @version $Id$ * @since 1.0 */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public final class RsPrettyJSON implements Response { diff --git a/src/main/java/org/takes/rs/RsPrettyXML.java b/src/main/java/org/takes/rs/RsPrettyXML.java index 82a9980de..2c751c424 100644 --- a/src/main/java/org/takes/rs/RsPrettyXML.java +++ b/src/main/java/org/takes/rs/RsPrettyXML.java @@ -39,6 +39,7 @@ import javax.xml.transform.sax.SAXSource; import javax.xml.transform.stream.StreamResult; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.w3c.dom.DocumentType; import org.xml.sax.InputSource; @@ -53,6 +54,7 @@ * @version $Id$ * @since 1.0 */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public final class RsPrettyXML implements Response { diff --git a/src/main/java/org/takes/rs/RsPrint.java b/src/main/java/org/takes/rs/RsPrint.java index 0e28d46f8..30d2ffa17 100644 --- a/src/main/java/org/takes/rs/RsPrint.java +++ b/src/main/java/org/takes/rs/RsPrint.java @@ -31,6 +31,7 @@ import java.io.Writer; import java.util.regex.Pattern; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -42,6 +43,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsPrint extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsRedirect.java b/src/main/java/org/takes/rs/RsRedirect.java index cfe6c6115..2e936c9a9 100644 --- a/src/main/java/org/takes/rs/RsRedirect.java +++ b/src/main/java/org/takes/rs/RsRedirect.java @@ -25,6 +25,7 @@ import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; /** * Redirect. @@ -35,6 +36,7 @@ * @version $Id$ * @since 0.6 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsRedirect extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsSimple.java b/src/main/java/org/takes/rs/RsSimple.java index 8d26f10e8..f5bed2eee 100644 --- a/src/main/java/org/takes/rs/RsSimple.java +++ b/src/main/java/org/takes/rs/RsSimple.java @@ -26,6 +26,7 @@ import java.io.ByteArrayInputStream; import java.io.InputStream; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -37,6 +38,7 @@ * @version $Id$ * @since 0.17 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public class RsSimple extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsText.java b/src/main/java/org/takes/rs/RsText.java index 46908a58f..4898fe0f2 100644 --- a/src/main/java/org/takes/rs/RsText.java +++ b/src/main/java/org/takes/rs/RsText.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.net.URL; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -37,6 +38,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsText extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsVelocity.java b/src/main/java/org/takes/rs/RsVelocity.java index 40420c78d..4f9d2e469 100644 --- a/src/main/java/org/takes/rs/RsVelocity.java +++ b/src/main/java/org/takes/rs/RsVelocity.java @@ -36,6 +36,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.apache.velocity.runtime.RuntimeConstants; @@ -67,6 +68,7 @@ * @since 0.1 * @checkstyle ClassDataAbstractionCouplingCheck (500 lines) */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsVelocity extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithBody.java b/src/main/java/org/takes/rs/RsWithBody.java index 9688075eb..c834a388c 100644 --- a/src/main/java/org/takes/rs/RsWithBody.java +++ b/src/main/java/org/takes/rs/RsWithBody.java @@ -28,6 +28,7 @@ import java.io.InputStream; import java.net.URL; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -39,6 +40,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithBody extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithCookie.java b/src/main/java/org/takes/rs/RsWithCookie.java index 3c4635334..8d0b8e246 100644 --- a/src/main/java/org/takes/rs/RsWithCookie.java +++ b/src/main/java/org/takes/rs/RsWithCookie.java @@ -28,6 +28,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -57,6 +58,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithCookie extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithHeader.java b/src/main/java/org/takes/rs/RsWithHeader.java index 75fe692ce..a3e25271e 100644 --- a/src/main/java/org/takes/rs/RsWithHeader.java +++ b/src/main/java/org/takes/rs/RsWithHeader.java @@ -28,6 +28,7 @@ import java.util.Collections; import java.util.regex.Pattern; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.misc.Concat; @@ -55,6 +56,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithHeader extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithHeaders.java b/src/main/java/org/takes/rs/RsWithHeaders.java index f8ad6b58a..5f91c943d 100644 --- a/src/main/java/org/takes/rs/RsWithHeaders.java +++ b/src/main/java/org/takes/rs/RsWithHeaders.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.util.Arrays; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithHeaders extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithStatus.java b/src/main/java/org/takes/rs/RsWithStatus.java index a41e5f250..b3c4ff362 100644 --- a/src/main/java/org/takes/rs/RsWithStatus.java +++ b/src/main/java/org/takes/rs/RsWithStatus.java @@ -31,6 +31,7 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.misc.Concat; import org.takes.misc.Condition; @@ -45,6 +46,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithStatus extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithType.java b/src/main/java/org/takes/rs/RsWithType.java index 8b03bd709..1d3fa8f86 100644 --- a/src/main/java/org/takes/rs/RsWithType.java +++ b/src/main/java/org/takes/rs/RsWithType.java @@ -24,6 +24,7 @@ package org.takes.rs; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -35,6 +36,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithType extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWithoutHeader.java b/src/main/java/org/takes/rs/RsWithoutHeader.java index daef1245a..e52e19538 100644 --- a/src/main/java/org/takes/rs/RsWithoutHeader.java +++ b/src/main/java/org/takes/rs/RsWithoutHeader.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.util.Locale; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.misc.Condition; import org.takes.misc.Select; @@ -40,6 +41,7 @@ * @version $Id$ * @since 0.9 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsWithoutHeader extends RsWrap { diff --git a/src/main/java/org/takes/rs/RsWrap.java b/src/main/java/org/takes/rs/RsWrap.java index 7fe32ec9b..e342fcd66 100644 --- a/src/main/java/org/takes/rs/RsWrap.java +++ b/src/main/java/org/takes/rs/RsWrap.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.io.InputStream; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -37,6 +38,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public class RsWrap implements Response { diff --git a/src/main/java/org/takes/rs/RsXSLT.java b/src/main/java/org/takes/rs/RsXSLT.java index 5ab80e237..13e4b10bd 100644 --- a/src/main/java/org/takes/rs/RsXSLT.java +++ b/src/main/java/org/takes/rs/RsXSLT.java @@ -39,6 +39,7 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; /** @@ -82,6 +83,7 @@ * @checkstyle ClassDataAbstractionCouplingCheck (500 lines) * @see org.takes.rs.xe.RsXembly */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsXSLT extends RsWrap { diff --git a/src/main/java/org/takes/rs/xe/RsXembly.java b/src/main/java/org/takes/rs/xe/RsXembly.java index e43010e4f..4ef913187 100644 --- a/src/main/java/org/takes/rs/xe/RsXembly.java +++ b/src/main/java/org/takes/rs/xe/RsXembly.java @@ -35,6 +35,7 @@ import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Response; import org.takes.rs.RsEmpty; import org.takes.rs.RsWithStatus; @@ -53,6 +54,7 @@ * @since 0.1 * @checkstyle ClassDataAbstractionCouplingCheck (500 lines) */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class RsXembly extends RsWrap { diff --git a/src/main/java/org/takes/tk/TkCORS.java b/src/main/java/org/takes/tk/TkCORS.java index 9357c24e8..cb972df36 100644 --- a/src/main/java/org/takes/tk/TkCORS.java +++ b/src/main/java/org/takes/tk/TkCORS.java @@ -29,6 +29,7 @@ import java.util.HashSet; import java.util.Set; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -50,6 +51,7 @@ * @version $Id$ * @since 0.20 */ +@ToString(of = {"origin" , "allowed" }) @EqualsAndHashCode(of = { "origin" , "allowed" }) public final class TkCORS implements Take { diff --git a/src/main/java/org/takes/tk/TkClasspath.java b/src/main/java/org/takes/tk/TkClasspath.java index 8b656aece..3ea7c9c2e 100644 --- a/src/main/java/org/takes/tk/TkClasspath.java +++ b/src/main/java/org/takes/tk/TkClasspath.java @@ -27,6 +27,7 @@ import java.io.InputStream; import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -57,6 +58,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkClasspath extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkEmpty.java b/src/main/java/org/takes/tk/TkEmpty.java index 3d2953132..1a2fa10cf 100644 --- a/src/main/java/org/takes/tk/TkEmpty.java +++ b/src/main/java/org/takes/tk/TkEmpty.java @@ -23,6 +23,7 @@ */ package org.takes.tk; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -40,6 +41,7 @@ * @version $Id$ * @since 0.1 */ +@ToString public final class TkEmpty implements Take { @Override diff --git a/src/main/java/org/takes/tk/TkFailure.java b/src/main/java/org/takes/tk/TkFailure.java index 5a8f5f588..37b2b1869 100644 --- a/src/main/java/org/takes/tk/TkFailure.java +++ b/src/main/java/org/takes/tk/TkFailure.java @@ -24,6 +24,7 @@ package org.takes.tk; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -37,6 +38,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkFailure extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkFiles.java b/src/main/java/org/takes/tk/TkFiles.java index ae21d0adf..6a0396fc4 100644 --- a/src/main/java/org/takes/tk/TkFiles.java +++ b/src/main/java/org/takes/tk/TkFiles.java @@ -28,6 +28,7 @@ import java.io.IOException; import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -58,6 +59,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkFiles extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkFixed.java b/src/main/java/org/takes/tk/TkFixed.java index 64f6dc7c2..d189f801a 100644 --- a/src/main/java/org/takes/tk/TkFixed.java +++ b/src/main/java/org/takes/tk/TkFixed.java @@ -24,6 +24,7 @@ package org.takes.tk; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkFixed extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkGreedy.java b/src/main/java/org/takes/tk/TkGreedy.java index b3e7abe9e..ab6da3cb9 100644 --- a/src/main/java/org/takes/tk/TkGreedy.java +++ b/src/main/java/org/takes/tk/TkGreedy.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -39,6 +40,7 @@ * @version $Id$ * @since 0.10 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkGreedy extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkGzip.java b/src/main/java/org/takes/tk/TkGzip.java index c9447372b..8732ba59a 100644 --- a/src/main/java/org/takes/tk/TkGzip.java +++ b/src/main/java/org/takes/tk/TkGzip.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.10 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkGzip extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkHTML.java b/src/main/java/org/takes/tk/TkHTML.java index 01c6c17c4..641184494 100644 --- a/src/main/java/org/takes/tk/TkHTML.java +++ b/src/main/java/org/takes/tk/TkHTML.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.net.URL; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -43,6 +44,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkHTML extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkMeasured.java b/src/main/java/org/takes/tk/TkMeasured.java index b32dd4acf..d0d2497d6 100644 --- a/src/main/java/org/takes/tk/TkMeasured.java +++ b/src/main/java/org/takes/tk/TkMeasured.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -40,6 +41,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkMeasured extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkRedirect.java b/src/main/java/org/takes/tk/TkRedirect.java index e74de71aa..b7420753e 100644 --- a/src/main/java/org/takes/tk/TkRedirect.java +++ b/src/main/java/org/takes/tk/TkRedirect.java @@ -25,6 +25,7 @@ import java.net.HttpURLConnection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -39,6 +40,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkRedirect extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkText.java b/src/main/java/org/takes/tk/TkText.java index 3e2a22ca6..1290504ee 100644 --- a/src/main/java/org/takes/tk/TkText.java +++ b/src/main/java/org/takes/tk/TkText.java @@ -26,6 +26,7 @@ import java.io.InputStream; import java.net.URL; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -43,6 +44,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkText extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkVerbose.java b/src/main/java/org/takes/tk/TkVerbose.java index 177e08182..af568fcb9 100644 --- a/src/main/java/org/takes/tk/TkVerbose.java +++ b/src/main/java/org/takes/tk/TkVerbose.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.HttpException; import org.takes.Request; import org.takes.Response; @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.10 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkVerbose extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkVersioned.java b/src/main/java/org/takes/tk/TkVersioned.java index fdeb61d86..4b8bdeb9d 100644 --- a/src/main/java/org/takes/tk/TkVersioned.java +++ b/src/main/java/org/takes/tk/TkVersioned.java @@ -26,6 +26,7 @@ import java.io.IOException; import java.util.ResourceBundle; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -41,6 +42,7 @@ * @version $Id$ * @since 0.4 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkVersioned extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkWithCookie.java b/src/main/java/org/takes/tk/TkWithCookie.java index a714d6a09..3135684ce 100644 --- a/src/main/java/org/takes/tk/TkWithCookie.java +++ b/src/main/java/org/takes/tk/TkWithCookie.java @@ -24,6 +24,7 @@ package org.takes.tk; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Take; /** @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkWithCookie extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkWithHeader.java b/src/main/java/org/takes/tk/TkWithHeader.java index 71fdd07c4..f5c1e2ea8 100644 --- a/src/main/java/org/takes/tk/TkWithHeader.java +++ b/src/main/java/org/takes/tk/TkWithHeader.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -42,6 +43,7 @@ * @version $Id$ * @since 0.11 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkWithHeader extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkWithHeaders.java b/src/main/java/org/takes/tk/TkWithHeaders.java index 6d4879b8d..8f27b913b 100644 --- a/src/main/java/org/takes/tk/TkWithHeaders.java +++ b/src/main/java/org/takes/tk/TkWithHeaders.java @@ -27,6 +27,7 @@ import java.util.Arrays; import java.util.Collection; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -44,6 +45,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkWithHeaders extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkWithType.java b/src/main/java/org/takes/tk/TkWithType.java index 649f44761..70923968b 100644 --- a/src/main/java/org/takes/tk/TkWithType.java +++ b/src/main/java/org/takes/tk/TkWithType.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -42,6 +43,7 @@ * @version $Id$ * @since 0.1 */ +@ToString(callSuper = true) @EqualsAndHashCode(callSuper = true) public final class TkWithType extends TkWrap { diff --git a/src/main/java/org/takes/tk/TkWrap.java b/src/main/java/org/takes/tk/TkWrap.java index 5c073fab3..86d525e66 100644 --- a/src/main/java/org/takes/tk/TkWrap.java +++ b/src/main/java/org/takes/tk/TkWrap.java @@ -25,6 +25,7 @@ import java.io.IOException; import lombok.EqualsAndHashCode; +import lombok.ToString; import org.takes.Request; import org.takes.Response; import org.takes.Take; @@ -38,6 +39,7 @@ * @version $Id$ * @since 0.4 */ +@ToString(of = "origin") @EqualsAndHashCode(of = "origin") public class TkWrap implements Take {