@Test public void shouldComputeAssetPathWithoutComponent() { final String assetPath = "path/to/assetName"; Asset asset = createAsset(assetPath); List<BrowsePaths> pathsAsset = generator.computeAssetPaths(asset, null); assertPaths(asList("path", "to", "assetName"), pathsAsset, false); }
@Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String viewName = cutResourceParams(lastSegment(asset.name())); BrowsePaths.appendPath(paths, viewName); return paths; } else { List<String> nameParts = Splitter.on('/').omitEmptyStrings().splitToList(cutResourceParams(asset.name())); return BrowsePaths.fromPaths(nameParts, false); } }
CocoapodsBrowseNodeGenerator extends ComponentSupport implements BrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String viewName = cutResourceParams(lastSegment(asset.name())); BrowsePaths.appendPath(paths, viewName); return paths; } else { List<String> nameParts = Splitter.on('/').omitEmptyStrings().splitToList(cutResourceParams(asset.name())); return BrowsePaths.fromPaths(nameParts, false); } } }
CocoapodsBrowseNodeGenerator extends ComponentSupport implements BrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String viewName = cutResourceParams(lastSegment(asset.name())); BrowsePaths.appendPath(paths, viewName); return paths; } else { List<String> nameParts = Splitter.on('/').omitEmptyStrings().splitToList(cutResourceParams(asset.name())); return BrowsePaths.fromPaths(nameParts, false); } }  }
CocoapodsBrowseNodeGenerator extends ComponentSupport implements BrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String viewName = cutResourceParams(lastSegment(asset.name())); BrowsePaths.appendPath(paths, viewName); return paths; } else { List<String> nameParts = Splitter.on('/').omitEmptyStrings().splitToList(cutResourceParams(asset.name())); return BrowsePaths.fromPaths(nameParts, false); } }  @Override List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component); @Override List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component); }
CocoapodsBrowseNodeGenerator extends ComponentSupport implements BrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String viewName = cutResourceParams(lastSegment(asset.name())); BrowsePaths.appendPath(paths, viewName); return paths; } else { List<String> nameParts = Splitter.on('/').omitEmptyStrings().splitToList(cutResourceParams(asset.name())); return BrowsePaths.fromPaths(nameParts, false); } }  @Override List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component); @Override List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component);  }