-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add more tests for InvocationContext.getInterceptorBindings()
- interceptor binding inherited from a superclass - method-level interceptor binding "overriding" a class-level interceptor binding of the same type
- Loading branch information
Showing
5 changed files
with
68 additions
and
4 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
.../main/java/org/jboss/cdi/tck/interceptors/tests/contract/invocationContext/Binding16.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,34 @@ | ||
package org.jboss.cdi.tck.interceptors.tests.contract.invocationContext; | ||
|
||
import jakarta.enterprise.util.AnnotationLiteral; | ||
import jakarta.enterprise.util.Nonbinding; | ||
import jakarta.interceptor.InterceptorBinding; | ||
|
||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
@InterceptorBinding | ||
@Inherited | ||
@Target({ TYPE, METHOD }) | ||
@Retention(RUNTIME) | ||
public @interface Binding16 { | ||
String value(); | ||
|
||
class Literal extends AnnotationLiteral<Binding16> implements Binding16 { | ||
private final String value; | ||
|
||
public Literal(String value) { | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public String value() { | ||
return value; | ||
} | ||
} | ||
} |
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
20 changes: 20 additions & 0 deletions
20
...in/java/org/jboss/cdi/tck/interceptors/tests/contract/invocationContext/SuperBinding.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.jboss.cdi.tck.interceptors.tests.contract.invocationContext; | ||
|
||
import jakarta.enterprise.util.AnnotationLiteral; | ||
import jakarta.interceptor.InterceptorBinding; | ||
|
||
import java.lang.annotation.Inherited; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.Target; | ||
|
||
import static java.lang.annotation.ElementType.METHOD; | ||
import static java.lang.annotation.ElementType.TYPE; | ||
import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
||
@InterceptorBinding | ||
@Inherited | ||
@Target({ TYPE, METHOD }) | ||
@Retention(RUNTIME) | ||
public @interface SuperBinding { | ||
class Literal extends AnnotationLiteral<SuperBinding> implements SuperBinding {} | ||
} |
5 changes: 5 additions & 0 deletions
5
...main/java/org/jboss/cdi/tck/interceptors/tests/contract/invocationContext/SuperClass.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,5 @@ | ||
package org.jboss.cdi.tck.interceptors.tests.contract.invocationContext; | ||
|
||
@SuperBinding | ||
public class SuperClass { | ||
} |