-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplifies AddPackage repeatable annotation
- Loading branch information
1 parent
522b830
commit 600ba8b
Showing
6 changed files
with
41 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package test.integration.extension; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Repeatable; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(AddPackages.class) | ||
public @interface AddPackage { | ||
|
||
/** | ||
* Fully qualified package name to be automatically added, Can be used interchangeable with {@link #containing()}. Does take precedence. | ||
*/ | ||
String value() default ""; | ||
|
||
/** | ||
* Class defining a root package. Can be used interchangeable with {@link #value()}. Does not take precedence | ||
*/ | ||
Class<?> containing() default AddPackage.class; | ||
|
||
/** | ||
* Indicates if sub-packages should also be added | ||
*/ | ||
boolean recursive() default true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,14 @@ | ||
package test.integration.extension; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Repeatable; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target(ElementType.TYPE) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@Repeatable(AddPackagesGroup.class) | ||
public @interface AddPackages { | ||
|
||
/** | ||
* List of packages to be automatically added, Can be used interchangeable with {@link #containing()}. Does take precedence. | ||
*/ | ||
String[] value() default ""; | ||
AddPackage[] value(); | ||
|
||
/** | ||
* Class defining a root package. Can be used interchangeable with {@link #value()}. Does not take precedence | ||
*/ | ||
Class<?>[] containing() default AddPackages.class; | ||
|
||
/** | ||
* Indicates if sub-packages should also be added | ||
*/ | ||
boolean recursive() default true; | ||
} |
13 changes: 0 additions & 13 deletions
13
src/test/java/test/integration/extension/AddPackagesGroup.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters