test_class.file: resource/impl/src/test/java/cloud/piranha/resource/DefaultResourceManagerTest.java
test_class.identifier: DefaultResourceManagerTest
test_case.body: @Test
      void testGetResource() throws Exception {
          DefaultResourceManager manager = new DefaultResourceManager();
          manager.addResource(new DirectoryResource(new File("")));
          assertNull(manager.getResource("/doesnotexist"));
      }
test_case.class_method_signature: DefaultResourceManagerTest.testGetResource()
test_case.full_signature: @Test void testGetResource()
test_case.identifier: testGetResource
test_case.invocations: addResource assertNull getResource
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetResource()
focal_class.declarator: resources = new ArrayList<>()
focal_class.modifier: private final
focal_class.original_string: private final ArrayList<Resource> resources = new ArrayList<>();
focal_class.type: ArrayList<Resource>
focal_class.var_name: resources
focal_class.file: resource/impl/src/main/java/cloud/piranha/resource/DefaultResourceManager.java
focal_class.identifier: DefaultResourceManager
focal_class.interfaces: implements ResourceManager
focal_class.class_method_signature: DefaultResourceManager.addResource(Resource resource)
focal_class.full_signature: @Override public void addResource(Resource resource)
focal_class.identifier: addResource
focal_class.modifiers: @Override public
focal_class.parameters: (Resource resource)
focal_class.return: void
focal_class.signature: void addResource(Resource resource)
focal_class.class_method_signature: DefaultResourceManager.getResource(String location)
focal_class.full_signature: @Override public URL getResource(String location)
focal_class.identifier: getResource
focal_class.modifiers: @Override public
focal_class.parameters: (String location)
focal_class.return: URL
focal_class.signature: URL getResource(String location)
focal_class.class_method_signature: DefaultResourceManager.getResources(String location)
focal_class.full_signature: @Override public Collection<URL> getResources(String location)
focal_class.identifier: getResources
focal_class.modifiers: @Override public
focal_class.parameters: (String location)
focal_class.return: Collection<URL>
focal_class.signature: Collection<URL> getResources(String location)
focal_class.class_method_signature: DefaultResourceManager.getResourceAsStream(String location)
focal_class.full_signature: @Override public InputStream getResourceAsStream(String location)
focal_class.identifier: getResourceAsStream
focal_class.modifiers: @Override public
focal_class.parameters: (String location)
focal_class.return: InputStream
focal_class.signature: InputStream getResourceAsStream(String location)
focal_class.class_method_signature: DefaultResourceManager.getAllLocations()
focal_class.full_signature: @Override public Stream<String> getAllLocations()
focal_class.identifier: getAllLocations
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Stream<String>
focal_class.signature: Stream<String> getAllLocations()
focal_method.body: @Override
      public URL getResource(String location) throws MalformedURLException {
          URL result = null;
          Iterator<Resource> iterator = resources.iterator();
          while (iterator.hasNext()) {
              Resource resource = iterator.next();
              result = resource.getResource(location);
              if (result != null) {
                  break;
              }
          }
          if (result == null) {
              if (location != null) {
                  result = getClass().getResource(location);
              }
          }
          return result;
      }
focal_method.class_method_signature: DefaultResourceManager.getResource(String location)
focal_method.full_signature: @Override public URL getResource(String location)
focal_method.identifier: getResource
focal_method.invocations: iterator hasNext next getResource getResource getClass
focal_method.modifiers: @Override public
focal_method.parameters: (String location)
focal_method.return: URL
focal_method.signature: URL getResource(String location)