Class AbstractBuilder<O>

    • Constructor Detail

      • AbstractBuilder

        public AbstractBuilder()
    • Method Detail

      • build

        public final O build()
                      throws Exception
        Description copied from interface: Builder
        Builds the object and returns it or null.
        Specified by:
        build in interface Builder<O>
        Returns:
        the Object to be built or null if the implementation allows it.
        Throws:
        Exception - if an error occurred when building the Object
      • getObject

        public final O getObject()
        Gets the object that was built. If it has not been started to build yet an Exception is thrown.
        Returns:
        the Object that was built
      • doBuild

        protected abstract O doBuild()
                              throws Exception
        Subclasses should implement this to perform the build.
        Returns:
        the object that should be returned by build().
        Throws:
        Exception - if an error occurs