Class ResName

java.lang.Object
org.robolectric.res.ResName

public class ResName extends Object
  • Field Details

    • ID_TYPE

      public static final String ID_TYPE
      See Also:
    • packageName

      @Nonnull public final String packageName
    • type

      @Nonnull public final String type
    • name

      @Nonnull public final String name
    • hashCode

      public final int hashCode
  • Constructor Details

    • ResName

      public ResName(@Nonnull String packageName, @Nonnull String type, @Nonnull String name)
    • ResName

      public ResName(@Nonnull String fullyQualifiedName)
  • Method Details

    • qualifyResourceName

      public static String qualifyResourceName(@Nonnull String possiblyQualifiedResourceName, String defaultPackageName, String defaultType)
      Returns the fully qualified resource name if null if the resource could not be qualified.
    • qualifyResName

      public static ResName qualifyResName(@Nonnull String possiblyQualifiedResourceName, ResName defaults)
    • qualifyResName

      public static ResName qualifyResName(@Nonnull String possiblyQualifiedResourceName, String defaultPackageName, String defaultType)
    • qualifyResName

      public static String qualifyResName(String possiblyQualifiedResourceName, String contextPackageName)
    • qualifyFromFilePath

      public static ResName qualifyFromFilePath(@Nonnull String packageName, @Nonnull String filePath)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFullyQualifiedName

      public String getFullyQualifiedName()
    • getNamespaceUri

      public String getNamespaceUri()
    • withPackageName

      public ResName withPackageName(String packageName)
    • mustBe

      public void mustBe(String expectedType)