use of org.ballerinalang.composer.service.ballerina.parser.service.model.SymbolInformation in project ballerina by ballerina-lang.
the class ParserUtils method getBuiltinTypes.
/**
* Get the builtin types.
*
* @return {@link List} list of builtin types
*/
public static List<SymbolInformation> getBuiltinTypes() {
CompilerContext context = prepareCompilerContext("", "");
SymbolTable symbolTable = SymbolTable.getInstance(context);
List<SymbolInformation> symbolInformationList = new ArrayList<>();
// TODO: Need to fill the default values
symbolTable.rootScope.entries.forEach((key, value) -> {
if (value.symbol instanceof BTypeSymbol) {
SymbolInformation symbolInfo = new SymbolInformation();
String symbolName = value.symbol.getName().getValue();
if (!symbolName.equals(BuiltInType.INVALID_TYPE)) {
symbolInfo.setName(symbolName);
setDefaultValuesForType(symbolName, symbolInfo);
symbolInformationList.add(symbolInfo);
}
}
});
return symbolInformationList;
}
Aggregations