org.chromium.sdk/src/org/chromium/sdk/internal/protocolparser/JsonSubtypeConditionCustom.java
equal
deleted
inserted
replaced
|
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 * Specifies a condition for a field-reading method. It is one from group of annotations that |
|
14 * mark key fields for choosing particular subtype. They set conditions on JSON fields in a subtype |
|
15 * interface that drive subtype auto-selection at parsing time. |
|
16 * <p> |
|
17 * Specifies a user-provided condition; works for fields of any type. |
|
18 */ |
|
19 @Target({ElementType.METHOD}) |
|
20 @Retention(RetentionPolicy.RUNTIME) |
|
21 public @interface JsonSubtypeConditionCustom { |
|
22 /** |
|
23 * Specifies user-provided condition in form of class with default constructor, that |
|
24 * implements {@link JsonValueCondition} interface. |
|
25 */ |
|
26 Class<? extends JsonValueCondition<?>> condition(); |
|
27 } |