blob: 37713a93a88b9d5de5a49ed9445ac7ec37ecad7a [file] [log] [blame]
// Copyright (c) 2022, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.keepanno.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* A binding of a keep item.
*
* <p>A binding allows referencing the exact instance of a match from a condition in other
* conditions and/or targets. It can also be used to reduce duplication of targets by sharing
* patterns.
*
* <p>See KeepTarget for documentation on specifying an item pattern.
*/
@Target(ElementType.ANNOTATION_TYPE)
@Retention(RetentionPolicy.CLASS)
public @interface KeepBinding {
/** Name with which other bindings, conditions or targets can reference the bound item pattern. */
String bindingName();
KeepItemKind kind() default KeepItemKind.DEFAULT;
String classFromBinding() default "";
String className() default "";
Class<?> classConstant() default Object.class;
String extendsClassName() default "";
Class<?> extendsClassConstant() default Object.class;
String methodName() default "";
String methodReturnType() default "";
String[] methodParameters() default {""};
String fieldName() default "";
String fieldType() default "";
}