2
|
1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
2 |
// Use of this source code is governed by a BSD-style license that can be
|
|
3 |
// found in the LICENSE file.
|
|
4 |
|
|
5 |
package org.chromium.sdk.internal.protocolparser;
|
|
6 |
|
|
7 |
import java.lang.annotation.ElementType;
|
|
8 |
import java.lang.annotation.Retention;
|
|
9 |
import java.lang.annotation.RetentionPolicy;
|
|
10 |
import java.lang.annotation.Target;
|
|
11 |
|
|
12 |
/**
|
|
13 |
* Describes a method that corresponds to a type field (i.e. a property of JSON object).
|
|
14 |
* Its use is optional, because all methods by default are recognized as field-reading methods.
|
|
15 |
* Should be used to specify JSON property name.
|
|
16 |
*/
|
|
17 |
@Target({ElementType.METHOD})
|
|
18 |
@Retention(RetentionPolicy.RUNTIME)
|
|
19 |
public @interface JsonField {
|
|
20 |
/**
|
|
21 |
* Specifies JSON property name, which otherwise is derived from the method name (optional "get"
|
|
22 |
* prefix is truncated with the first letter decapitalization).
|
|
23 |
*/
|
|
24 |
String jsonLiteralName();
|
|
25 |
}
|