Search in sources :

Example 1 with PackageJsonExtractor

use of com.synopsys.integration.detectable.detectables.npm.packagejson.PackageJsonExtractor in project synopsys-detect by blackducksoftware.

the class PackageJsonExtractorTest method createExtractor.

private PackageJsonExtractor createExtractor(NpmDependencyType... excludedTypes) {
    Gson gson = new GsonBuilder().setPrettyPrinting().create();
    EnumListFilter<NpmDependencyType> npmDependencyTypeFilter = EnumListFilter.fromExcluded(excludedTypes);
    return new PackageJsonExtractor(gson, new ExternalIdFactory(), npmDependencyTypeFilter);
}
Also used : GsonBuilder(com.google.gson.GsonBuilder) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) PackageJsonExtractor(com.synopsys.integration.detectable.detectables.npm.packagejson.PackageJsonExtractor) Gson(com.google.gson.Gson) NpmDependencyType(com.synopsys.integration.detectable.detectables.npm.NpmDependencyType)

Example 2 with PackageJsonExtractor

use of com.synopsys.integration.detectable.detectables.npm.packagejson.PackageJsonExtractor in project synopsys-detect by blackducksoftware.

the class PackageJsonExtractorFunctionalTest method createExtractor.

private PackageJsonExtractor createExtractor(NpmDependencyType... excludedTypes) {
    Gson gson = new GsonBuilder().setPrettyPrinting().create();
    EnumListFilter<NpmDependencyType> npmDependencyTypeFilter = EnumListFilter.fromExcluded(excludedTypes);
    return new PackageJsonExtractor(gson, new ExternalIdFactory(), npmDependencyTypeFilter);
}
Also used : GsonBuilder(com.google.gson.GsonBuilder) ExternalIdFactory(com.synopsys.integration.bdio.model.externalid.ExternalIdFactory) PackageJsonExtractor(com.synopsys.integration.detectable.detectables.npm.packagejson.PackageJsonExtractor) Gson(com.google.gson.Gson) NpmDependencyType(com.synopsys.integration.detectable.detectables.npm.NpmDependencyType)

Aggregations

Gson (com.google.gson.Gson)2 GsonBuilder (com.google.gson.GsonBuilder)2 ExternalIdFactory (com.synopsys.integration.bdio.model.externalid.ExternalIdFactory)2 NpmDependencyType (com.synopsys.integration.detectable.detectables.npm.NpmDependencyType)2 PackageJsonExtractor (com.synopsys.integration.detectable.detectables.npm.packagejson.PackageJsonExtractor)2