|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2012 the original author or authors. |
| 2 | + * Copyright 2002-2013 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
17 | 17 | package org.springframework.test.annotation;
|
18 | 18 |
|
19 | 19 | import java.lang.annotation.Documented;
|
20 |
| -import java.lang.annotation.ElementType; |
21 | 20 | import java.lang.annotation.Retention;
|
22 |
| -import java.lang.annotation.RetentionPolicy; |
23 | 21 | import java.lang.annotation.Target;
|
24 | 22 |
|
| 23 | +import static java.lang.annotation.ElementType.*; |
| 24 | +import static java.lang.annotation.RetentionPolicy.*; |
| 25 | + |
25 | 26 | /**
|
26 |
| - * Test annotation to indicate whether or not the transaction for the annotated |
27 |
| - * test method should be <em>rolled back</em> after the test method has |
28 |
| - * completed. If {@code true}, the transaction will be rolled back; |
| 27 | + * Test annotation used to indicate whether or not the transaction for the |
| 28 | + * annotated test method should be <em>rolled back</em> after the test method |
| 29 | + * has completed. If {@code true}, the transaction will be rolled back; |
29 | 30 | * otherwise, the transaction will be committed.
|
30 | 31 | *
|
31 | 32 | * @author Sam Brannen
|
32 | 33 | * @since 2.5
|
33 | 34 | */
|
34 | 35 | @Documented
|
35 |
| -@Retention(RetentionPolicy.RUNTIME) |
36 |
| -@Target(ElementType.METHOD) |
| 36 | +@Retention(RUNTIME) |
| 37 | +@Target({ METHOD, ANNOTATION_TYPE }) |
37 | 38 | public @interface Rollback {
|
38 | 39 |
|
39 | 40 | /**
|
|
0 commit comments