ObjectInputValidation
Stay organized with collections
Save and categorize content based on your preferences.
A callback interface for post-deserialization checks on objects. Allows, for
example, the validation of a whole graph of objects after all of them have
been loaded.
Public Methods
public
abstract
void
validateObject
()
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eObjectInputValidation\u003c/code\u003e is a callback interface used for validating objects after they have been deserialized.\u003c/p\u003e\n"],["\u003cp\u003eIt allows for checking the validity of an entire object graph post-deserialization.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evalidateObject\u003c/code\u003e method is called to perform the validation, and it may throw an \u003ccode\u003eInvalidObjectException\u003c/code\u003e if the object is invalid.\u003c/p\u003e\n"]]],[],null,["# ObjectInputValidation\n\npublic interface **ObjectInputValidation** \nA callback interface for post-deserialization checks on objects. Allows, for\nexample, the validation of a whole graph of objects after all of them have\nbeen loaded. \n\n##### See Also\n\n- [ObjectInputStream.registerValidation(ObjectInputValidation, int)](../../../reference/java/io/ObjectInputStream.html#registerValidation(java.io.ObjectInputValidation,%20int)) \n\n### Public Method Summary\n\n|---------------|-------------------------------------------------------------------------------------------------------------------|\n| abstract void | [validateObject](../../../reference/java/io/ObjectInputValidation.html#validateObject())() Validates this object. |\n\nPublic Methods\n--------------\n\n#### public abstract void\n**validateObject**\n()\n\nValidates this object. \n\n##### Throws\n\n| [InvalidObjectException](../../../reference/java/io/InvalidObjectException.html) | if this object fails to validate itself. |\n|----------------------------------------------------------------------------------|------------------------------------------|"]]