Class LegacyLocalRepoLoader

  • All Implemented Interfaces:
    com.android.repository.api.FallbackLocalRepoLoader

    public class LegacyLocalRepoLoader
    extends java.lang.Object
    implements com.android.repository.api.FallbackLocalRepoLoader
    A FallbackLocalRepoLoader that uses a LocalSdk to parse LocalPkgInfo and convert them into LocalPackages.
    • Constructor Summary

      Constructors 
      Constructor Description
      LegacyLocalRepoLoader​(java.io.File root, com.android.repository.io.FileOp fop)
      Create a new LegacyLocalRepoLoader, based on LocalSdk.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.android.repository.api.LocalPackage parseLegacyLocalPackage​(java.nio.file.Path dirPath, com.android.repository.api.ProgressIndicator progress)
      Tries to parse a package rooted in the specified directory.
      void refresh()  
      boolean shouldParse​(java.nio.file.Path root)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LegacyLocalRepoLoader

        public LegacyLocalRepoLoader​(@NonNull
                                     java.io.File root,
                                     @NonNull
                                     com.android.repository.io.FileOp fop)
        Create a new LegacyLocalRepoLoader, based on LocalSdk.
        Parameters:
        root - The root directory of the SDK.
        fop - FileOp to use. For normal operation should be FileOpUtils.create().
    • Method Detail

      • parseLegacyLocalPackage

        @Nullable
        public com.android.repository.api.LocalPackage parseLegacyLocalPackage​(@NonNull
                                                                               java.nio.file.Path dirPath,
                                                                               @NonNull
                                                                               com.android.repository.api.ProgressIndicator progress)
        Tries to parse a package rooted in the specified directory.
        Specified by:
        parseLegacyLocalPackage in interface com.android.repository.api.FallbackLocalRepoLoader
        Returns:
        A LocalPackage if one was found, otherwise null.
      • refresh

        public void refresh()
        Specified by:
        refresh in interface com.android.repository.api.FallbackLocalRepoLoader
      • shouldParse

        public boolean shouldParse​(@NonNull
                                   java.nio.file.Path root)
        Specified by:
        shouldParse in interface com.android.repository.api.FallbackLocalRepoLoader