Class DriverExclusionStrategy
- java.lang.Object
-
- io.testproject.sdk.internal.rest.serialization.DriverExclusionStrategy
-
- All Implemented Interfaces:
com.google.gson.ExclusionStrategy
public class DriverExclusionStrategy extends java.lang.Object implements com.google.gson.ExclusionStrategyThis exclusion strategy makes sure to skip serialization of any classes implementing the WebDriver interface. Since this object is redundant when reporting command parameters and doesn’t pass serialization - we exclude it. See https://github.com/google/gson/issues/1540 for more details on the serialization problem
-
-
Constructor Summary
Constructors Constructor Description DriverExclusionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldSkipClass(java.lang.Class<?> clazz)Determines whether the class implements aWebDriverinterface and should be ignored.booleanshouldSkipField(com.google.gson.FieldAttributes f)Determined whether a filed should be skipped.
-
-
-
Method Detail
-
shouldSkipClass
public boolean shouldSkipClass(java.lang.Class<?> clazz)
Determines whether the class implements aWebDriverinterface and should be ignored.- Specified by:
shouldSkipClassin interfacecom.google.gson.ExclusionStrategy- Parameters:
clazz- the class object that is under test- Returns:
- true if the class should be ignored; otherwise false
-
shouldSkipField
public boolean shouldSkipField(com.google.gson.FieldAttributes f)
Determined whether a filed should be skipped. It has no effect in this exclusion strategy as there is no need for it. Note: It is not used / implemented in this strategy as it is redundant.- Specified by:
shouldSkipFieldin interfacecom.google.gson.ExclusionStrategy- Parameters:
f- the field object that is under test- Returns:
- true if the field should be ignored; otherwise false
-
-