| 1 | /* |
| 2 | * Copyright 2015-2024 the original author or authors. |
| 3 | * |
| 4 | * All rights reserved. This program and the accompanying materials are |
| 5 | * made available under the terms of the Eclipse Public License v2.0 which |
| 6 | * accompanies this distribution and is available at |
| 7 | * |
| 8 | * https://www.eclipse.org/legal/epl-v20.html |
| 9 | */ |
| 10 | |
| 11 | package org.junit.jupiter.api.parallel; |
| 12 | |
| 13 | import static org.apiguardian.api.API.Status.STABLE; |
| 14 | |
| 15 | import java.lang.annotation.ElementType; |
| 16 | import java.lang.annotation.Inherited; |
| 17 | import java.lang.annotation.Retention; |
| 18 | import java.lang.annotation.RetentionPolicy; |
| 19 | import java.lang.annotation.Target; |
| 20 | |
| 21 | import org.apiguardian.api.API; |
| 22 | |
| 23 | /** |
| 24 | * {@code @ResourceLocks} is a container for one or more |
| 25 | * {@link ResourceLock @ResourceLock} declarations. |
| 26 | * |
| 27 | * <p>Note, however, that use of the {@code @ResourceLocks} container is |
| 28 | * completely optional since {@code @ResourceLock} is a |
| 29 | * {@linkplain java.lang.annotation.Repeatable repeatable} annotation. |
| 30 | * |
| 31 | * <p>Since JUnit Jupiter 5.4, this annotation is {@linkplain Inherited inherited} |
| 32 | * within class hierarchies. |
| 33 | * |
| 34 | * @see ResourceLock |
| 35 | * @since 5.3 |
| 36 | */ |
| 37 | @API(status = STABLE, since = "5.10") |
| 38 | @Retention(RetentionPolicy.RUNTIME) |
| 39 | @Target({ ElementType.TYPE, ElementType.METHOD }) |
| 40 | @Inherited |
| 41 | public @interface ResourceLocks { |
| 42 | |
| 43 | /** |
| 44 | * An array of one or more {@linkplain ResourceLock @ResourceLock} declarations. |
| 45 | */ |
| 46 | ResourceLock[] value(); |
| 47 | |
| 48 | } |