Package com.android.sdklib.repository
Class PackageParserUtils
- java.lang.Object
-
- com.android.sdklib.repository.PackageParserUtils
-
public class PackageParserUtils extends java.lang.ObjectMisc utilities to help extracting elements and attributes out of a repository XML document.
-
-
Constructor Summary
Constructors Constructor Description PackageParserUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetProperty(java.util.Properties props, java.lang.String propKey, java.lang.String defaultValue)Utility method that returns a property from aPropertiesobject.static com.android.repository.RevisiongetRevisionProperty(java.util.Properties props, java.lang.String propKey)Utility method to parse thePkgProps.PKG_REVISIONproperty as a revision (major.minor.micro.preview).static java.util.List<java.nio.file.Path>parseSkinFolder(java.nio.file.Path skinRootFolder)Parses the skin folder and builds the skin list.
-
-
-
Method Detail
-
getRevisionProperty
@Nullable public static com.android.repository.Revision getRevisionProperty(@Nullable java.util.Properties props, @NonNull java.lang.String propKey)Utility method to parse thePkgProps.PKG_REVISIONproperty as a revision (major.minor.micro.preview).- Parameters:
props- The properties to parse.propKey- The name of the property. Must not be null.- Returns:
- A
Revisionor null if there is no such property or it couldn't be parsed.
-
getProperty
@Nullable public static java.lang.String getProperty(@Nullable java.util.Properties props, @NonNull java.lang.String propKey, @Nullable java.lang.String defaultValue)Utility method that returns a property from aPropertiesobject. Returns the default value if props is null or if the property is not defined.- Parameters:
props- ThePropertiesto search into. If null, the default value is returned.propKey- The name of the property. Must not be null.defaultValue- The default value to return ifpropsis null or if the key is not found. Can be null.- Returns:
- The string value of the given key in the properties, or null if the key isn't found
or if
propsis null.
-
parseSkinFolder
@NonNull public static java.util.List<java.nio.file.Path> parseSkinFolder(@NonNull java.nio.file.Path skinRootFolder)Parses the skin folder and builds the skin list.- Parameters:
skinRootFolder- The path to the skin root folder.
-
-