Class SchedulingChoiceValueFactory
java.lang.Object
org.mpi_sws.jmc.runtime.scheduling.SchedulingChoiceValueFactory
A factory for creating instances of
SchedulingChoiceValue.
Accepts adapters for types and invokes the adapters to create values
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsType(String type) static SchedulingChoiceValuestatic voidregisterAdapter(String type, SchedulingChoiceValueAdapter<? extends SchedulingChoiceValue> adapter) Registers an adapter for a specific type ofSchedulingChoiceValue.
-
Constructor Details
-
SchedulingChoiceValueFactory
public SchedulingChoiceValueFactory()
-
-
Method Details
-
registerAdapter
public static void registerAdapter(String type, SchedulingChoiceValueAdapter<? extends SchedulingChoiceValue> adapter) Registers an adapter for a specific type ofSchedulingChoiceValue.- Parameters:
type- the type of the scheduling choice value, used to identify the adapter, should be the same as that returned bySchedulingChoiceValue.type()adapter- the adapter instance that converts a JSON object to aSchedulingChoiceValue
-
create
public static SchedulingChoiceValue create(String type, com.google.gson.JsonElement valueObject) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
containsType
-