Validates the object in the given context, optionally producing diagnostics.
@param diagnostics a place to accumulate diagnostics; if it's null, no diagnostics should be produced.
@param context a place to cache information, if it's null, no cache is supported.
@return whether the object is valid.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.