|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.android.ide.common.repository.ResourceVisibilityLookup
public abstract class ResourceVisibilityLookup
Class which provides information about whether Android resources for a given library are public or private.
| Nested Class Summary | |
|---|---|
static class |
ResourceVisibilityLookup.Provider
Provider which keeps a set of ResourceVisibilityLookup instances around for
repeated queries, including from different libraries that may share dependencies |
| Field Summary | |
|---|---|
static ResourceVisibilityLookup |
NONE
|
| Constructor Summary | |
|---|---|
ResourceVisibilityLookup()
|
|
| Method Summary | |
|---|---|
static ResourceVisibilityLookup |
create(com.android.builder.model.AndroidLibrary library)
Creates a ResourceVisibilityLookup for a given library. |
static ResourceVisibilityLookup |
create(java.util.List<com.android.builder.model.AndroidLibrary> libraries,
ResourceVisibilityLookup.Provider provider)
Creates a ResourceVisibilityLookup for the set of libraries. |
abstract com.android.builder.model.AndroidLibrary |
getPrivateIn(com.android.resources.ResourceType type,
java.lang.String name)
For a private resource, return the AndroidLibrary that the resource was defined as
private in |
abstract boolean |
isEmpty()
Returns true if this repository does not declare any resources to be private |
abstract boolean |
isPrivate(com.android.resources.ResourceType type,
java.lang.String name)
Returns true if the given resource is private |
boolean |
isPrivate(ResourceUrl url)
Returns true if the given resource is private in the library |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ResourceVisibilityLookup NONE
| Constructor Detail |
|---|
public ResourceVisibilityLookup()
| Method Detail |
|---|
public abstract boolean isPrivate(@NonNull
com.android.resources.ResourceType type,
@NonNull
java.lang.String name)
type - the type of the resourcename - the resource field name of the resource (in other words, for
style Theme:Variant.Cls the name would be Theme_Variant_Cls; you can use
LintUtils#g
public boolean isPrivate(@NonNull
ResourceUrl url)
url - the resource URL
@Nullable
public abstract com.android.builder.model.AndroidLibrary getPrivateIn(@NonNull
com.android.resources.ResourceType type,
@NonNull
java.lang.String name)
AndroidLibrary that the resource was defined as
private in
type - the type of the resourcename - the name of the resource
public abstract boolean isEmpty()
@NonNull
public static ResourceVisibilityLookup create(@NonNull
com.android.builder.model.AndroidLibrary library)
ResourceVisibilityLookup for a given library.
NOTE: The ResourceVisibilityLookup.Provider class can be used to share/cache ResourceVisibilityLookup
instances, e.g. when you have library1 and library2 each referencing libraryBase, the ResourceVisibilityLookup.Provider will ensure that a the libraryBase data is shared.
library - the library
ResourceVisibilityLookup
@NonNull
public static ResourceVisibilityLookup create(@NonNull
java.util.List<com.android.builder.model.AndroidLibrary> libraries,
@Nullable
ResourceVisibilityLookup.Provider provider)
ResourceVisibilityLookup for the set of libraries.
NOTE: The ResourceVisibilityLookup.Provider class can be used to share/cache ResourceVisibilityLookup
instances, e.g. when you have library1 and library2 each referencing libraryBase, the ResourceVisibilityLookup.Provider will ensure that a the libraryBase data is shared.
libraries - the list of librariesprovider - an optional manager instance for caching of individual libraries, if any
ResourceVisibilityLookup
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||