public enum

RestrictTo.Scope

extends java.lang.Enum<RestrictTo.Scope>

 java.lang.Object

↳java.lang.Enum<RestrictTo.Scope>

↳androidx.annotation.RestrictTo.Scope

Summary

Enum Constants
GROUP_IDRestrict usage to code within the same group ID (based on gradle group ID).
LIBRARYRestrict usage to code within the same library (e.g.
LIBRARY_GROUPRestrict usage to code within the same group of libraries.
LIBRARY_GROUP_PREFIXRestrict usage to code within packages whose groups share the same library group prefix up to the last ".", so for example libraries foo.bar:lib1 and foo.baz:lib2 share the prefix "foo." and so they can use each other's apis that are restricted to this scope.
SUBCLASSESRestrict usage to subclasses of the enclosing class.
TESTSRestrict usage to tests.
Methods
public static RestrictTo.ScopevalueOf(java.lang.String name)

public static RestrictTo.Scopevalues()

from java.lang.Enum<E>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
from java.lang.ObjectgetClass, notify, notifyAll, wait, wait, wait

Enum Constants

LIBRARY

Restrict usage to code within the same library (e.g. the same gradle group ID and artifact ID).

LIBRARY_GROUP

Restrict usage to code within the same group of libraries. This corresponds to the gradle group ID.

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 and foo.baz:lib2 share the prefix "foo." and so they can use each other's apis that are restricted to this scope. Similarly for com.foo.bar:lib1 and com.foo.baz:lib2 where they share "com.foo.". Library com.bar.qux:lib3 however will not be able to use the restricted api because it only shares the prefix "com." and not all the way until the last ".".

GROUP_ID

Restrict usage to code within the same group ID (based on gradle group ID). This is an alias for RestrictTo.Scope.LIBRARY_GROUP_PREFIX.

TESTS

Restrict usage to tests.

SUBCLASSES

Restrict usage to subclasses of the enclosing class.

Note: This scope should not be used to annotate packages.

Methods

public static RestrictTo.Scope values()

public static RestrictTo.Scope valueOf(java.lang.String name)