Table of Contents

Class XMLReaderAdapter

Namespace
Org.Xml.Sax.Helpers
Assembly
MASES.JNet.dll
public class XMLReaderAdapter : JVMBridgeListener, IDynamicMetaObjectProvider, IJVMBridgeCore, IEquatable<IJVMBridgeBase>, IDisposable, IJVMBridgeBaseStatic, IJVMBridgeBase, IJVMBridgeDefinition
Inheritance
XMLReaderAdapter
Implements
Derived
Inherited Members
JVMBridgeListener.ListenerShallManageEventIndex
JVMBridgeListener.ListenerShallManageEventName
JVMBridgeListener.ListenerShallManageEventIndexWithData
JVMBridgeListener.ListenerShallManageEventNameWithData
JVMBridgeBase<JVMBridgeListener>.IsAssignableFrom(IJavaType)
JVMBridgeBase<JVMBridgeListener>.IsAssignableFrom<T>()
JVMBridgeBase<JVMBridgeListener>.Execute<T>(params T[])
JVMBridgeBase<JVMBridgeListener>.DynBridgeClazz
JVMBridgeBase<JVMBridgeListener>.BridgeClazz
JVMBridgeBase.ReferenceEqualsJVM(IJVMBridgeBase, IJVMBridgeBase)
JVMBridgeBase.RuntimeClassNameOf<T>()
JVMBridgeBase.ClassNameOf<T>()
JVMBridgeBase.ClassOf<T>()
JVMBridgeBase.WrapsDirect<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn>(IJavaObject)
JVMBridgeBase.Wraps<TNewClass, TReturn, TConverter>(IJavaObject)
JVMBridgeBase.MonitorEnter()
JVMBridgeBase.MonitorExit()
JVMBridgeBase.IsInstanceOf(IJavaType)
JVMBridgeBase.IsInstanceOf<T>()
JVMBridgeBase.RuntimeIsInstanceOf<T>()
JVMBridgeBase.CastTo<TNewClass>()
JVMBridgeBase.CastToAndDetach<TNewClass>()
JVMBridgeBase.CastDirect<TNewClass>()
JVMBridgeBase.CastDirectAndDetach<TNewClass>()
JVMBridgeBase.CheckDisposed()
JVMBridgeBase.ToString()
JVMBridgeBase.Equals(IJVMBridgeBase)
JVMBridgeBase.GetHashCode()
JVMBridgeBase.Notify()
JVMBridgeBase.NotifyAll()
JVMBridgeBase.Wait()
JVMBridgeBase.DynBridgeInstance
JVMBridgeBase.BridgeInstance
JVMBridgeBase.IsBridgeInterface
JVMBridgeBase.IsBridgeAbstract
Extension Methods

Constructors

XMLReaderAdapter()

public XMLReaderAdapter()

Exceptions

SAXException

XMLReaderAdapter(IJVMBridgeBaseInitializer)

Initializer used internally by JCOBridge. Do not use directly.

[Obsolete("This public initializer is needed for JCOBridge internal use, other uses can produce unidentible behaviors.")]
public XMLReaderAdapter(IJVMBridgeBaseInitializer initializer)

Parameters

initializer IJVMBridgeBaseInitializer

XMLReaderAdapter(XMLReader)

public XMLReaderAdapter(XMLReader arg0)

Parameters

arg0 XMLReader

XMLReader

XMLReaderAdapter(params object[])

Generic constructor used by JCOBridge when a derived class needs to forward arguments to the base JVMBridgeBase class.

public XMLReaderAdapter(params object[] args)

Parameters

args object[]

Properties

BridgeClassName

Java class name to be instantiated

public override string BridgeClassName { get; }

Property Value

string

OnCharacters

public Action<char[], int, int> OnCharacters { get; set; }

Property Value

Action<char[], int, int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnEndDocument

public Action OnEndDocument { get; set; }

Property Value

Action

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnEndElement

public Action<String, String, String> OnEndElement { get; set; }

Property Value

Action<String, String, String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnEndPrefixMapping

public Action<String> OnEndPrefixMapping { get; set; }

Property Value

Action<String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnIgnorableWhitespace

public Action<char[], int, int> OnIgnorableWhitespace { get; set; }

Property Value

Action<char[], int, int>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnParse

public Action<String> OnParse { get; set; }

Property Value

Action<String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnParse1

public Action<InputSource> OnParse1 { get; set; }

Property Value

Action<InputSource>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnProcessingInstruction

public Action<String, String> OnProcessingInstruction { get; set; }

Property Value

Action<String, String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetDTDHandler

public Action<DTDHandler> OnSetDTDHandler { get; set; }

Property Value

Action<DTDHandler>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetDocumentHandler

public Action<DocumentHandler> OnSetDocumentHandler { get; set; }

Property Value

Action<DocumentHandler>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetDocumentLocator

public Action<Locator> OnSetDocumentLocator { get; set; }

Property Value

Action<Locator>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetEntityResolver

public Action<EntityResolver> OnSetEntityResolver { get; set; }

Property Value

Action<EntityResolver>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetErrorHandler

public Action<ErrorHandler> OnSetErrorHandler { get; set; }

Property Value

Action<ErrorHandler>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSetLocale

