-
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.
small improvements in Build Compatible Extensions and Language Model …
…TCKs
- Loading branch information
Showing
5 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
.../java/org/jboss/cdi/tck/tests/build/compatible/extensions/registration/MyInterceptor.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,16 @@ | ||
package org.jboss.cdi.tck.tests.build.compatible.extensions.registration; | ||
|
||
import jakarta.annotation.Priority; | ||
import jakarta.interceptor.AroundInvoke; | ||
import jakarta.interceptor.Interceptor; | ||
import jakarta.interceptor.InvocationContext; | ||
|
||
@MyInterceptorBinding | ||
@Interceptor | ||
@Priority(1) | ||
public class MyInterceptor { | ||
@AroundInvoke | ||
public Object intercept(InvocationContext ctx) throws Exception { | ||
return ctx.proceed(); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
...rg/jboss/cdi/tck/tests/build/compatible/extensions/registration/MyInterceptorBinding.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,14 @@ | ||
package org.jboss.cdi.tck.tests.build.compatible.extensions.registration; | ||
|
||
import jakarta.interceptor.InterceptorBinding; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
@Target({ElementType.TYPE, ElementType.METHOD}) | ||
@Retention(RetentionPolicy.RUNTIME) | ||
@InterceptorBinding | ||
public @interface MyInterceptorBinding { | ||
} |
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
15 changes: 15 additions & 0 deletions
15
lang-model/src/main/java/org/jboss/cdi/lang/model/tck/JavaLangObjectMethods.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,15 @@ | ||
package org.jboss.cdi.lang.model.tck; | ||
|
||
import jakarta.enterprise.lang.model.declarations.ClassInfo; | ||
|
||
public class JavaLangObjectMethods /*extends Object*/ { | ||
public static class Verifier { | ||
public static void verify(ClassInfo clazz) { | ||
assert clazz.methods().isEmpty(); | ||
|
||
ClassInfo javaLangObject = clazz.superClassDeclaration(); | ||
assert !javaLangObject.methods().isEmpty(); | ||
assert LangModelUtils.collectMethods(javaLangObject, "toString").size() == 1; | ||
} | ||
} | ||
} |
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