From 647fc2c64373ab0e86a98185cca52adacb56dcee Mon Sep 17 00:00:00 2001 From: tandraschko Date: Tue, 3 Sep 2024 15:27:37 +0200 Subject: [PATCH] Faces Spec #1824 - Create TypeLiteral Constants --- .../java/jakarta/faces/annotation/ApplicationMap.java | 8 ++++++++ api/src/main/java/jakarta/faces/annotation/FlowMap.java | 8 ++++++++ api/src/main/java/jakarta/faces/annotation/HeaderMap.java | 8 ++++++++ .../java/jakarta/faces/annotation/HeaderValuesMap.java | 8 ++++++++ .../java/jakarta/faces/annotation/InitParameterMap.java | 8 ++++++++ .../java/jakarta/faces/annotation/RequestCookieMap.java | 8 ++++++++ .../main/java/jakarta/faces/annotation/RequestMap.java | 8 ++++++++ .../jakarta/faces/annotation/RequestParameterMap.java | 8 ++++++++ .../faces/annotation/RequestParameterValuesMap.java | 8 ++++++++ .../main/java/jakarta/faces/annotation/SessionMap.java | 8 ++++++++ api/src/main/java/jakarta/faces/annotation/ViewMap.java | 8 ++++++++ 11 files changed, 88 insertions(+) diff --git a/api/src/main/java/jakarta/faces/annotation/ApplicationMap.java b/api/src/main/java/jakarta/faces/annotation/ApplicationMap.java index fa0504bd37..a65b953b5f 100644 --- a/api/src/main/java/jakarta/faces/annotation/ApplicationMap.java +++ b/api/src/main/java/jakarta/faces/annotation/ApplicationMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface ApplicationMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements ApplicationMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/FlowMap.java b/api/src/main/java/jakarta/faces/annotation/FlowMap.java index 3f7670ce5c..f4216c2054 100644 --- a/api/src/main/java/jakarta/faces/annotation/FlowMap.java +++ b/api/src/main/java/jakarta/faces/annotation/FlowMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface FlowMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements FlowMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/HeaderMap.java b/api/src/main/java/jakarta/faces/annotation/HeaderMap.java index d821c4ff21..8f2f0a727c 100644 --- a/api/src/main/java/jakarta/faces/annotation/HeaderMap.java +++ b/api/src/main/java/jakarta/faces/annotation/HeaderMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface HeaderMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements HeaderMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java b/api/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java index 4568a72e9c..a272c60ae1 100644 --- a/api/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java +++ b/api/src/main/java/jakarta/faces/annotation/HeaderValuesMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface HeaderValuesMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements HeaderValuesMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/InitParameterMap.java b/api/src/main/java/jakarta/faces/annotation/InitParameterMap.java index f62e43010a..67eed66b45 100644 --- a/api/src/main/java/jakarta/faces/annotation/InitParameterMap.java +++ b/api/src/main/java/jakarta/faces/annotation/InitParameterMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface InitParameterMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements InitParameterMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/RequestCookieMap.java b/api/src/main/java/jakarta/faces/annotation/RequestCookieMap.java index ce509ae734..1427fa7c53 100644 --- a/api/src/main/java/jakarta/faces/annotation/RequestCookieMap.java +++ b/api/src/main/java/jakarta/faces/annotation/RequestCookieMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface RequestCookieMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements RequestCookieMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/RequestMap.java b/api/src/main/java/jakarta/faces/annotation/RequestMap.java index 5fef0217ef..3570f409df 100644 --- a/api/src/main/java/jakarta/faces/annotation/RequestMap.java +++ b/api/src/main/java/jakarta/faces/annotation/RequestMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface RequestMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements RequestMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/RequestParameterMap.java b/api/src/main/java/jakarta/faces/annotation/RequestParameterMap.java index 2946029869..be4dd14d29 100644 --- a/api/src/main/java/jakarta/faces/annotation/RequestParameterMap.java +++ b/api/src/main/java/jakarta/faces/annotation/RequestParameterMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface RequestParameterMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements RequestParameterMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java b/api/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java index e85b073685..ef2aa39917 100644 --- a/api/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java +++ b/api/src/main/java/jakarta/faces/annotation/RequestParameterValuesMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface RequestParameterValuesMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements RequestParameterValuesMap { diff --git a/api/src/main/java/jakarta/faces/annotation/SessionMap.java b/api/src/main/java/jakarta/faces/annotation/SessionMap.java index 165a5c806b..588ca4739d 100644 --- a/api/src/main/java/jakarta/faces/annotation/SessionMap.java +++ b/api/src/main/java/jakarta/faces/annotation/SessionMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface SessionMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements SessionMap { private static final long serialVersionUID = 1L; diff --git a/api/src/main/java/jakarta/faces/annotation/ViewMap.java b/api/src/main/java/jakarta/faces/annotation/ViewMap.java index a1fe3bbf63..863e489fcd 100644 --- a/api/src/main/java/jakarta/faces/annotation/ViewMap.java +++ b/api/src/main/java/jakarta/faces/annotation/ViewMap.java @@ -23,6 +23,9 @@ import java.lang.annotation.Retention; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Target; +import java.util.Map; + +import jakarta.enterprise.util.TypeLiteral; import jakarta.inject.Qualifier; /** @@ -33,6 +36,11 @@ @Target(value={ElementType.TYPE, ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD}) public @interface ViewMap { + public static final TypeLiteral> TYPE = new TypeLiteral<>() + { + private static final long serialVersionUID = 1L; + }; + public static final class Literal extends AnnotationLiteral implements ViewMap { private static final long serialVersionUID = 1L;