Package jadex.xml

Class StackElement


  • public class StackElement
    extends java.lang.Object
    A struct to represent an element on the stack while parsing.
    • Field Detail

      • 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 class java.lang.Object
        Returns:
        The string representation.
      • hashCode

        public int hashCode()
        Get the hash code.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Test if two stack elements are equal.
        Overrides:
        equals in class java.lang.Object