Top Fields Constructors Methods
org.apache.xerces.stax.events

public final Class EntityReferenceImpl

extends XMLEventImpl
implements EntityReference
Class Inheritance
All Implemented Interfaces
javax.xml.stream.events.EntityReference, javax.xml.stream.events.XMLEvent, javax.xml.stream.XMLStreamConstants
Imports
java.io.IOException, .Writer, javax.xml.stream.Location, .XMLStreamException, javax.xml.stream.events.EntityDeclaration, .EntityReference

Author
Lucian Holland
Version
$Id: EntityReferenceImpl.java 730471 2008-12-31 20:45:32Z mrglavas $

Field Summary

Modifier and TypeField and Description
private final EntityDeclaration
fDecl

The entity declaration for this entity reference.

private final String
fName

The name of the entity.

Constructor Summary

AccessConstructor and Description
public
EntityReferenceImpl(final EntityDeclaration decl, final Location location)

Constructor.

public
EntityReferenceImpl(final String name, final EntityDeclaration decl, final Location location)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public EntityDeclaration
getDeclaration()

Implements javax.xml.stream.events.EntityReference.getDeclaration.

Return the declaration of this entity.
public String
getName()

Implements javax.xml.stream.events.EntityReference.getName.

The name of the entity
public void
writeAsEncodedUnicode(Writer
The writer that will output the data
writer
)

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
Inherited from org.apache.xerces.stax.events.XMLEventImpl:
asCharactersasEndElementasStartElementgetEventTypegetLocationgetSchemaTypeisAttributeisCharactersisEndDocumentisEndElementisEntityReferenceisNamespaceisProcessingInstructionisStartDocumentisStartElementtoString

Field Detail

fDeclback to summary
private final EntityDeclaration fDecl

The entity declaration for this entity reference.

fNameback to summary
private final String fName

The name of the entity.

Constructor Detail

EntityReferenceImplback to summary
public EntityReferenceImpl(final EntityDeclaration decl, final Location location)

Constructor.

EntityReferenceImplback to summary
public EntityReferenceImpl(final String name, final EntityDeclaration decl, final Location location)

Constructor.

Method Detail

getDeclarationback to summary
public EntityDeclaration getDeclaration()

Implements javax.xml.stream.events.EntityReference.getDeclaration.

Doc from javax.xml.stream.events.EntityReference.getDeclaration.

Return the declaration of this entity.

Returns:EntityDeclaration

the declaration

See Also
javax.xml.stream.events.EntityReference#getDeclaration()
getNameback to summary
public String getName()

Implements javax.xml.stream.events.EntityReference.getName.

Doc from javax.xml.stream.events.EntityReference.getName.

The name of the entity

Returns:String

the entity's name, may not be null

See Also
javax.xml.stream.events.EntityReference#getName()
writeAsEncodedUnicodeback to summary
public void writeAsEncodedUnicode(Writer writer) throws XMLStreamException

Implements javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

Doc from javax.xml.stream.events.XMLEvent.writeAsEncodedUnicode.

This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters. No indentation or whitespace should be outputted. Any user defined event type SHALL have this method called when being written to on an output stream. Built in Event types MUST implement this method, but implementations MAY choose not call these methods for optimizations reasons when writing out built in Events to an output stream. The output generated MUST be equivalent in terms of the infoset expressed.

Parameters
writer:Writer

The writer that will output the data

Exceptions
XMLStreamException:
if there is a fatal error writing the event