Debian Codegraph @

src/org/jetbrains/annotations/PropertyKey.java

raw symbols SCIP
1 /*
2 * Copyright 2000-2021 JetBrains s.r.o.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * https://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.jetbrains.annotations;
18
19 import java.lang.annotation.*;
20
21 /**
22 * Specifies that a method parameter, local variable, field or a method return value
23 * must be a valid property key in a specific resource bundle. When a string literal
24 * which is not a property key in the specified bundle is passed as a parameter,
25 * static analyzers may highlight it as an error. The annotation is also could be used
26 * by IDEs to provide completion in string literals passed as parameters.
27 */
28 @Documented
29 @Retention(RetentionPolicy.CLASS)
30 @Target({ElementType.PARAMETER, ElementType.LOCAL_VARIABLE, ElementType.FIELD, ElementType.TYPE_USE})
31 public @interface PropertyKey {
32 /**
33 * The full-qualified name of the resource bundle in which the property keys must
34 * be present. Consists of a full-qualified name of the package corresponding to the
35 * directory where the resource bundle is located and the base name of the resource
36 * bundle (with no locale specifier or extension), separated with a dot.
37 */
38 @NonNls String resourceBundle();
39 }