Package com.facebook.buck.android.aapt
Class RDotTxtEntry
- java.lang.Object
-
- com.facebook.buck.android.aapt.RDotTxtEntry
-
- All Implemented Interfaces:
Comparable<RDotTxtEntry>
- Direct Known Subclasses:
FakeRDotTxtEntry
public class RDotTxtEntry extends Object implements Comparable<RDotTxtEntry>
Represents a row from a symbols file generated byaapt
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RDotTxtEntry.CustomDrawableType
static class
RDotTxtEntry.IdType
static class
RDotTxtEntry.RType
-
Field Summary
Fields Modifier and Type Field Description RDotTxtEntry.CustomDrawableType
customType
RDotTxtEntry.IdType
idType
String
idValue
static String
INT_ARRAY_SEPARATOR
String
name
String
parent
static java.util.function.Function<String,RDotTxtEntry>
TO_ENTRY
RDotTxtEntry.RType
type
-
Constructor Summary
Constructors Constructor Description RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue)
RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, RDotTxtEntry.CustomDrawableType customType)
RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, RDotTxtEntry.CustomDrawableType customType, String parent)
RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, String parent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(RDotTxtEntry that)
A collection of Resources should be sorted such that Resources of the same type should be grouped together, and should be alphabetized within that group.RDotTxtEntry
copyWithNewIdValue(String newIdValue)
RDotTxtEntry
copyWithNewParent(String parent)
boolean
equals(Object obj)
int
hashCode()
static Optional<RDotTxtEntry>
parse(String rDotTxtLine)
static List<RDotTxtEntry>
readResources(ProjectFilesystem owningFilesystem, Path rDotTxt)
Read resource IDs from a R.txt file and add them to a list of entriesString
toString()
-
-
-
Field Detail
-
TO_ENTRY
public static final java.util.function.Function<String,RDotTxtEntry> TO_ENTRY
-
INT_ARRAY_SEPARATOR
public static final String INT_ARRAY_SEPARATOR
- See Also:
- Constant Field Values
-
idType
public final RDotTxtEntry.IdType idType
-
type
public final RDotTxtEntry.RType type
-
name
public final String name
-
idValue
public final String idValue
-
parent
public final String parent
-
customType
public final RDotTxtEntry.CustomDrawableType customType
-
-
Constructor Detail
-
RDotTxtEntry
public RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue)
-
RDotTxtEntry
public RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, @Nullable String parent)
-
RDotTxtEntry
public RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, RDotTxtEntry.CustomDrawableType customType)
-
RDotTxtEntry
public RDotTxtEntry(RDotTxtEntry.IdType idType, RDotTxtEntry.RType type, String name, String idValue, RDotTxtEntry.CustomDrawableType customType, @Nullable String parent)
-
-
Method Detail
-
copyWithNewIdValue
public RDotTxtEntry copyWithNewIdValue(String newIdValue)
-
copyWithNewParent
public RDotTxtEntry copyWithNewParent(String parent)
-
parse
public static Optional<RDotTxtEntry> parse(String rDotTxtLine)
-
readResources
public static List<RDotTxtEntry> readResources(ProjectFilesystem owningFilesystem, Path rDotTxt) throws IOException
Read resource IDs from a R.txt file and add them to a list of entries- Parameters:
owningFilesystem
- The project filesystem to userDotTxt
- the path to the R.txt file to read- Returns:
- a list of RDotTxtEntry objects read from the file
- Throws:
IOException
-
compareTo
public int compareTo(RDotTxtEntry that)
A collection of Resources should be sorted such that Resources of the same type should be grouped together, and should be alphabetized within that group.- Specified by:
compareTo
in interfaceComparable<RDotTxtEntry>
-
-