/** Suppress an array of accessible objects. */ public static void suppress(AccessibleObject[] accessibleObjects) { if (accessibleObjects == null) { throw new IllegalArgumentException("accessibleObjects cannot be null"); } for (AccessibleObject accessibleObject : accessibleObjects) { if (accessibleObject instanceof Constructor<?>) { SuppressCode.suppressConstructor((Constructor<?>) accessibleObject); } else if (accessibleObject instanceof Field) { SuppressCode.suppressField((Field) accessibleObject); } else if (accessibleObject instanceof Method) { SuppressCode.suppressMethod((Method) accessibleObject); } } }
/** Suppress multiple fields. */ public static void suppress(Field[] fields) { SuppressCode.suppressField(fields); }
/** Suppress a field. */ public static void suppress(Field field) { SuppressCode.suppressField(field); }
/** Suppress multiple constructors. */ public static void suppress(Constructor<?>[] constructors) { SuppressCode.suppressConstructor(constructors); }
/** Suppress multiple methods. This works on both instance methods and static methods. */ public static void suppress(Method[] methods) { SuppressCode.suppressMethod(methods); }
/** Suppress a specific method. This works on both instance methods and static methods. */ public static void suppress(Method method) { SuppressCode.suppressMethod(method); }