MCPcopy
hub / github.com/google/guava / locationsFrom

Method locationsFrom

guava/src/com/google/common/reflect/ClassPath.java:395–401  ·  view source on GitHub ↗

Returns all locations that {@code classloader} and parent loaders load classes and resources from. Callers can {@linkplain LocationInfo#scanResources scan} individual locations selectively or even in parallel.

(ClassLoader classloader)

Source from the content-addressed store, hash-verified

393 * or even in parallel.
394 */
395 static ImmutableSet<LocationInfo> locationsFrom(ClassLoader classloader) {
396 ImmutableSet.Builder<LocationInfo> builder = ImmutableSet.builder();
397 for (Map.Entry<File, ClassLoader> entry : getClassPathEntries(classloader).entrySet()) {
398 builder.add(new LocationInfo(entry.getKey(), entry.getValue()));
399 }
400 return builder.build();
401 }
402
403 /**
404 * Represents a single location (a directory or a jar file) in the class path and is responsible

Callers 5

fromMethod · 0.95
pickAnyJarFileMethod · 0.95
scanResourceNamesMethod · 0.95

Calls 7

builderMethod · 0.95
getClassPathEntriesMethod · 0.95
entrySetMethod · 0.65
addMethod · 0.65
getKeyMethod · 0.65
getValueMethod · 0.65
buildMethod · 0.45

Tested by 4

pickAnyJarFileMethod · 0.76
scanResourceNamesMethod · 0.76