public class DTOUtil extends Object
Modifier and Type | Class and Description |
---|---|
static class |
DTOUtil.ObjectCategories
Object categories uses as a vessel to carry categorized objects in a package.
|
Constructor and Description |
---|
DTOUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
completionItemToJSON(org.eclipse.lsp4j.CompletionItem completionItem)
Convert CompletionItem to JSON format.
|
static BPackageSymbolDTO |
getBLangPackageDTO(BPackageSymbol packageSymbol)
Get the BPackageSymbolDTO for the package symbol.
|
static BFunctionDTO |
getFunctionDTO(int pkgEntryId,
BInvokableSymbol bInvokableSymbol)
Get the BFunctionDTO for the invokable symbol.
|
static BFunctionDTO |
getFunctionDTO(int pkgEntryId,
int objectId,
BInvokableSymbol bInvokableSymbol)
Get the BFunctionDTO for the invokable symbol.
|
static DTOUtil.ObjectCategories |
getObjectCategories(List<BObjectTypeSymbol> objectTypeSymbols)
Get the Categorized objects from the provided BObjectTypeSymbol list.
|
static BObjectTypeSymbolDTO |
getObjectTypeSymbolDTO(int pkgEntryId,
BObjectTypeSymbol bObjectTypeSymbol,
ObjectType type)
Get the BObjectTypeSymbolDTO for the Object Type symbol.
|
static OtherTypeSymbolDTO |
getOtherTypeSymbolDTO(int pkgEntryId,
BTypeSymbol otherTypeSymbol)
Get the OtherTypeSymbolDTO for the Object Type symbol.
|
static BRecordTypeSymbolDTO |
getRecordTypeSymbolDTO(int pkgEntryId,
BRecordTypeSymbol recordTypeSymbol)
Get the BRecordTypeSymbolDTO for the Object Type symbol.
|
static BLangResourceDTO |
getResourceDTO(int serviceEntryId,
BLangResource bLangResource)
Get the BLangResourceDTO for the BLangResourceDTO.
|
static BLangServiceDTO |
getServiceDTO(int pkgEntryId,
BServiceSymbol bServiceSymbol)
Get the BLangServiceDTO for the service symbol.
|
static TypeDTO |
getTypeDTO(BType bType)
Get the TypeDTO for the BType.
|
public static TypeDTO getTypeDTO(BType bType)
bType
- bType to generate the DAOTypeDTO
Generated DTOpublic static BPackageSymbolDTO getBLangPackageDTO(BPackageSymbol packageSymbol)
packageSymbol
- packageSymbol to generate the DAOBPackageSymbolDTO
Generated DTOpublic static BLangServiceDTO getServiceDTO(int pkgEntryId, BServiceSymbol bServiceSymbol)
pkgEntryId
- Package Entry IDbServiceSymbol
- BServiceSymbol to generate DAOBLangServiceDTO
Generated DTOpublic static BLangResourceDTO getResourceDTO(int serviceEntryId, BLangResource bLangResource)
serviceEntryId
- Service Entry IDbLangResource
- BServiceSymbol to generate DAOBLangResourceDTO
Generated DTOpublic static BFunctionDTO getFunctionDTO(int pkgEntryId, BInvokableSymbol bInvokableSymbol)
pkgEntryId
- Package Entry IDbInvokableSymbol
- BInvokableSymbol to generate DAOBFunctionDTO
Generated DTOpublic static BFunctionDTO getFunctionDTO(int pkgEntryId, int objectId, BInvokableSymbol bInvokableSymbol)
pkgEntryId
- Package Entry IDbInvokableSymbol
- BInvokableSymbol to generate DAOobjectId
- ObjectId which the function is attachedBFunctionDTO
Generated DTOpublic static BObjectTypeSymbolDTO getObjectTypeSymbolDTO(int pkgEntryId, BObjectTypeSymbol bObjectTypeSymbol, ObjectType type)
pkgEntryId
- Package Entry IDbObjectTypeSymbol
- BObjectTypeSymbol to generate DAOtype
- ObjectTypeBObjectTypeSymbolDTO
Generated DTOpublic static BRecordTypeSymbolDTO getRecordTypeSymbolDTO(int pkgEntryId, BRecordTypeSymbol recordTypeSymbol)
pkgEntryId
- Package Entry IDrecordTypeSymbol
- BRecordTypeSymbol to generate DAOBRecordTypeSymbolDTO
Generated DTOpublic static OtherTypeSymbolDTO getOtherTypeSymbolDTO(int pkgEntryId, BTypeSymbol otherTypeSymbol)
pkgEntryId
- Package Entry IDotherTypeSymbol
- BTypeSymbol to generate DAOBRecordTypeSymbolDTO
Generated DTOpublic static String completionItemToJSON(org.eclipse.lsp4j.CompletionItem completionItem)
completionItem
- CompletionItem to convert to StringString
JSON String of CompletionItempublic static DTOUtil.ObjectCategories getObjectCategories(List<BObjectTypeSymbol> objectTypeSymbols)
objectTypeSymbols
- List of ObjectTypeSymbolsDTOUtil.ObjectCategories
Categorised ObjectSymbolsCopyright © 2018 WSO2. All rights reserved.