This method gets the singleton instance of {@link DurationUtil}. <br>
<b>ATTENTION:</b><br>
Please prefer dependency-injection instead of using this method.

@return the singleton instance.
161052
public static DurationUtil getInstance() {

    if (instance == null) {
      synchronized (DurationUtilImpl.class) {
        if (instance == null) {
          instance = new DurationUtilImpl();
        }
      }
    }
    return instance;
  }
576302
public static StaxUtil getInstance() {

    if (instance == null) {
      synchronized (StaxUtilImpl.class) {
        if (instance == null) {
          StaxUtilImpl util = new StaxUtilImpl();
          util.initialize();
          instance = util;
        }
      }
    }
    return instance;
  }
1327528
public static RecurrenceUtil getInstance() {

    if (instance == null) {
      synchronized (RecurrenceUtilImpl.class) {
        if (instance == null) {
          RecurrenceUtilImpl impl = new RecurrenceUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
890159
public static PojoUtil getInstance() {

    if (instance == null) {
      PojoUtilImpl impl = null;
      synchronized (PojoUtilImpl.class) {
        if (instance == null) {
          impl = new PojoUtilImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
786181
public static ClassDescriptorCache getInstance() {
    if (INSTANCE == null) {
      synchronized (ClassDescriptorCache.class) {
        if (INSTANCE == null) {
          INSTANCE = new ClassDescriptorCache();
        }
      }
    }
    return INSTANCE;
  }
517951
public static JavaClassIgnoreResolver singletonInstance()
    {
        if (defaultInstance == null)
        {
            TrieStructureTypeRelation<String,String> relation = new TrieStructureTypeRelation<String,String>() {

                @Override public String getStringToSearchFromSearchType(String search)
                {
                    return search;
                }

                @Override public String getStringPrefixToSaveSaveType(String save)
                {
                    /**
                     * At least for now javaclass-ignore does not contain anything except the prefix
                     */
                    return save;
                }

                @Override public boolean checkIfMatchFound(String saved, String searched)
                {
                    return searched.startsWith(saved);
                }
            };
            defaultInstance = new JavaClassIgnoreResolver(relation);
        }
        return defaultInstance;
    }
382505
public static Iso8601UtilImpl getInstance() {

    if (instance == null) {
      synchronized (Iso8601UtilImpl.class) {
        if (instance == null) {
          instance = new Iso8601UtilImpl();
        }
      }
    }
    return instance;
  }
901331
public static Iso8601UtilLimited getInstance() {

    if (instance == null) {
      synchronized (Iso8601UtilLimitedImpl.class) {
        if (instance == null) {
          instance = new Iso8601UtilLimitedImpl();
        }
      }
    }
    return instance;
  }
614506
public static TimeSource getInstance(String className) {
        try {
            Class<?> c = Class.forName(className);
            Method m = c.getMethod("getInstance");
            return (TimeSource) m.invoke(null);
        } catch (Exception e) {
            throw new RuntimeException("Error getting TimeSource instance for class \"" + className + "\"", e);
        }
    }
260046
public static JaxRx getInstance(final String impl) {
        final String path = Systems.getSystems().get(impl);
        if (path == null) {
            throw new JaxRxException(404, "Unknown implementation: " + impl);
        }

        JaxRx jaxrx = INSTANCES.get(path);
        if (jaxrx == null) {
            try {
                jaxrx = (JaxRx)Class.forName(path).newInstance();
                INSTANCES.put(path, jaxrx);
            } catch (final Exception ex) {
                throw new JaxRxException(ex);
            }
        }
        return jaxrx;
    }
627286
public static UnicodeUtil getInstance() {

    if (instance == null) {
      synchronized (UnicodeUtilImpl.class) {
        if (instance == null) {
          new UnicodeUtilImpl().initialize();
        }
      }
    }
    return instance;
  }
260979
public static <T> T getInstance(Class<T> beanClass) {
		return (T) getInstanceProvider().getInstance(beanClass);
	}
695395
protected T createInstance() {
        try {
            Constructor<T> ctor = clazz.getDeclaredConstructor();
            ctor.setAccessible(true);
            return ctor.newInstance();
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        } catch (SecurityException e) {
            throw new RuntimeException(e);
        } catch (NoSuchMethodException e) {
            throw new RuntimeException(e);
        } catch (IllegalArgumentException e) {
            throw new RuntimeException(e);
        } catch (InvocationTargetException e) {
            throw new RuntimeException(e);
        }
    }
17321
public static synchronized UnsupportedDurationField getInstance(DurationFieldType type) {
        UnsupportedDurationField field;
        if (cCache == null) {
            cCache = new HashMap<DurationFieldType, UnsupportedDurationField>(7);
            field = null;
        } else {
            field = cCache.get(type);
        }
        if (field == null) {
            field = new UnsupportedDurationField(type);
            cCache.put(type, field);
        }
        return field;
    }
217316
public static BasicPeriodFormatterService getInstance() {
        if (instance == null) {
            PeriodFormatterDataService ds = ResourceBasedPeriodFormatterDataService
                    .getInstance();
            instance = new BasicPeriodFormatterService(ds);
        }
        return instance;
    }
1324422
public static ExceptionUtil getInstance() {

    if (instance == null) {
      synchronized (ExceptionUtilImpl.class) {
        if (instance == null) {
          instance = new ExceptionUtilImpl();
        }
      }
    }
    return instance;
  }
480161
public B timerWithDuration(String timerDuration) {
    TimeDuration timeDuration = createInstance(TimeDuration.class);
    timeDuration.setTextContent(timerDuration);

    TimerEventDefinition timerEventDefinition = createInstance(TimerEventDefinition.class);
    timerEventDefinition.setTimeDuration(timeDuration);

    element.getEventDefinitions().add(timerEventDefinition);

    return myself;
  }