Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
|
mmenke
2014/03/07 17:02:39
Should again maintain the copyright years on these
| |
| 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.base; | |
| 6 | |
| 7 import java.lang.annotation.ElementType; | |
| 8 import java.lang.annotation.Target; | |
| 9 | |
| 10 /** | |
| 11 * Annotation used for marking methods and fields that are called by reflection. Useful for keeping | |
| 12 * components that would otherwise be removed by Proguard. Use the value paramet er to mention a file | |
|
mmenke
2014/03/07 17:02:39
nit: Fix indent.
| |
| 13 * that calls this method. | |
| 14 * | |
| 15 * Note that adding this annotation to a method is not enough to guarantee that | |
| 16 * it is kept - either its class must be referenced elsewhere in the program, or | |
| 17 * the class must be annotated with this as well. | |
| 18 * | |
| 19 * Usage example:<br /> | |
| 20 * {@code | |
| 21 * @UsedByReflection("PeopleListItemView.java") | |
| 22 public PeopleListItemViewV11(Context context) { | |
| 23 super(context); | |
| 24 } | |
| 25 } | |
| 26 | |
|
mmenke
2014/03/07 17:02:39
This comment is practically illegible.
mmenke
2014/03/07 20:47:28
To clarify: A bunch of lines are missing asterisk
Charles
2014/03/07 21:31:15
You can actually get rid of these annotations, chr
| |
| 27 */ | |
| 28 @Target({ | |
| 29 ElementType.METHOD, | |
| 30 ElementType.FIELD, | |
| 31 ElementType.TYPE, | |
| 32 ElementType.CONSTRUCTOR}) | |
| 33 public @interface UsedByReflection { | |
|
mef
2014/03/07 20:54:12
The |UsedByReflection| annotation has not been use
Charles
2014/03/07 21:31:15
These should probably be replaced by Chromium's pr
| |
| 34 String value(); | |
| 35 } | |
| OLD | NEW |