Package com.fasterxml.aalto.out
Class WName
- java.lang.Object
-
- com.fasterxml.aalto.out.WName
-
public abstract class WName extends java.lang.ObjectThis class is similar toPName, in that it implements an efficient representation of prefixed names, but one used on output (Writer) side.Note: unlike with Reader-side prefixed names, here we can not assume that components are
intern()ed.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String_localNameprotected java.lang.String_prefix
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract intappendBytes(byte[] buffer, int offset)abstract intappendChars(char[] buffer, int offset)booleanequals(java.lang.Object o)java.lang.StringgetLocalName()java.lang.StringgetPrefix()java.lang.StringgetPrefixedName()inthashCode()Whether we should use internal hash, or the hash of prefixed name string itself is an open question.booleanhasName(java.lang.String localName)booleanhasName(java.lang.String prefix, java.lang.String localName)booleanhasPrefix()abstract intserializedLength()java.lang.StringtoString()abstract voidwriteBytes(java.io.OutputStream out)abstract voidwriteChars(java.io.Writer w)
-
-
-
Method Detail
-
serializedLength
public abstract int serializedLength()
- Returns:
- Length of full (qualified) name, in native serialization units (bytes or characters)
-
getPrefix
public final java.lang.String getPrefix()
-
getPrefixedName
public final java.lang.String getPrefixedName()
-
getLocalName
public final java.lang.String getLocalName()
-
hasPrefix
public final boolean hasPrefix()
-
appendBytes
public abstract int appendBytes(byte[] buffer, int offset)
-
writeBytes
public abstract void writeBytes(java.io.OutputStream out) throws java.io.IOException- Throws:
java.io.IOException
-
appendChars
public abstract int appendChars(char[] buffer, int offset)
-
writeChars
public abstract void writeChars(java.io.Writer w) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
Whether we should use internal hash, or the hash of prefixed name string itself is an open question. For now, let's use former.- Overrides:
hashCodein classjava.lang.Object
-
hasName
public final boolean hasName(java.lang.String localName)
-
hasName
public final boolean hasName(java.lang.String prefix, java.lang.String localName)
-
-