• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 package com.android.tools.r8;
5 
6 import java.util.Set;
7 
8 /**
9  * Represents a provider for application resources of class file kind.
10  *
11  * Note that the classes will only be created for resources provided by
12  * resource providers on-demand when they are needed by the tool. If
13  * never needed, the resource will never be loaded.
14  */
15 public interface ClassFileResourceProvider {
16   /** Returns all class descriptors. */
getClassDescriptors()17   Set<String> getClassDescriptors();
18 
19   /**
20    * Get the class resource associated with the descriptor, or null if
21    * this provider does not have one.
22    *
23    * Method may be called several times for the same resource, and should
24    * support concurrent calls from different threads.
25    */
getResource(String descriptor)26   Resource getResource(String descriptor);
27 }
28