public class BLangPackageContext extends Object
Constructor and Description |
---|
BLangPackageContext() |
Modifier and Type | Method and Description |
---|---|
void |
addPackage(BLangPackage bLangPackage)
add package to the package map.
|
boolean |
containsPackage(String packageName)
Check whether the package exist in the current package context.
|
<T> List<T> |
getItems(Class type) |
BLangPackage |
getPackageByName(CompilerContext compilerContext,
Name name)
Get package by name.
|
ArrayList<PackageID> |
getSDKPackages(CompilerContext context)
Get the SDK packages.
|
public BLangPackage getPackageByName(CompilerContext compilerContext, Name name)
compilerContext
- compiler contextname
- name of the packagepublic void addPackage(BLangPackage bLangPackage)
bLangPackage
- ballerina package to be added.public boolean containsPackage(String packageName)
packageName
- package nameBoolean
package exist or notpublic ArrayList<PackageID> getSDKPackages(CompilerContext context)
context
- CompletionContextList
list of packages visible in the SDKCopyright © 2018 WSO2. All rights reserved.