Class LicenseCheckerJreJsonFactory
java.lang.Object
com.vaadin.pro.licensechecker.json.impl.LicenseCheckerJreJsonFactory
- All Implemented Interfaces:
LicenseCheckerJsonFactory
Implementation of LicenseCheckerJsonFactory interface using org.json library.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(boolean bool) Create a LicenseCheckerJsonBoolean from a Java boolean.create(double number) Create a LicenseCheckerJsonNumber from a Java double.Create a LicenseCheckerJsonString from a Java String.Create an empty LicenseCheckerJsonArray.Create a LicenseCheckerJsonNull.Create an empty LicenseCheckerJsonObject.<T extends LicenseCheckerJsonValue>
TParse a String in JSON format and return a LicenseCheckerJsonValue of the appropriate type.
-
Constructor Details
-
LicenseCheckerJreJsonFactory
public LicenseCheckerJreJsonFactory()
-
-
Method Details
-
create
Description copied from interface:LicenseCheckerJsonFactoryCreate a LicenseCheckerJsonString from a Java String.- Specified by:
createin interfaceLicenseCheckerJsonFactory- Parameters:
string- a Java String- Returns:
- the parsed LicenseCheckerJsonString
-
create
Description copied from interface:LicenseCheckerJsonFactoryCreate a LicenseCheckerJsonNumber from a Java double.- Specified by:
createin interfaceLicenseCheckerJsonFactory- Parameters:
number- a Java double- Returns:
- the parsed LicenseCheckerJsonNumber
-
create
Description copied from interface:LicenseCheckerJsonFactoryCreate a LicenseCheckerJsonBoolean from a Java boolean.- Specified by:
createin interfaceLicenseCheckerJsonFactory- Parameters:
bool- a Java boolean- Returns:
- the parsed LicenseCheckerJsonBoolean
-
createArray
Description copied from interface:LicenseCheckerJsonFactoryCreate an empty LicenseCheckerJsonArray.- Specified by:
createArrayin interfaceLicenseCheckerJsonFactory- Returns:
- a new LicenseCheckerJsonArray
-
createNull
Description copied from interface:LicenseCheckerJsonFactoryCreate a LicenseCheckerJsonNull.- Specified by:
createNullin interfaceLicenseCheckerJsonFactory- Returns:
- a LicenseCheckerJsonNull instance
-
createObject
Description copied from interface:LicenseCheckerJsonFactoryCreate an empty LicenseCheckerJsonObject.- Specified by:
createObjectin interfaceLicenseCheckerJsonFactory- Returns:
- a new LicenseCheckerJsonObject
-
parse
public <T extends LicenseCheckerJsonValue> T parse(String jsonString) throws LicenseCheckerJsonException Description copied from interface:LicenseCheckerJsonFactoryParse a String in JSON format and return a LicenseCheckerJsonValue of the appropriate type.- Specified by:
parsein interfaceLicenseCheckerJsonFactory- Parameters:
jsonString- a String in JSON format- Returns:
- a parsed LicenseCheckerJsonValue
- Throws:
LicenseCheckerJsonException
-