All Downloads are FREE. Search and download functionalities are using the official Maven repository.

system.xml.serialization.XmlSerializer Maven / Gradle / Ivy

/*
 *  MIT License
 *
 *  Copyright (c) 2024 MASES s.r.l.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in all
 *  copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 *  SOFTWARE.
 */

/**************************************************************************************
 * 
 *      This code was generated from a template using JCOReflector v. 1.15.0.0
 * 
 *      Manual changes to this file may cause unexpected behavior in your application.
 *      Manual changes to this file will be overwritten if the code is regenerated.
 * 
 *************************************************************************************/

package system.xml.serialization;

import org.mases.jcobridge.*;
import org.mases.jcobridge.netreflection.*;
import java.util.ArrayList;

// Import section
import system.xml.serialization.XmlAttributeOverrides;
import system.xml.serialization.XmlRootAttribute;
import system.xml.serialization.XmlTypeMapping;
import system.xml.XmlReader;
import system.io.Stream;
import system.io.TextReader;
import system.xml.serialization.XmlDeserializationEvents;
import system.xml.serialization.XmlSerializer;
import system.xml.serialization.XmlMapping;
import system.xml.serialization.XmlSerializerNamespaces;
import system.io.TextWriter;
import system.xml.XmlWriter;
import system.xml.serialization.UnreferencedObjectEventHandler;
import system.xml.serialization.XmlAttributeEventHandler;
import system.xml.serialization.XmlElementEventHandler;
import system.xml.serialization.XmlNodeEventHandler;


