Follow up on r1197 and make deepCopy package-private. We don't want to use protected because some of the classes are non-final and protected shows up in the Javadocs.

This commit is contained in:
Jesse Wilson 2012-09-03 23:30:27 +00:00
parent a973837dd4
commit 411c5c0b50
5 changed files with 5 additions and 5 deletions

View File

@ -41,7 +41,7 @@ public final class JsonArray extends JsonElement implements Iterable<JsonElement
}
@Override
protected JsonArray deepCopy() {
JsonArray deepCopy() {
JsonArray result = new JsonArray();
for (JsonElement element : elements) {
result.add(element.deepCopy());

View File

@ -35,7 +35,7 @@ public abstract class JsonElement {
* Returns a deep copy of this element. Immutable elements like primitives
* and nulls are not copied.
*/
protected abstract JsonElement deepCopy();
abstract JsonElement deepCopy();
/**
* provides check for verifying if this element is an array or not.

View File

@ -41,7 +41,7 @@ public final class JsonNull extends JsonElement {
}
@Override
protected JsonNull deepCopy() {
JsonNull deepCopy() {
return INSTANCE;
}

View File

@ -43,7 +43,7 @@ public final class JsonObject extends JsonElement {
}
@Override
protected JsonObject deepCopy() {
JsonObject deepCopy() {
JsonObject result = new JsonObject();
for (Map.Entry<String, JsonElement> entry : members.entrySet()) {
result.add(entry.getKey(), entry.getValue().deepCopy());

View File

@ -86,7 +86,7 @@ public final class JsonPrimitive extends JsonElement {
}
@Override
protected JsonPrimitive deepCopy() {
JsonPrimitive deepCopy() {
return this;
}