Package org.apache.dubbo.common.utils
Class JsonCompatibilityUtil
java.lang.Object
org.apache.dubbo.common.utils.JsonCompatibilityUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancheckClassCompatibility(Class<?> clazz) Determine whether a Class can be serialized by JSON.static booleancheckMethodCompatibility(Method method) Determine whether a Method can be serialized by JSON.getUnsupportedMethods(Class<?> clazz) Get unsupported methods.
-
Constructor Details
-
JsonCompatibilityUtil
public JsonCompatibilityUtil()
-
-
Method Details
-
checkClassCompatibility
Determine whether a Class can be serialized by JSON.- Parameters:
clazz- Incoming Class.- Returns:
- If a Class can be serialized by JSON, return true; else return false.
-
checkMethodCompatibility
Determine whether a Method can be serialized by JSON.- Parameters:
method- Incoming Method.- Returns:
- If a Method can be serialized by JSON, return true; else return false.
-
getUnsupportedMethods
Get unsupported methods.- Parameters:
clazz-- Returns:
- If there are unsupported methods, return them by List; else return null.
-