/**
 * The base .NET class managing System.Xml.Serialization.XmlSerializer, System.Private.Xml, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51.
 * 

* * .NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Xml.Serialization.XmlSerializer *

* * Powered by JCOBridge: more info at https://www.jcobridge.com * * @author MASES s.r.l https://masesgroup.com * @version 1.15.0.0 */ public class XmlSerializer extends NetObject { /** * Fully assembly qualified name: System.Private.Xml, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 */ public static final String assemblyFullName = "System.Private.Xml, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"; /** * Assembly name: System.Private.Xml */ public static final String assemblyShortName = "System.Private.Xml"; /** * Qualified class name: System.Xml.Serialization.XmlSerializer */ public static final String className = "System.Xml.Serialization.XmlSerializer"; static JCOBridge bridge = JCOBridgeInstance.getInstance(assemblyFullName); /** * The type managed from JCOBridge. See {@link JCType} */ public static JCType classType = createType(); static JCEnum enumInstance = null; JCObject classInstance = null; static JCType createType() { try { String classToCreate = className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); if (JCOReflector.getDebug()) JCOReflector.writeLog("Creating %s", classToCreate); JCType typeCreated = bridge.GetType(classToCreate); if (JCOReflector.getDebug()) JCOReflector.writeLog("Created: %s", (typeCreated != null) ? typeCreated.toString() : "Returned null value"); return typeCreated; } catch (JCException e) { JCOReflector.writeLog(e); return null; } } void addReference(String ref) throws Throwable { try { bridge.AddReference(ref); } catch (JCNativeException jcne) { throw translateException(jcne); } } /** * Internal constructor. Use with caution */ public XmlSerializer(java.lang.Object instance) throws Throwable { super(instance); if (instance instanceof JCObject) { classInstance = (JCObject) instance; } else throw new Exception("Cannot manage object, it is not a JCObject"); } public String getJCOAssemblyName() { return assemblyFullName; } public String getJCOClassName() { return className; } public String getJCOObjectName() { return className + ", " + (JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); } public java.lang.Object getJCOInstance() { return classInstance; } public void setJCOInstance(JCObject instance) { classInstance = instance; super.setJCOInstance(classInstance); } public JCType getJCOType() { return classType; } /** * Try to cast the {@link IJCOBridgeReflected} instance into {@link XmlSerializer}, a cast assert is made to check if types are compatible. * @param from {@link IJCOBridgeReflected} instance to be casted * @return {@link XmlSerializer} instance * @throws java.lang.Throwable in case of error during cast operation */ public static XmlSerializer cast(IJCOBridgeReflected from) throws Throwable { NetType.AssertCast(classType, from); return new XmlSerializer(from.getJCOInstance()); } // Constructors section public XmlSerializer() throws Throwable { } public XmlSerializer(NetType type, java.lang.String defaultNamespace) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.FormatException, system.NullReferenceException, system.security.cryptography.CryptographicException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.io.FileNotFoundException, system.diagnostics.tracing.EventSourceException, system.io.FileLoadException, system.MulticastNotSupportedException, system.MissingMethodException, system.reflection.TargetInvocationException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), defaultNamespace)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type, NetType[] extraTypes) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), toObjectFromArray(extraTypes))); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type, XmlAttributeOverrides overrides, NetType[] extraTypes, XmlRootAttribute root, java.lang.String defaultNamespace, java.lang.String location) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.IndexOutOfRangeException, system.globalization.CultureNotFoundException, system.collections.generic.KeyNotFoundException, system.InvalidCastException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), overrides == null ? null : overrides.getJCOInstance(), toObjectFromArray(extraTypes), root == null ? null : root.getJCOInstance(), defaultNamespace, location)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type, XmlAttributeOverrides overrides, NetType[] extraTypes, XmlRootAttribute root, java.lang.String defaultNamespace) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), overrides == null ? null : overrides.getJCOInstance(), toObjectFromArray(extraTypes), root == null ? null : root.getJCOInstance(), defaultNamespace)); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type, XmlAttributeOverrides overrides) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), overrides == null ? null : overrides.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type, XmlRootAttribute root) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.collections.generic.KeyNotFoundException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance(), root == null ? null : root.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(NetType type) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.FormatException, system.NullReferenceException, system.ArrayTypeMismatchException, system.security.cryptography.CryptographicException, system.OutOfMemoryException, system.io.FileNotFoundException, system.RankException, system.diagnostics.tracing.EventSourceException, system.io.FileLoadException, system.globalization.CultureNotFoundException, system.MulticastNotSupportedException, system.MissingMethodException, system.reflection.TargetInvocationException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(type == null ? null : type.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } public XmlSerializer(XmlTypeMapping xmlTypeMapping) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException { try { // add reference to assemblyName.dll file addReference(JCOReflector.getUseFullAssemblyName() ? assemblyFullName : assemblyShortName); setJCOInstance((JCObject)classType.NewObject(xmlTypeMapping == null ? null : xmlTypeMapping.getJCOInstance())); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Methods section public boolean CanDeserialize(XmlReader xmlReader) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.collections.generic.KeyNotFoundException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { return (boolean)classInstance.Invoke("CanDeserialize", xmlReader == null ? null : xmlReader.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(Stream stream) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.OutOfMemoryException, system.FormatException, system.xml.XmlException, system.InvalidOperationException, system.NotSupportedException, system.ArrayTypeMismatchException, system.io.IOException, system.OverflowException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", stream == null ? null : stream.getJCOInstance()); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(TextReader textReader) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.xml.XmlException, system.PlatformNotSupportedException, system.IndexOutOfRangeException, system.NotSupportedException, system.FormatException, system.OutOfMemoryException, system.ArgumentNullException, system.OverflowException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", textReader == null ? null : textReader.getJCOInstance()); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(XmlReader xmlReader, java.lang.String encodingStyle, XmlDeserializationEvents events) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.FormatException, system.xml.XmlException, system.OverflowException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException, system.InvalidCastException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", xmlReader == null ? null : xmlReader.getJCOInstance(), encodingStyle, events == null ? null : events.getJCOInstance()); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(XmlReader xmlReader, java.lang.String encodingStyle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.InvalidOperationException, system.ObjectDisposedException, system.FormatException, system.xml.XmlException, system.OutOfMemoryException, system.OverflowException, system.IndexOutOfRangeException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", xmlReader == null ? null : xmlReader.getJCOInstance(), encodingStyle); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(XmlReader xmlReader, XmlDeserializationEvents events) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.InvalidOperationException, system.ObjectDisposedException, system.FormatException, system.xml.XmlException, system.OutOfMemoryException, system.OverflowException, system.IndexOutOfRangeException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", xmlReader == null ? null : xmlReader.getJCOInstance(), events == null ? null : events.getJCOInstance()); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public NetObject Deserialize(XmlReader xmlReader) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.FormatException, system.xml.XmlException, system.OutOfMemoryException, system.NotSupportedException, system.OverflowException, system.IndexOutOfRangeException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.ArrayTypeMismatchException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { JCObject objDeserialize = (JCObject)classInstance.Invoke("Deserialize", xmlReader == null ? null : xmlReader.getJCOInstance()); return new NetObject(objDeserialize); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String GetXmlSerializerAssemblyName(NetType type, java.lang.String defaultNamespace) throws Throwable, system.ArgumentException, system.ArgumentOutOfRangeException, system.PlatformNotSupportedException, system.NotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.RankException, system.ArrayTypeMismatchException, system.ArgumentNullException, system.security.cryptography.CryptographicException, system.OverflowException, system.IndexOutOfRangeException, system.FormatException, system.OutOfMemoryException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (java.lang.String)classType.Invoke("GetXmlSerializerAssemblyName", type == null ? null : type.getJCOInstance(), defaultNamespace); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static java.lang.String GetXmlSerializerAssemblyName(NetType type) throws Throwable, system.ArgumentException, system.NotSupportedException, system.InvalidOperationException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.PlatformNotSupportedException, system.ArrayTypeMismatchException, system.security.cryptography.CryptographicException, system.IndexOutOfRangeException, system.FormatException, system.OutOfMemoryException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { return (java.lang.String)classType.Invoke("GetXmlSerializerAssemblyName", type == null ? null : type.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public static XmlSerializer[] FromMappings(XmlMapping[] mappings, NetType type) throws Throwable, system.PlatformNotSupportedException, system.NullReferenceException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentException, system.ArrayTypeMismatchException, system.security.cryptography.CryptographicException, system.IndexOutOfRangeException, system.FormatException, system.OutOfMemoryException, system.globalization.CultureNotFoundException, system.io.FileNotFoundException, system.RankException, system.diagnostics.tracing.EventSourceException, system.io.FileLoadException, system.MulticastNotSupportedException, system.MissingMethodException, system.reflection.TargetInvocationException, system.collections.generic.KeyNotFoundException, system.InvalidCastException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("FromMappings", toObjectFromArray(mappings), type == null ? null : type.getJCOInstance()); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new XmlSerializer(resultingObject)); } XmlSerializer[] resultingArray = new XmlSerializer[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static XmlSerializer[] FromMappings(XmlMapping[] mappings) throws Throwable, system.PlatformNotSupportedException, system.NullReferenceException, system.NotSupportedException, system.ArgumentOutOfRangeException, system.ArgumentNullException, system.InvalidOperationException, system.ArgumentException, system.ArrayTypeMismatchException, system.security.cryptography.CryptographicException, system.FormatException, system.OutOfMemoryException, system.io.FileNotFoundException, system.RankException, system.diagnostics.tracing.EventSourceException, system.io.FileLoadException, system.globalization.CultureNotFoundException, system.MulticastNotSupportedException, system.MissingMethodException, system.reflection.TargetInvocationException, system.collections.generic.KeyNotFoundException, system.InvalidCastException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("FromMappings", (java.lang.Object)toObjectFromArray(mappings)); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new XmlSerializer(resultingObject)); } XmlSerializer[] resultingArray = new XmlSerializer[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public static XmlSerializer[] FromTypes(NetType[] types) throws Throwable, system.ArgumentOutOfRangeException, system.ArgumentException, system.IndexOutOfRangeException, system.PlatformNotSupportedException, system.ArgumentNullException, system.InvalidOperationException, system.NotSupportedException, system.io.FileNotFoundException, system.diagnostics.tracing.EventSourceException, system.io.FileLoadException, system.globalization.CultureNotFoundException, system.collections.generic.KeyNotFoundException { if (classType == null) throw new UnsupportedOperationException("classType is null."); try { ArrayList resultingArrayList = new ArrayList(); JCObject resultingObjects = (JCObject)classType.Invoke("FromTypes", (java.lang.Object)toObjectFromArray(types)); for (java.lang.Object resultingObject : resultingObjects) { resultingArrayList.add(new XmlSerializer(resultingObject)); } XmlSerializer[] resultingArray = new XmlSerializer[resultingArrayList.size()]; resultingArray = resultingArrayList.toArray(resultingArray); return resultingArray; } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(Stream stream, NetObject o, XmlSerializerNamespaces namespaces) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.PlatformNotSupportedException, system.NullReferenceException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.FormatException, system.diagnostics.UnreachableException, system.InvalidOperationException, system.OutOfMemoryException, system.ArrayTypeMismatchException, system.RankException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", stream == null ? null : stream.getJCOInstance(), o == null ? null : o.getJCOInstance(), namespaces == null ? null : namespaces.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(Stream stream, NetObject o) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.NullReferenceException, system.NotSupportedException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.ArrayTypeMismatchException, system.InvalidOperationException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", stream == null ? null : stream.getJCOInstance(), o == null ? null : o.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(TextWriter textWriter, NetObject o, XmlSerializerNamespaces namespaces) throws Throwable, system.NotSupportedException, system.ArgumentException, system.ArgumentNullException, system.diagnostics.UnreachableException, system.PlatformNotSupportedException, system.InvalidOperationException, system.OutOfMemoryException, system.ArgumentOutOfRangeException, system.IndexOutOfRangeException, system.RankException, system.ArrayTypeMismatchException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", textWriter == null ? null : textWriter.getJCOInstance(), o == null ? null : o.getJCOInstance(), namespaces == null ? null : namespaces.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(TextWriter textWriter, NetObject o) throws Throwable, system.ArgumentNullException, system.PlatformNotSupportedException, system.ArgumentException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.InvalidOperationException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.NotSupportedException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", textWriter == null ? null : textWriter.getJCOInstance(), o == null ? null : o.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(XmlWriter xmlWriter, NetObject o, XmlSerializerNamespaces namespaces, java.lang.String encodingStyle, java.lang.String id) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.NotSupportedException, system.globalization.CultureNotFoundException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.OutOfMemoryException, system.FormatException, system.OverflowException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", xmlWriter == null ? null : xmlWriter.getJCOInstance(), o == null ? null : o.getJCOInstance(), namespaces == null ? null : namespaces.getJCOInstance(), encodingStyle, id); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(XmlWriter xmlWriter, NetObject o, XmlSerializerNamespaces namespaces, java.lang.String encodingStyle) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.NotSupportedException, system.InvalidOperationException, system.ObjectDisposedException, system.OutOfMemoryException, system.FormatException, system.OverflowException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", xmlWriter == null ? null : xmlWriter.getJCOInstance(), o == null ? null : o.getJCOInstance(), namespaces == null ? null : namespaces.getJCOInstance(), encodingStyle); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(XmlWriter xmlWriter, NetObject o, XmlSerializerNamespaces namespaces) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ArgumentOutOfRangeException, system.globalization.CultureNotFoundException, system.InvalidOperationException, system.NotSupportedException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", xmlWriter == null ? null : xmlWriter.getJCOInstance(), o == null ? null : o.getJCOInstance(), namespaces == null ? null : namespaces.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void Serialize(XmlWriter xmlWriter, NetObject o) throws Throwable, system.ArgumentNullException, system.ArgumentException, system.PlatformNotSupportedException, system.ObjectDisposedException, system.InvalidOperationException, system.IndexOutOfRangeException, system.ArgumentOutOfRangeException, system.FormatException, system.NotSupportedException, system.RankException, system.ArrayTypeMismatchException, system.NotImplementedException, system.collections.generic.KeyNotFoundException, system.MissingMethodException, system.reflection.TargetInvocationException { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.Invoke("Serialize", xmlWriter == null ? null : xmlWriter.getJCOInstance(), o == null ? null : o.getJCOInstance()); } catch (JCNativeException jcne) { throw translateException(jcne); } } // Properties section // Instance Events section public void addUnreferencedObject(UnreferencedObjectEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("UnreferencedObject", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeUnreferencedObject(UnreferencedObjectEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("UnreferencedObject", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addUnknownAttribute(XmlAttributeEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("UnknownAttribute", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeUnknownAttribute(XmlAttributeEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("UnknownAttribute", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addUnknownElement(XmlElementEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("UnknownElement", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeUnknownElement(XmlElementEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("UnknownElement", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void addUnknownNode(XmlNodeEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.RegisterEventListener("UnknownNode", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } public void removeUnknownNode(XmlNodeEventHandler handler) throws Throwable { if (classInstance == null) throw new UnsupportedOperationException("classInstance is null."); try { classInstance.UnregisterEventListener("UnknownNode", handler); } catch (JCNativeException jcne) { throw translateException(jcne); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy