Package swingtree.api

Interface Buildable<T>

Type Parameters:
T - The type of the object to build.
All Known Implementing Classes:
BasicTableModel.Builder

public interface Buildable<T>
A generic interface for builder objects which is used by the SwingTree API to call the build methods of the builder objects for you and then use the built object as part of a SwingTree UI.
  • Method Summary

    Modifier and Type
    Method
    Description
    Builds the object that this builder is responsible for and returns it.
  • Method Details

    • build

      T build() throws Exception
      Builds the object that this builder is responsible for and returns it. This method is intended to be called by the internals of the SwingTree API.
      Note that this method deliberately requires the handling of checked exceptions at its invocation sites because there may be any number of implementations hiding behind this interface and so it is unwise to assume that all of them will be able to execute gracefully without throwing exceptions.
      Returns:
      The object that this builder is responsible for.
      Throws:
      Exception - If during the execution of this method an error occurs. Due to this being a generic interface, the likelihood of exceptions being thrown is high and so it is recommended to handle them at the invocation site.