Class BambooPluginUtils


  • public class BambooPluginUtils
    extends Object
    • Method Detail

      • callUnsafeCode

        @Nullable
        public static <T> T callUnsafeCode​(BambooPluginUtils.Callable<T> callable)
        Calls call() method on the supplied callable. RuntimeExceptions are logged and swallowed.
        Type Parameters:
        T -
        Parameters:
        callable - a callable wrapping unsafe plugin calls
        Returns:
      • instantiateModule

        public static <T> T instantiateModule​(com.atlassian.plugin.ModuleDescriptor<T> md)
      • getModuleDescriptorNameOrdering

        @NotNull
        public static @NotNull com.google.common.collect.Ordering<com.atlassian.plugin.ModuleDescriptor<?>> getModuleDescriptorNameOrdering()
      • prepareSubModuleConfiguration

        public static String prepareSubModuleConfiguration​(org.dom4j.Element element,
                                                           io.atlassian.util.concurrent.ResettableLazyReference<?> reference,
                                                           String elementName,
                                                           String key,
                                                           String name,
                                                           String pluginKey)
        Prepares a sub-module by finding its class name and resetting its existing ResettableLazyReference
        Parameters:
        element - sub-element name
        reference - of the sub-module
        elementName - of the sub-module
        key -
        name -
        pluginKey -
        Returns:
        className
      • callChangedApi

        public static <V> V callChangedApi​(Callable<V> newMethod,
                                           Callable<V> oldMethod)