-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce StashNotifierDefault annotation
Simplifies HttpNotifierSelector implementations by allowing authors to easily inject the plugin's default to fall back to.
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
src/main/java/org/jenkinsci/plugins/stashNotifier/StashNotifierDefault.java
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,20 @@ | ||
package org.jenkinsci.plugins.stashNotifier; | ||
|
||
import javax.inject.Qualifier; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.FIELD; | ||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.PARAMETER; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
/** | ||
* Use this annotation to inject the default value of | ||
* {@link HttpNotifierSelector} or {@link HttpNotifier}. | ||
*/ | ||
@Qualifier | ||
@Target({ FIELD, PARAMETER, METHOD }) | ||
@Retention(RUNTIME) | ||
public @interface StashNotifierDefault { | ||
} |
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