@Test public void testAdapt() { final Project project = new Project(randomUUID().toString(), new ProjectFile()); final ResourceManager resourceManager = new ResourceManager(project); final PackageResource packageResource = new PackageResource(resourceManager); assertNotNull(packageResource.adapt(ResourceManager.class)); }
@Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isInstance(resourceManager)) { return (T) resourceManager; } return super.adapt(adaptor); }
PackageResource extends BuildResource { @Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isInstance(resourceManager)) { return (T) resourceManager; } return super.adapt(adaptor); } }
PackageResource extends BuildResource { @Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isInstance(resourceManager)) { return (T) resourceManager; } return super.adapt(adaptor); } PackageResource(final ResourceManager resourceManager); }
PackageResource extends BuildResource { @Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isInstance(resourceManager)) { return (T) resourceManager; } return super.adapt(adaptor); } PackageResource(final ResourceManager resourceManager); @Override T adapt(Class<T> adaptor); }
PackageResource extends BuildResource { @Override public <T> T adapt(Class<T> adaptor) { if (adaptor.isInstance(resourceManager)) { return (T) resourceManager; } return super.adapt(adaptor); } PackageResource(final ResourceManager resourceManager); @Override T adapt(Class<T> adaptor);  }