Package provided.owlMaps.cefUtils
Interface IProcessOption<T>
- Type Parameters:
T
- The type of the option value
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface IProcessOption<T>
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS INTERFACE OR ANY IMPLEMENTATION OF IT! ***
A triple input Consumer used for processing option values into a Javascript options object in JSON form. IProcessOptions are used by AOptionsFiller to process each of the options in an options dictionary. The parameters for the 3 input parameters are: key = the MixedDataKey for the option value = the Java value of the option jsonWriter = the GSON JsonWriter object used to output JSON corresponding to the option value being processed.
A triple input Consumer used for processing option values into a Javascript options object in JSON form. IProcessOptions are used by AOptionsFiller to process each of the options in an options dictionary. The parameters for the 3 input parameters are: key = the MixedDataKey for the option value = the Java value of the option jsonWriter = the GSON JsonWriter object used to output JSON corresponding to the option value being processed.
- Author:
- swong
-
Method Summary
Modifier and Type Method Description void
accept(provided.mixedData.MixedDataKey<T> key, T value, com.google.gson.stream.JsonWriter jsonWriter)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Processes the given option key and value, outputting JSON via the given jsonWriter.static <E> IProcessOption<E>
makeDefault(com.google.gson.Gson gson)
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Factory to make a default option processor that simply puts the given value directly into the Javascript options object.static <E> IProcessOption<E>
makeNoOp()
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Factory to make a no-op option processor used to explicitly ignore a option type.
-
Method Details
-
accept
void accept(provided.mixedData.MixedDataKey<T> key, T value, com.google.gson.stream.JsonWriter jsonWriter) throws java.io.IOException*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Processes the given option key and value, outputting JSON via the given jsonWriter.- Parameters:
key
- The option key for the given optionvalue
- The value of the option to processjsonWriter
- The GSON JsonWriter used to output the JSON representation of the given option- Throws:
java.io.IOException
- thrown when the jsonWriter is encounters problems writing to its output stream
-
makeDefault
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Factory to make a default option processor that simply puts the given value directly into the Javascript options object. Used for options whose Java values need to additional processing before being put into the Javascript options object.- Type Parameters:
E
- The type of option the resultant processor will be used for. Needed for type-safety.- Parameters:
gson
- The GSON JSON processor object in use.- Returns:
- Returns a default option processor
-
makeNoOp
*** FOR INTERNAL USE ONLY!! DEVELOPER CODE SHOULD NEVER USE THIS METHOD! ***
Factory to make a no-op option processor used to explicitly ignore a option type. Typically used for options that are only used on the Java side.- Type Parameters:
E
- The type of option the resultant processor will be used for. Needed for type-safety.- Returns:
- Returns a no-op option processor
-