| <html devsite="true"> |
| <head> |
| <title>RestrictTo.Scope</title> |
| {% setvar book_path %}/reference/dokkatest/_book.yaml{% endsetvar %} |
| {% include "_shared/_reference-head-tags.html" %} |
| </head> |
| <body> |
| <div itemscope="" itemtype="http://developers.google.com/ReferenceObject"> |
| <meta itemprop="name" content="RestrictTo.Scope"> |
| <meta itemprop="path" content="androidx.annotation"> |
| <meta itemprop="property" content="getEntries()"> |
| <meta itemprop="property" content="valueOf(kotlin.String)"> |
| <meta itemprop="property" content="values()"> |
| <meta itemprop="language" content="JAVA"> |
| </div> |
| <div id="header-block"> |
| <div> |
| <h1>RestrictTo.Scope</h1> |
| </div> |
| </div> |
| <div id="refdoc-switcher-placeholder"></div> |
| <p> |
| <pre>public enum <a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> extends <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html">Enum</a></pre> |
| </p> |
| <div class="devsite-table-wrapper"> |
| <table class="jd-inheritance-table"> |
| <tbody> |
| <tr> |
| <td colspan="3"><a href="https://developer.android.com/reference/java/lang/Object.html">java.lang.Object</a></td> |
| </tr> |
| <tr> |
| <td class="jd-inheritance-space"> ↳</td> |
| <td colspan="2"><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html">kotlin.Enum</a></td> |
| </tr> |
| <tr> |
| <td> </td> |
| <td class="jd-inheritance-space"> ↳</td> |
| <td colspan="1"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">androidx.annotation.RestrictTo.Scope</a></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <hr> |
| <h2>Summary</h2> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Enum Values</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#GROUP_ID">GROUP_ID</a></code></td> |
| <td> |
| <p><strong>This enum value is deprecated.</strong> Use LIBRARY_GROUP_PREFIX instead.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY">LIBRARY</a></code></td> |
| <td> |
| <p>Restrict usage to code within the same library (e.g. the same gradle group ID and artifact ID).</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP">LIBRARY_GROUP</a></code></td> |
| <td> |
| <p>Restrict usage to code within the same group of libraries.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP_PREFIX">LIBRARY_GROUP_PREFIX</a></code></td> |
| <td> |
| <p>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.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#SUBCLASSES">SUBCLASSES</a></code></td> |
| <td> |
| <p>Restrict usage to subclasses of the enclosing class.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#TESTS">TESTS</a></code></td> |
| <td> |
| <p>Restrict usage to tests.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%"><h3>Public methods</h3></th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td><code>final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.enums/-enum-entries/index.html">EnumEntries</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a>></code></td> |
| <td> |
| <div><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#getEntries()">getEntries</a>()</code></div> |
| <p>Returns a representation of an immutable list of all enum entries, in the order they're declared.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a></code></td> |
| <td> |
| <div><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#valueOf(kotlin.String)">valueOf</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/String.html">String</a> value)</code></div> |
| <p>Returns the enum constant of this type with the specified name.</p> |
| </td> |
| </tr> |
| <tr> |
| <td><code>final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> RestrictTo.Scope[]</code></td> |
| <td> |
| <div><code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#values()">values</a>()</code></div> |
| <p>Returns an array containing the constants of this enum type, in the order they're declared.</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <div class="list"> |
| <h2>Enum Values</h2> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="GROUP_ID">GROUP_ID</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#GROUP_ID">RestrictTo.Scope.GROUP_ID</a></pre> |
| <p>Restrict usage to code within the same group ID (based on gradle group ID). This is an alias for <code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP_PREFIX">LIBRARY_GROUP_PREFIX</a></code>.</p> |
| <p>Use <code><a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP_PREFIX">LIBRARY_GROUP_PREFIX</a></code> instead</p> |
| </div> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="LIBRARY">LIBRARY</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY">RestrictTo.Scope.LIBRARY</a></pre> |
| <p>Restrict usage to code within the same library (e.g. the same gradle group ID and artifact ID).</p> |
| </div> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="LIBRARY_GROUP">LIBRARY_GROUP</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP">RestrictTo.Scope.LIBRARY_GROUP</a></pre> |
| <p>Restrict usage to code within the same group of libraries. This corresponds to the gradle group ID.</p> |
| </div> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="LIBRARY_GROUP_PREFIX">LIBRARY_GROUP_PREFIX</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#LIBRARY_GROUP_PREFIX">RestrictTo.Scope.LIBRARY_GROUP_PREFIX</a></pre> |
| <p>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 ".".</p> |
| </div> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="SUBCLASSES">SUBCLASSES</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#SUBCLASSES">RestrictTo.Scope.SUBCLASSES</a></pre> |
| <p>Restrict usage to subclasses of the enclosing class.</p> |
| <p><b>Note:</b> This scope should not be used to annotate packages.</p> |
| </div> |
| <div class="api-item"> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="TESTS">TESTS</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print"><a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#TESTS">RestrictTo.Scope.TESTS</a></pre> |
| <p>Restrict usage to tests.</p> |
| </div> |
| </div> |
| <div class="list"> |
| <h2>Public methods</h2> |
| <div class="api-item"><a name="getEntries--"></a><a name="getentries"></a> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="getEntries()">getEntries</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print">public final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.enums/-enum-entries/index.html">EnumEntries</a><@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a>> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#getEntries()">getEntries</a>()</pre> |
| <p>Returns a representation of an immutable list of all enum entries, in the order they're declared.</p> |
| <p>This method may be used to iterate over the enum entries.</p> |
| </div> |
| <div class="api-item"><a name="valueOf-kotlin.String-"></a><a name="valueof"></a> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="valueOf(kotlin.String)">valueOf</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print">public final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html">RestrictTo.Scope</a> <a href="/reference/androidx/annotation/RestrictTo.Scope.html#valueOf(kotlin.String)">valueOf</a>(@<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/java/lang/String.html">String</a> value)</pre> |
| <p>Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)</p> |
| <div class="devsite-table-wrapper"> |
| <table class="responsive"> |
| <colgroup> |
| <col width="40%"> |
| <col> |
| </colgroup> |
| <thead> |
| <tr> |
| <th colspan="100%">Throws</th> |
| </tr> |
| </thead> |
| <tbody class="list"> |
| <tr> |
| <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-illegal-argument-exception/index.html">kotlin.IllegalArgumentException</a></code></td> |
| <td> |
| <p>if this enum type has no constant with the specified name</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| <div class="api-item"><a name="values--"></a><a name="values"></a> |
| <div class="api-name-block"> |
| <div> |
| <h3 id="values()">values</h3> |
| </div> |
| </div> |
| <pre class="api-signature no-pretty-print">public final @<a href="/reference/androidx/annotation/NonNull.html">NonNull</a> RestrictTo.Scope[] <a href="/reference/androidx/annotation/RestrictTo.Scope.html#values()">values</a>()</pre> |
| <p>Returns an array containing the constants of this enum type, in the order they're declared.</p> |
| <p>This method may be used to iterate over the constants.</p> |
| </div> |
| </div> |
| </body> |
| </html> |