public class LSPackageCache extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addPackage(PackageID packageID,
BLangPackage bLangPackage)
add package to the package map.
|
void |
clearCache() |
BLangPackage |
findPackage(CompilerContext compilerContext,
PackageID pkgId)
Find the package by Package ID.
|
static LSPackageCache |
getInstance(CompilerContext context) |
org.ballerinalang.langserver.compiler.LSPackageCache.ExtendedPackageCache |
getPackageCache() |
Map<String,BLangPackage> |
getPackageMap() |
void |
removePackage(PackageID packageID)
removes package from the package map.
|
public static LSPackageCache getInstance(CompilerContext context)
public BLangPackage findPackage(CompilerContext compilerContext, PackageID pkgId)
compilerContext - compiler contextpkgId - Package Id to lookupBLangPackage BLang Package resolvedpublic void removePackage(PackageID packageID)
packageID - ballerina package id to be removed.public void clearCache()
public void addPackage(PackageID packageID, BLangPackage bLangPackage)
bLangPackage - ballerina package to be added.public org.ballerinalang.langserver.compiler.LSPackageCache.ExtendedPackageCache getPackageCache()
public Map<String,BLangPackage> getPackageMap()
Copyright © 2018 WSO2. All rights reserved.