Class Scope<BeanT,​PropT,​ItemT,​PackT>


  • public final class Scope<BeanT,​PropT,​ItemT,​PackT>
    extends java.lang.Object
    Holds the information about packing scope.

    When no packing is started yet, all the fields should be set to null.

    Author:
    Kohsuke Kawaguchi
    • Method Detail

      • hasStarted

        public boolean hasStarted()
        Returns true if this scope object is filled by a packing in progress.
      • reset

        public void reset()
        Initializes all the fields to null.
      • start

        public void start​(Accessor<BeanT,​PropT> acc,
                          Lister<BeanT,​PropT,​ItemT,​PackT> lister)
                   throws org.xml.sax.SAXException
        Starts the packing scope, without adding any item. This allows us to return an empty pack, thereby allowing the user to distinguish empty array vs null array.
        Throws:
        org.xml.sax.SAXException