public void setLocationFromPaths()

in src/main/java/org/apache/maven/plugin/compiler/ForkedToolSources.java [410:428]


    public void setLocationFromPaths(Location location, Collection<? extends Path> paths) {
        PathType type = JavaPathType.valueOf(location).orElse(null);
        if (type == null) {
            if (location == StandardLocation.SOURCE_OUTPUT) {
                type = OtherPathType.GENERATED_SOURCES;
            } else if (location == StandardLocation.SOURCE_PATH) {
                type = OtherPathType.SOURCES;
            } else if (location == StandardLocation.CLASS_OUTPUT) {
                type = OtherPathType.OUTPUT;
            } else {
                throw new IllegalArgumentException("Unsupported location: " + location);
            }
        }
        if (paths == null || paths.isEmpty()) {
            locations.remove(type);
        } else {
            locations.put(type, paths);
        }
    }