@@ -0,0 +1,1947 @@
+/*%0A * Thrifty%0A *%0A * Copyright (c) Microsoft Corporation%0A *%0A * All rights reserved.%0A *%0A * Licensed under the Apache License, Version 2.0 (the License);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * THIS CODE IS PROVIDED ON AN  *AS IS* BASIS, WITHOUT WARRANTIES OR%0A * CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING%0A * WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,%0A * FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT.%0A *%0A * See the Apache Version 2.0 License for specific language governing permissions and limitations under the License.%0A */%0Apackage com.microsoft.thrifty;%0A%0Aimport java.lang.annotation.Documented;%0Aimport java.lang.annotation.ElementType;%0Aimport java.lang.annotation.Retention;%0Aimport java.lang.annotation.RetentionPolicy;%0Aimport java.lang.annotation.Target;%0A%0A/**%0A * A field annotated as %7B@code %7Bliteral @%7DRedacted%7D is intended to be obscured%0A * in log files, debug statements, etc - either by complete omission, constant%0A * value replacement, or value hashing.%0A */%0A@Documented%0A@Target(ElementType.FIELD)%0A@Retention(RetentionPolicy.SOURCE)%0Apublic @interface Redacted %7B%0A    /**%0A     * Identifies the %22strength%22 of redaction.%0A     */%0A    enum Kind %7B%0A        /**%0A         * All values, present or absent, scalar or collection, will%0A         * be replaced by a constant placeholder string.%0A         */%0A        TOTAL,%0A%0A        /**%0A         * Scalar values will be hashed, collections will be summarized.%0A         *%0A         * %3Cp%3ECollection summaries consist of the type of collection (e.g.%0A         * List, Set, Map), the generic parameter, and the collection size.%0A         */%0A        OBFUSCATE%0A    %7D%0A%0A    /**%0A     * Specifies the kind of redaction for the annotated field;%0A     * defaults to %7B@link Kind#TOTAL%7D.%0A     */%0A    Kind value() default Kind.TOTAL;%0A%7D%0A

Add a Redacted annotation for fields