Search in sources :

Example 1 with SearchPattern

use of com.synopsys.integration.detectable.detectable.SearchPattern in project synopsys-detect by blackducksoftware.

the class XcodeWorkspaceDetectable method extractable.

@Override
public DetectableResult extractable() {
    Requirements requirements = new Requirements(fileFinder, environment);
    File swiftPMDirectory = workspaceDirectory.toPath().resolve("xcshareddata/swiftpm").toFile();
    requirements.anyFile(new SearchPattern(swiftPMDirectory, "Package.resolved", packageResolvedFile -> foundPackageResolvedFile = packageResolvedFile), new SearchPattern(workspaceDirectory, "contents.xcworkspacedata", workspaceDataFile -> foundWorkspaceDataFile = workspaceDataFile));
    return requirements.result();
}
Also used : DetectableResult(com.synopsys.integration.detectable.detectable.result.DetectableResult) PackageResolvedResult(com.synopsys.integration.detectable.detectables.swift.lock.model.PackageResolvedResult) Extraction(com.synopsys.integration.detectable.extraction.Extraction) XcodeWorkspaceResult(com.synopsys.integration.detectable.detectables.xcode.model.XcodeWorkspaceResult) IOException(java.io.IOException) FileFinder(com.synopsys.integration.common.util.finder.FileFinder) SearchPattern(com.synopsys.integration.detectable.detectable.SearchPattern) File(java.io.File) Nullable(org.jetbrains.annotations.Nullable) List(java.util.List) DetectableInfo(com.synopsys.integration.detectable.detectable.annotation.DetectableInfo) CodeLocation(com.synopsys.integration.detectable.detectable.codelocation.CodeLocation) ParserConfigurationException(javax.xml.parsers.ParserConfigurationException) Requirements(com.synopsys.integration.detectable.detectable.Requirements) ExtractionEnvironment(com.synopsys.integration.detectable.extraction.ExtractionEnvironment) Detectable(com.synopsys.integration.detectable.Detectable) SAXException(org.xml.sax.SAXException) FailedDetectableResult(com.synopsys.integration.detectable.detectable.result.FailedDetectableResult) Optional(java.util.Optional) DetectableEnvironment(com.synopsys.integration.detectable.DetectableEnvironment) PackageResolvedExtractor(com.synopsys.integration.detectable.detectables.swift.lock.PackageResolvedExtractor) LinkedList(java.util.LinkedList) SearchPattern(com.synopsys.integration.detectable.detectable.SearchPattern) File(java.io.File) Requirements(com.synopsys.integration.detectable.detectable.Requirements)

Aggregations

FileFinder (com.synopsys.integration.common.util.finder.FileFinder)1 Detectable (com.synopsys.integration.detectable.Detectable)1 DetectableEnvironment (com.synopsys.integration.detectable.DetectableEnvironment)1 Requirements (com.synopsys.integration.detectable.detectable.Requirements)1 SearchPattern (com.synopsys.integration.detectable.detectable.SearchPattern)1 DetectableInfo (com.synopsys.integration.detectable.detectable.annotation.DetectableInfo)1 CodeLocation (com.synopsys.integration.detectable.detectable.codelocation.CodeLocation)1 DetectableResult (com.synopsys.integration.detectable.detectable.result.DetectableResult)1 FailedDetectableResult (com.synopsys.integration.detectable.detectable.result.FailedDetectableResult)1 PackageResolvedExtractor (com.synopsys.integration.detectable.detectables.swift.lock.PackageResolvedExtractor)1 PackageResolvedResult (com.synopsys.integration.detectable.detectables.swift.lock.model.PackageResolvedResult)1 XcodeWorkspaceResult (com.synopsys.integration.detectable.detectables.xcode.model.XcodeWorkspaceResult)1 Extraction (com.synopsys.integration.detectable.extraction.Extraction)1 ExtractionEnvironment (com.synopsys.integration.detectable.extraction.ExtractionEnvironment)1 File (java.io.File)1 IOException (java.io.IOException)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Optional (java.util.Optional)1 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)1