public Action<Locale> OnSetLocale { get; set; }

Property Value

Action<Locale>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnSkippedEntity

public Action<String> OnSkippedEntity { get; set; }

Property Value

Action<String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnStartDocument

public Action OnStartDocument { get; set; }

Property Value

Action

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnStartElement

public Action<String, String, String, Attributes> OnStartElement { get; set; }

Property Value

Action<String, String, String, Attributes>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

OnStartPrefixMapping

public Action<String, String> OnStartPrefixMapping { get; set; }

Property Value

Action<String, String>

Remarks

Assign a delegate to handle the event without subclassing. If both this handler and a virtual method override are present, the delegate takes precedence. Set to null to delegate to the virtual method.

Methods

Characters(char[], int, int)

public virtual void Characters(char[] arg0, int arg1, int arg2)

Parameters

arg0 char[]

char

arg1 int

int

arg2 int

int

Exceptions

SAXException

EndDocument()

public virtual void EndDocument()

Exceptions

SAXException

EndElement(String, String, String)

public virtual void EndElement(String arg0, String arg1, String arg2)

Parameters

arg0 String

String

arg1 String

String

arg2 String

String

Exceptions

SAXException

EndPrefixMapping(String)

public virtual void EndPrefixMapping(String arg0)

Parameters

arg0 String

String

IgnorableWhitespace(char[], int, int)

public virtual void IgnorableWhitespace(char[] arg0, int arg1, int arg2)

Parameters

arg0 char[]

char

arg1 int

int

arg2 int

int

Exceptions

SAXException

InitializeHandlers(Type)

Handlers initializer for XMLReaderAdapter

protected virtual void InitializeHandlers(Type listenerRuntimeType)

Parameters

listenerRuntimeType Type

ListenerShallManageEvent(int)

Invoked from the JVMBridgeListener on each received event to notify the user which can decide to abort the execution for the specific event returning false

protected override bool ListenerShallManageEvent(int eventIndex)

Parameters

eventIndex int

The index of the event triggered as returned from AddEventHandler(string, EventHandler) or AddEventHandler<TDataClass>(string, EventHandler<CLRListenerEventArgs<TDataClass>>)

Returns

bool

Returns true to continue event evaluation, false to return the control to the JVM

Remarks

By default every event continues the execution and reads the data from JVM; this implies an extra cost which can be limited using ListenerShallManageEvent(int) or the MASES.JCOBridge.C2JBridge.JVMBridgeListener.ListenerShallManageEventIndex/MASES.JCOBridge.C2JBridge.JVMBridgeListener.ListenerShallManageEventName handlers. Returning false the control is immediately returned to the JVM, anyway the user has received the notification. It can be useful in scenarios where the user is interested in few events and the other are simply discarded to optimize the execution speed. By default, this function invokes MASES.JCOBridge.C2JBridge.JVMBridgeListener.ListenerShallManageEventIndex, then try MASES.JCOBridge.C2JBridge.JVMBridgeListener.ListenerShallManageEventName if they are set or return true

ListenerShallManageEventHandlers(int)

protected virtual bool ListenerShallManageEventHandlers(int eventIndex)

Parameters

eventIndex int

Returns

bool

Parse(String)

public virtual void Parse(String arg0)

Parameters

arg0 String

String

Exceptions

IOException
SAXException

Parse(InputSource)

public virtual void Parse(InputSource arg0)

Parameters

arg0 InputSource

InputSource

Exceptions

IOException
SAXException

ProcessingInstruction(String, String)

public virtual void ProcessingInstruction(String arg0, String arg1)

Parameters

arg0 String

String

arg1 String

String

Exceptions

SAXException

SetDTDHandler(DTDHandler)

public virtual void SetDTDHandler(DTDHandler arg0)

Parameters

arg0 DTDHandler

DTDHandler

SetDocumentHandler(DocumentHandler)

public virtual void SetDocumentHandler(DocumentHandler arg0)

Parameters

arg0 DocumentHandler

DocumentHandler

SetDocumentLocator(Locator)

public virtual void SetDocumentLocator(Locator arg0)

Parameters

arg0 Locator

Locator

SetEntityResolver(EntityResolver)

public virtual void SetEntityResolver(EntityResolver arg0)

Parameters

arg0 EntityResolver

EntityResolver

SetErrorHandler(ErrorHandler)

public virtual void SetErrorHandler(ErrorHandler arg0)

Parameters

arg0 ErrorHandler

ErrorHandler

SetLocale(Locale)

public virtual void SetLocale(Locale arg0)

Parameters

arg0 Locale

Locale

Exceptions

SAXException

SkippedEntity(String)

public virtual void SkippedEntity(String arg0)

Parameters

arg0 String

String

Exceptions

SAXException

StartDocument()

public virtual void StartDocument()

Exceptions

SAXException

StartElement(String, String, String, Attributes)

public virtual void StartElement(String arg0, String arg1, String arg2, Attributes arg3)

Parameters

arg0 String

String

arg1 String

String

arg2 String

String

arg3 Attributes

Attributes

Exceptions

SAXException

StartPrefixMapping(String, String)

public virtual void StartPrefixMapping(String arg0, String arg1)

Parameters

arg0 String

String

arg1 String

String