public static StaxUtil getInstance() {

    if (instance == null) {
      synchronized (StaxUtilImpl.class) {
        if (instance == null) {
          StaxUtilImpl util = new StaxUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
public static StaxUtil getInstance ( ) { if ( instance == null ) { synchronized ( StaxUtilImpl . class ) { if ( instance == null ) { StaxUtilImpl util = new StaxUtilImpl ( ) ; util . initialize ( ) ; instance = util ; } } } return instance ; }
This method gets the singleton instance of this {@link StaxUtilImpl}. <br>
<b>ATTENTION:</b><br>
Please prefer dependency-injection instead of using this method.

@return the singleton instance.