| /** |
| * Licensed to jclouds, Inc. (jclouds) under one or more |
| * contributor license agreements. See the NOTICE file |
| * distributed with this work for additional information |
| * regarding copyright ownership. jclouds licenses this file |
| * to you under the Apache License, Version 2.0 (the |
| * "License"); you may not use this file except in compliance |
| * with the License. You may obtain a copy of the License at |
| * |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| * |
| * Unless required by applicable law or agreed to in writing, |
| * software distributed under the License is distributed on an |
| * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| * KIND, either express or implied. See the License for the |
| * specific language governing permissions and limitations |
| * under the License. |
| */ |
| package org.jclouds.json.internal; |
| |
| import static com.google.common.base.Preconditions.checkNotNull; |
| |
| import com.google.gson.JsonElement; |
| |
| /** |
| * The gson project use package to control access to their objects. However, this prevents us from |
| * doing valid work, like controlling the json emitted on a per-object basis. This is here to afford |
| * us to do this. |
| * |
| * @author Adrian Cole |
| * @see <a href="http://code.google.com/p/google-gson/issues/detail?id=326"/> |
| */ |
| public final class JsonLiteral extends JsonElement { |
| private final CharSequence literal; |
| |
| public JsonLiteral(CharSequence literal) { |
| this.literal = checkNotNull(literal, "literal"); |
| } |
| |
| @Override |
| public String toString() { |
| return literal.toString(); |
| } |
| |
| } |