public static enum RestrictTo.Scope extends java.lang.Enum<RestrictTo.Scope>
Enum Constant and Description |
---|
GROUP_ID
Deprecated.
Use
LIBRARY_GROUP_PREFIX instead |
LIBRARY
Restrict usage to code within the same library (e.g.
|
LIBRARY_GROUP
Restrict usage to code within the same group of libraries.
|
LIBRARY_GROUP_PREFIX
Restrict usage to code within packages whose groups share
the same library group prefix up to the last ".", so for
example libraries foo.bar:lib1 amd foo.baz:lib2 share
the prefix "foo." and so they can use each other's
apis that are restricted to this scope.
|
SUBCLASSES
Restrict usage to subclasses of the enclosing class.
|
TESTS
Restrict usage to tests.
|
Modifier and Type | Method and Description |
---|---|
static RestrictTo.Scope |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static RestrictTo.Scope[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RestrictTo.Scope LIBRARY
public static final RestrictTo.Scope LIBRARY_GROUP
public static final RestrictTo.Scope LIBRARY_GROUP_PREFIX
@Deprecated public static final RestrictTo.Scope GROUP_ID
LIBRARY_GROUP_PREFIX
insteadLIBRARY_GROUP_PREFIX
.public static final RestrictTo.Scope TESTS
public static final RestrictTo.Scope SUBCLASSES
Note: This scope should not be used to annotate packages.
public static RestrictTo.Scope[] values()
for (RestrictTo.Scope c : RestrictTo.Scope.values()) System.out.println(c);
public static RestrictTo.Scope valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null