Package jadex.xml
Class StackElement
- java.lang.Object
-
- jadex.xml.StackElement
-
public class StackElement extends java.lang.Object
A struct to represent an element on the stack while parsing.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
content
The collected content.protected ILocation
location
The location of the start tag.protected java.lang.Object
object
The created object.protected java.util.List<java.lang.String>
parts
Collecting content.protected java.util.Map<java.lang.String,java.lang.String>
rawattrs
The raw attributes.protected IObjectReaderHandler
readerhandler
The reader handler (if any).protected QName
tag
The xml tag.protected TypeInfo
typeinfo
The 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 void
addContent(java.lang.String content)
Add content to the already collected content (if any).boolean
equals(java.lang.Object obj)
Test if two stack elements are equal.java.lang.String
getContent()
Get the content (if any).ILocation
getLocation()
Get the location.java.lang.Object
getObject()
Get the object.java.util.Map<java.lang.String,java.lang.String>
getRawAttributes()
Get the raw attributes.IObjectReaderHandler
getReaderHandler()
Get the current reader handler.QName
getTag()
Get the tag.TypeInfo
getTypeInfo()
Get the typeinfo.int
hashCode()
Get the hash code.void
setObject(java.lang.Object object)
Set the object.java.lang.String
toString()
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:
toString
in classjava.lang.Object
- Returns:
- The string representation.
-
hashCode
public int hashCode()
Get the hash code.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Test if two stack elements are equal.- Overrides:
equals
in classjava.lang.Object
-
getReaderHandler
public IObjectReaderHandler getReaderHandler()
Get the current reader handler.
-
-