public class BackwardsCompatibilityUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
BackwardsCompatibilityUtils.BackwardsCompatibilityException |
Modifier and Type | Field and Description |
---|---|
static int |
BUILD_NUMBER_CONFLUENCE_7_20 |
Constructor and Description |
---|
BackwardsCompatibilityUtils() |
Modifier and Type | Method and Description |
---|---|
static Method |
findMethod(Class clazz,
String name,
Object[] arguments) |
static <T> Constructor<T> |
getConstructor(Class<T> clazz,
Class<?>... constructorArgTypes) |
static String |
getContextPath(Object object)
Extracts the context path from the service provided as a parameter.
|
static <T> T |
getEnumValueOf(Class<T> enumeration,
Object wantedValue)
Returns the enumeration value, and if its not found it returns null.
|
static <T> T |
invoke(Object serviceClass,
String methodName,
Supplier<T> defaultValueSupplier,
Object... arguments)
Invokes a method on a class.
|
static <T> T |
invoke(Object serviceClass,
String methodName,
T defaultValue)
Invokes a method on a class.
|
static <T> T |
invokeConstructor(Class<T> clazz,
Object... arguments)
Invokes a constructor.
|
static <T> T |
invokeStaticMethod(String classCanonicalName,
String methodName,
Object... arguments)
Invokes a static method on a class.
|
static boolean |
isConfluenceVersionAbove(int buildNumber) |
private static boolean |
isMatching(Object[] arguments,
Class<?>[] methodArgTypes) |
static Integer |
valueOf(String value) |
public static final int BUILD_NUMBER_CONFLUENCE_7_20
public static <T> T invoke(Object serviceClass, String methodName, T defaultValue)
public static <T> T invoke(Object serviceClass, String methodName, Supplier<T> defaultValueSupplier, Object... arguments)
public static <T> T invokeStaticMethod(String classCanonicalName, String methodName, Object... arguments)
public static <T> T invokeConstructor(Class<T> clazz, Object... arguments)
public static <T> Constructor<T> getConstructor(Class<T> clazz, Class<?>... constructorArgTypes)
public static <T> T getEnumValueOf(Class<T> enumeration, Object wantedValue)
public static String getContextPath(Object object)
public static boolean isConfluenceVersionAbove(int buildNumber)
Copyright © 2022 Requirement Yogi. All rights reserved.