- java.lang.Object
- 
- org.mal_lang.langspec.builders.LangBuilder
 
- 
- 
Constructor SummaryConstructors Constructor Description LangBuilder()Constructs a newLangBuilderobject.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LangBuilderaddAsset(AssetBuilder asset)Adds an asset to thisLangBuilderobject.LangBuilderaddAssociation(AssociationBuilder association)Adds an association to thisLangBuilderobject.LangBuilderaddCategory(CategoryBuilder category)Adds a category to thisLangBuilderobject.LangBuilderaddDefine(String key, String value)Adds a define to thisLangBuilderobject.static LangBuilderfromJson(JsonObject jsonLang)Creates a newLangBuilderfrom aJsonObject.static LangBuilderfromJson(JsonObject jsonLang, String license, String notice)Creates a newLangBuilderfrom aJsonObject.static LangBuilderfromJson(JsonObject jsonLang, Map<String,byte[]> svgIcons, Map<String,byte[]> pngIcons)Creates a newLangBuilderfrom aJsonObject.static LangBuilderfromJson(JsonObject jsonLang, Map<String,byte[]> svgIcons, Map<String,byte[]> pngIcons, String license, String notice)Creates a newLangBuilderfrom aJsonObject.List<AssetBuilder>getAssets()Returns a list of all assets in thisLangBuilderobject.List<AssociationBuilder>getAssociations()Returns a list of all associations in thisLangBuilderobject.List<CategoryBuilder>getCategories()Returns a list of all categories in thisLangBuilderobject.Map<String,String>getDefines()Returns all defines in thisLangBuilderobject.StringgetLicense()Returns the license of thisLangBuilderobject, ornullif no license has been set.StringgetNotice()Returns the notice of thisLangBuilderobject, ornullif no notice has been set.LangBuildersetLicense(String license)Sets the license of thisLangBuilderobject.LangBuildersetNotice(String notice)Sets the notice of thisLangBuilderobject.
 
- 
- 
- 
Method Detail- 
getDefinespublic Map<String,String> getDefines() Returns all defines in thisLangBuilderobject.- Returns:
- all defines in this LangBuilderobject
- Since:
- 1.0.0
 
 - 
addDefinepublic LangBuilder addDefine(String key, String value) Adds a define to thisLangBuilderobject.- Parameters:
- key- the key of the define
- value- the value of the define
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- keyor- valueis- null
- IllegalArgumentException- if- keyis not a valid identifier
- Since:
- 1.0.0
 
 - 
getCategoriespublic List<CategoryBuilder> getCategories() Returns a list of all categories in thisLangBuilderobject.- Returns:
- a list of all categories in this LangBuilderobject
- Since:
- 1.0.0
 
 - 
addCategorypublic LangBuilder addCategory(CategoryBuilder category) Adds a category to thisLangBuilderobject.- Parameters:
- category- the category to add
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- categoryis- null
- Since:
- 1.0.0
 
 - 
getAssetspublic List<AssetBuilder> getAssets() Returns a list of all assets in thisLangBuilderobject.- Returns:
- a list of all assets in this LangBuilderobject
- Since:
- 1.0.0
 
 - 
addAssetpublic LangBuilder addAsset(AssetBuilder asset) Adds an asset to thisLangBuilderobject.- Parameters:
- asset- the asset to add
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- assetis- null
- Since:
- 1.0.0
 
 - 
getAssociationspublic List<AssociationBuilder> getAssociations() Returns a list of all associations in thisLangBuilderobject.- Returns:
- a list of all associations in this LangBuilderobject
- Since:
- 1.0.0
 
 - 
addAssociationpublic LangBuilder addAssociation(AssociationBuilder association) Adds an association to thisLangBuilderobject.- Parameters:
- association- the association to add
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- associationis- null
- Since:
- 1.0.0
 
 - 
getLicensepublic String getLicense() Returns the license of thisLangBuilderobject, ornullif no license has been set.- Returns:
- the license of this LangBuilderobject, ornullif no license has been set
- Since:
- 1.0.0
 
 - 
setLicensepublic LangBuilder setLicense(String license) Sets the license of thisLangBuilderobject.- Parameters:
- license- the license to set
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- licenseis- null
- Since:
- 1.0.0
 
 - 
getNoticepublic String getNotice() Returns the notice of thisLangBuilderobject, ornullif no notice has been set.- Returns:
- the notice of this LangBuilderobject, ornullif no notice has been set
- Since:
- 1.0.0
 
 - 
setNoticepublic LangBuilder setNotice(String notice) Sets the notice of thisLangBuilderobject.- Parameters:
- notice- the notice to set
- Returns:
- this LangBuilderobject
- Throws:
- NullPointerException- if- noticeis- null
- Since:
- 1.0.0
 
 - 
fromJsonpublic static LangBuilder fromJson(JsonObject jsonLang) Creates a newLangBuilderfrom aJsonObject.- Parameters:
- jsonLang- the- JsonObject
- Returns:
- a new LangBuilder
- Throws:
- NullPointerException- if- jsonLangis- null
- Since:
- 1.0.0
 
 - 
fromJsonpublic static LangBuilder fromJson(JsonObject jsonLang, Map<String,byte[]> svgIcons, Map<String,byte[]> pngIcons) Creates a newLangBuilderfrom aJsonObject.- Parameters:
- jsonLang- the- JsonObject
- svgIcons- the SVG icons of the language
- pngIcons- the PNG icons of the language
- Returns:
- a new LangBuilder
- Throws:
- NullPointerException- if- jsonLang,- svgIcons, or- pngIconsis- null
- Since:
- 1.0.0
 
 - 
fromJsonpublic static LangBuilder fromJson(JsonObject jsonLang, String license, String notice) Creates a newLangBuilderfrom aJsonObject.- Parameters:
- jsonLang- the- JsonObject
- license- the license of the language, or- null
- notice- the notice of the language, or- null
- Returns:
- a new LangBuilder
- Throws:
- NullPointerException- if- jsonLangis- null
- Since:
- 1.0.0
 
 - 
fromJsonpublic static LangBuilder fromJson(JsonObject jsonLang, Map<String,byte[]> svgIcons, Map<String,byte[]> pngIcons, String license, String notice) Creates a newLangBuilderfrom aJsonObject.- Parameters:
- jsonLang- the- JsonObject
- svgIcons- the SVG icons of the language
- pngIcons- the PNG icons of the language
- license- the license of the language, or- null
- notice- the notice of the language, or- null
- Returns:
- a new LangBuilder
- Throws:
- NullPointerException- if- jsonLang,- svgIcons, or- pngIconsis- null
- Since:
- 1.0.0
 
 
- 
 
-