package io.brooklyn.camp.brooklyn.spi.dsl.parse;

import brooklyn.util.text.StringEscapes.JavaStringEscapes;

public class QuotedString {
    private final String s;
    public QuotedString(String s) {
        this.s = s;
    }
    @Override
    public String toString() {
        return s;
    }
    public String unwrapped() {
        return JavaStringEscapes.unwrapJavaString(s);
    }
    
    @Override
    public boolean equals(Object obj) {
        return (obj instanceof QuotedString) && ((QuotedString)obj).toString().equals(toString());
    }
}
@@ -43,16 +43,81 @@
 parse;%0A%0A
+import static com.google.common.base.Preconditions.checkNotNull;%0A
 import b
@@ -168,16 +168,56 @@
 capes;%0A%0A
+import com.google.common.base.Objects;%0A%0A
 public c
@@ -260,24 +260,29 @@
 l String s;%0A
+    %0A
     public Q
@@ -322,17 +322,41 @@
 his.s = 
-s
+checkNotNull(s, %22string%22)
 ;%0A    %7D%0A
@@ -571,24 +571,24 @@
 ject obj) %7B%0A
-
         retu
@@ -680,9 +680,98 @@
 ;%0A    %7D%0A
+    %0A    @Override%0A    public int hashCode() %7B%0A        return Objects.hashCode(s);%0A    %7D%0A
 %7D

use checkNotNull in QuotedString