Package jadex.xml
Class StackElement
- java.lang.Object
-
- jadex.xml.StackElement
-
public class StackElement extends java.lang.ObjectA struct to represent an element on the stack while parsing.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringcontentThe collected content.protected ILocationlocationThe location of the start tag.protected java.lang.ObjectobjectThe created object.protected java.util.List<java.lang.String>partsCollecting content.protected java.util.Map<java.lang.String,java.lang.String>rawattrsThe raw attributes.protected IObjectReaderHandlerreaderhandlerThe reader handler (if any).protected QNametagThe xml tag.protected TypeInfotypeinfoThe type info.
-
Constructor Summary
Constructors Constructor Description StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object)Create a new stack element.StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object, java.util.Map<java.lang.String,java.lang.String> rawattrs)Create a new stack element.StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object, java.util.Map<java.lang.String,java.lang.String> rawattrs, TypeInfo typeinfo, ILocation location)Create a new stack element.StackElement(QName tag, java.lang.Object object)Create a new stack element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContent(java.lang.String content)Add content to the already collected content (if any).booleanequals(java.lang.Object obj)Test if two stack elements are equal.java.lang.StringgetContent()Get the content (if any).ILocationgetLocation()Get the location.java.lang.ObjectgetObject()Get the object.java.util.Map<java.lang.String,java.lang.String>getRawAttributes()Get the raw attributes.IObjectReaderHandlergetReaderHandler()Get the current reader handler.QNamegetTag()Get the tag.TypeInfogetTypeInfo()Get the typeinfo.inthashCode()Get the hash code.voidsetObject(java.lang.Object object)Set the object.java.lang.StringtoString()Get the string representation.
-
-
-
Field Detail
-
readerhandler
protected IObjectReaderHandler readerhandler
The reader handler (if any).
-
tag
protected QName tag
The xml tag.
-
object
protected java.lang.Object object
The created object.
-
content
protected java.lang.String content
The collected content.
-
parts
protected java.util.List<java.lang.String> parts
Collecting content.
-
rawattrs
protected java.util.Map<java.lang.String,java.lang.String> rawattrs
The raw attributes.
-
typeinfo
protected TypeInfo typeinfo
The type info.
-
location
protected ILocation location
The location of the start tag.
-
-
Constructor Detail
-
StackElement
public StackElement(QName tag, java.lang.Object object)
Create a new stack element.
-
StackElement
public StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object)
Create a new stack element.
-
StackElement
public StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object, java.util.Map<java.lang.String,java.lang.String> rawattrs)
Create a new stack element.
-
StackElement
public StackElement(IObjectReaderHandler readerhandler, QName tag, java.lang.Object object, java.util.Map<java.lang.String,java.lang.String> rawattrs, TypeInfo typeinfo, ILocation location)
Create a new stack element.
-
-
Method Detail
-
getTag
public QName getTag()
Get the tag.- Returns:
- The tag.
-
getObject
public java.lang.Object getObject()
Get the object.- Returns:
- The object.
-
setObject
public void setObject(java.lang.Object object)
Set the object.- Parameters:
object- The object to set.
-
getContent
public java.lang.String getContent()
Get the content (if any).- Returns:
- The content or null for empty elements.
-
getRawAttributes
public java.util.Map<java.lang.String,java.lang.String> getRawAttributes()
Get the raw attributes.- Returns:
- The raw attributes.
-
getTypeInfo
public TypeInfo getTypeInfo()
Get the typeinfo.- Returns:
- The typeinfo.
-
getLocation
public ILocation getLocation()
Get the location.- Returns:
- The location.
-
addContent
public void addContent(java.lang.String content)
Add content to the already collected content (if any).- Parameters:
content- The content to add.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- The string representation.
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if two stack elements are equal.- Overrides:
equalsin classjava.lang.Object
-
getReaderHandler
public IObjectReaderHandler getReaderHandler()
Get the current reader handler.
-
-