Class XBTTree

  • All Implemented Interfaces:
    java.io.Serializable, org.exbin.xbup.core.ubnumber.UBStreamable
    Direct Known Subclasses:
    XBTTreeDocument

    @ParametersAreNonnullByDefault
    public class XBTTree
    extends java.lang.Object
    implements org.exbin.xbup.core.ubnumber.UBStreamable
    XBUP level 1 object model parser tree.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.exbin.xbup.core.block.declaration.XBContext rootContext  
    • Constructor Summary

      Constructors 
      Constructor Description
      XBTTree​(org.exbin.xbup.core.catalog.XBCatalog catalog)  
      XBTTree​(org.exbin.xbup.core.catalog.XBCatalog catalog, org.exbin.xbup.core.block.declaration.XBContext rootContext)  
    • Field Detail

      • rootContext

        @Nullable
        protected org.exbin.xbup.core.block.declaration.XBContext rootContext
    • Constructor Detail

      • XBTTree

        public XBTTree​(org.exbin.xbup.core.catalog.XBCatalog catalog)
      • XBTTree

        public XBTTree​(@Nullable
                       org.exbin.xbup.core.catalog.XBCatalog catalog,
                       @Nullable
                       org.exbin.xbup.core.block.declaration.XBContext rootContext)
    • Method Detail

      • fromStreamUB

        public int fromStreamUB​(java.io.InputStream stream)
                         throws java.io.IOException,
                                org.exbin.xbup.core.parser.XBProcessingException
        Specified by:
        fromStreamUB in interface org.exbin.xbup.core.ubnumber.UBStreamable
        Throws:
        java.io.IOException
        org.exbin.xbup.core.parser.XBProcessingException
      • setCatalog

        public void setCatalog​(@Nullable
                               org.exbin.xbup.core.catalog.XBCatalog catalog)
      • processSpec

        public void processSpec()
      • clear

        public void clear()
      • toStreamUB

        public int toStreamUB​(java.io.OutputStream stream)
                       throws java.io.IOException
        Specified by:
        toStreamUB in interface org.exbin.xbup.core.ubnumber.UBStreamable
        Throws:
        java.io.IOException
      • getSizeUB

        public int getSizeUB()
        Specified by:
        getSizeUB in interface org.exbin.xbup.core.ubnumber.UBStreamable
      • findNodeByIndex

        @Nonnull
        public java.util.Optional<org.exbin.xbup.core.block.XBTBlock> findNodeByIndex​(long index)
      • getRootBlock

        @Nonnull
        public java.util.Optional<org.exbin.xbup.core.block.XBTBlock> getRootBlock()
      • setRoot

        public void setRoot​(@Nullable
                            XBTTreeNode rootNode)
      • getRootContext

        @Nullable
        public org.exbin.xbup.core.block.declaration.XBContext getRootContext()
      • setRootContext

        public void setRootContext​(@Nullable
                                   org.exbin.xbup.core.block.declaration.XBContext rootContext)
      • getCatalog

        @Nullable
        public org.exbin.xbup.core.catalog.XBCatalog getCatalog()