You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/11/06 14:27:55 UTC
[juneau] branch master updated: Annotation improvements.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 6a31813 Annotation improvements.
6a31813 is described below
commit 6a31813f59873e4ab949698a1ccaad623e055db6
Author: JamesBognar <ja...@salesforce.com>
AuthorDate: Fri Nov 6 09:27:47 2020 -0500
Annotation improvements.
---
.../juneau/a/rttests/RoundTripBeanMapsTest.java | 4 +-
...nBuilder_Test.java => BeanAnnotation_Test.java} | 14 +-
...er_Test.java => BeanIgnoreAnnotation_Test.java} | 18 +-
.../org/apache/juneau/annotation/Bean_Test.java | 8 +-
...Builder_Test.java => BeancAnnotation_Test.java} | 12 +-
...Builder_Test.java => BeanpAnnotation_Test.java} | 14 +-
...ilder_Test.java => ExampleAnnotation_Test.java} | 16 +-
...er_Test.java => MarshalledAnnotation_Test.java} | 12 +-
..._Test.java => NamePropertyAnnotation_Test.java} | 14 +-
...est.java => ParentPropertyAnnotation_Test.java} | 14 +-
...pBuilder_Test.java => SwapAnnotation_Test.java} | 16 +-
...riBuilder_Test.java => UriAnnotation_Test.java} | 16 +-
...svBuilder_Test.java => CsvAnnotation_Test.java} | 16 +-
.../java/org/apache/juneau/html/Html_Test.java | 2 +-
...lBuilder_Test.java => HtmlAnnotation_Test.java} | 16 +-
...lder_Test.java => HtmlLinkAnnotation_Test.java} | 12 +-
.../http/annotation/AnnotationUtils_Test.java | 1024 +++++++--------
...yBuilder_Test.java => BodyAnnotation_Test.java} | 18 +-
...ilder_Test.java => ContactAnnotation_Test.java} | 6 +-
...lder_Test.java => FormDataAnnotation_Test.java} | 22 +-
...r_Test.java => HasFormDataAnnotation_Test.java} | 6 +-
...lder_Test.java => HasQueryAnnotation_Test.java} | 6 +-
...uilder_Test.java => HeaderAnnotation_Test.java} | 25 +-
...ilder_Test.java => LicenseAnnotation_Test.java} | 6 +-
...hBuilder_Test.java => PathAnnotation_Test.java} | 25 +-
...Builder_Test.java => QueryAnnotation_Test.java} | 25 +-
...ilder_Test.java => RequestAnnotation_Test.java} | 12 +-
...lder_Test.java => ResponseAnnotation_Test.java} | 22 +-
..._Test.java => ResponseBodyAnnotation_Test.java} | 14 +-
...est.java => ResponseHeaderAnnotation_Test.java} | 23 +-
...est.java => ResponseStatusAnnotation_Test.java} | 14 +-
...agBuilder_Test.java => TagAnnotation_Test.java} | 10 +-
...dfBuilder_Test.java => RdfAnnotation_Test.java} | 16 +-
...soBuilder_Test.java => JsoAnnotation_Test.java} | 16 +-
...nBuilder_Test.java => JsonAnnotation_Test.java} | 16 +-
..._Test.java => ExternalDocsAnnotation_Test.java} | 6 +-
...Builder_Test.java => ItemsAnnotation_Test.java} | 6 +-
...uilder_Test.java => SchemaAnnotation_Test.java} | 24 +-
...lder_Test.java => SubItemsAnnotation_Test.java} | 6 +-
...ilder_Test.java => MsgPackAnnotation_Test.java} | 16 +-
...ilder_Test.java => OpenApiAnnotation_Test.java} | 16 +-
...der_Test.java => PlainTextAnnotation_Test.java} | 16 +-
...ilder_Test.java => SoapXmlAnnotation_Test.java} | 16 +-
...onBuilder_Test.java => UonAnnotation_Test.java} | 16 +-
...r_Test.java => UrlEncodingAnnotation_Test.java} | 16 +-
...mlBuilder_Test.java => XmlAnnotation_Test.java} | 16 +-
.../org/apache/juneau/jena/annotation/Rdf.java | 3 +
.../juneau/jena/annotation/RdfAnnotation.java | 268 ++++
.../apache/juneau/jena/annotation/RdfArray.java | 33 -
.../apache/juneau/jena/annotation/RdfBuilder.java | 197 ---
.../apache/juneau/jena/annotation/RdfConfig.java | 2 +-
.../jena/annotation/RdfConfigAnnotation.java | 122 ++
.../juneau/jena/annotation/RdfConfigApply.java | 115 --
.../main/java/org/apache/juneau/BeanContext.java | 42 +-
.../java/org/apache/juneau/BeanContextBuilder.java | 94 +-
.../main/java/org/apache/juneau/ConfigApply.java | 20 +
.../java/org/apache/juneau/annotation/Bean.java | 4 +-
.../apache/juneau/annotation/BeanAnnotation.java | 531 ++++++++
.../org/apache/juneau/annotation/BeanApply.java | 70 -
.../org/apache/juneau/annotation/BeanArray.java | 33 -
.../org/apache/juneau/annotation/BeanBuilder.java | 446 -------
.../org/apache/juneau/annotation/BeanConfig.java | 2 +-
.../juneau/annotation/BeanConfigAnnotation.java | 170 +++
.../apache/juneau/annotation/BeanConfigApply.java | 164 ---
.../org/apache/juneau/annotation/BeanIgnore.java | 3 +-
.../juneau/annotation/BeanIgnoreAnnotation.java | 192 +++
.../apache/juneau/annotation/BeanIgnoreArray.java | 33 -
.../juneau/annotation/BeanIgnoreBuilder.java | 125 --
.../java/org/apache/juneau/annotation/Beanc.java | 3 +-
.../apache/juneau/annotation/BeancAnnotation.java | 178 +++
.../org/apache/juneau/annotation/BeancArray.java | 33 -
.../org/apache/juneau/annotation/BeancBuilder.java | 111 --
.../java/org/apache/juneau/annotation/Beanp.java | 3 +-
.../apache/juneau/annotation/BeanpAnnotation.java | 333 +++++
.../org/apache/juneau/annotation/BeanpArray.java | 33 -
.../org/apache/juneau/annotation/BeanpBuilder.java | 260 ----
.../java/org/apache/juneau/annotation/Example.java | 3 +-
.../juneau/annotation/ExampleAnnotation.java | 208 +++
.../org/apache/juneau/annotation/ExampleArray.java | 33 -
.../apache/juneau/annotation/ExampleBuilder.java | 140 --
.../org/apache/juneau/annotation/Marshalled.java | 3 +-
.../juneau/annotation/MarshalledAnnotation.java | 214 ++++
.../apache/juneau/annotation/MarshalledArray.java | 33 -
.../juneau/annotation/MarshalledBuilder.java | 146 ---
.../org/apache/juneau/annotation/NameProperty.java | 3 +-
.../juneau/annotation/NamePropertyAnnotation.java | 163 +++
.../juneau/annotation/NamePropertyArray.java | 33 -
.../juneau/annotation/NamePropertyBuilder.java | 97 --
.../apache/juneau/annotation/ParentProperty.java | 3 +-
.../annotation/ParentPropertyAnnotation.java | 163 +++
.../juneau/annotation/ParentPropertyArray.java | 33 -
.../juneau/annotation/ParentPropertyBuilder.java | 96 --
.../java/org/apache/juneau/annotation/Swap.java | 3 +-
.../apache/juneau/annotation/SwapAnnotation.java | 267 ++++
.../org/apache/juneau/annotation/SwapArray.java | 33 -
.../org/apache/juneau/annotation/SwapBuilder.java | 197 ---
.../java/org/apache/juneau/annotation/Uri.java | 3 +-
.../apache/juneau/annotation/UriAnnotation.java | 186 +++
.../org/apache/juneau/annotation/UriArray.java | 33 -
.../org/apache/juneau/annotation/UriBuilder.java | 119 --
.../java/org/apache/juneau/csv/annotation/Csv.java | 4 +-
.../juneau/csv/annotation/CsvAnnotation.java | 187 +++
.../org/apache/juneau/csv/annotation/CsvArray.java | 33 -
.../apache/juneau/csv/annotation/CsvBuilder.java | 120 --
.../apache/juneau/csv/annotation/CsvConfig.java | 2 +-
...svConfigApply.java => CsvConfigAnnotation.java} | 36 +-
.../org/apache/juneau/html/annotation/Html.java | 4 +-
.../juneau/html/annotation/HtmlAnnotation.java | 307 +++++
.../apache/juneau/html/annotation/HtmlArray.java | 33 -
.../apache/juneau/html/annotation/HtmlBuilder.java | 234 ----
.../apache/juneau/html/annotation/HtmlConfig.java | 2 +-
...lConfigApply.java => HtmlConfigAnnotation.java} | 66 +-
.../juneau/html/annotation/HtmlDocConfig.java | 2 +-
.../html/annotation/HtmlDocConfigAnnotation.java | 125 ++
.../juneau/html/annotation/HtmlDocConfigApply.java | 119 --
.../apache/juneau/html/annotation/HtmlLink.java | 4 +-
.../juneau/html/annotation/HtmlLinkAnnotation.java | 214 ++++
.../juneau/html/annotation/HtmlLinkArray.java | 33 -
.../juneau/html/annotation/HtmlLinkBuilder.java | 145 ---
.../juneau/http/annotation/AnnotationUtils.java | 328 -----
.../org/apache/juneau/http/annotation/Body.java | 3 +-
.../juneau/http/annotation/BodyAnnotation.java | 399 ++++++
.../apache/juneau/http/annotation/BodyArray.java | 33 -
.../apache/juneau/http/annotation/BodyBuilder.java | 312 -----
.../juneau/http/annotation/ContactAnnotation.java | 179 +++
.../juneau/http/annotation/ContactBuilder.java | 146 ---
.../apache/juneau/http/annotation/FormData.java | 3 +-
.../juneau/http/annotation/FormDataAnnotation.java | 1116 ++++++++++++++++
.../juneau/http/annotation/FormDataArray.java | 33 -
.../juneau/http/annotation/FormDataBuilder.java | 990 ---------------
...DataBuilder.java => HasFormDataAnnotation.java} | 135 +-
...asQueryBuilder.java => HasQueryAnnotation.java} | 135 +-
.../org/apache/juneau/http/annotation/Header.java | 3 +-
.../juneau/http/annotation/HeaderAnnotation.java | 1117 ++++++++++++++++
.../apache/juneau/http/annotation/HeaderArray.java | 33 -
.../juneau/http/annotation/HeaderBuilder.java | 991 ---------------
...{LicenseBuilder.java => LicenseAnnotation.java} | 168 ++-
.../org/apache/juneau/http/annotation/Path.java | 3 +-
.../juneau/http/annotation/PathAnnotation.java | 1027 +++++++++++++++
.../apache/juneau/http/annotation/PathArray.java | 33 -
.../apache/juneau/http/annotation/PathBuilder.java | 906 -------------
.../org/apache/juneau/http/annotation/Query.java | 3 +-
.../juneau/http/annotation/QueryAnnotation.java | 1116 ++++++++++++++++
.../apache/juneau/http/annotation/QueryArray.java | 33 -
.../juneau/http/annotation/QueryBuilder.java | 990 ---------------
.../org/apache/juneau/http/annotation/Request.java | 4 +-
.../juneau/http/annotation/RequestAnnotation.java | 217 ++++
.../juneau/http/annotation/RequestArray.java | 33 -
.../juneau/http/annotation/RequestBuilder.java | 148 ---
.../apache/juneau/http/annotation/Response.java | 3 +-
.../juneau/http/annotation/ResponseAnnotation.java | 443 +++++++
.../juneau/http/annotation/ResponseArray.java | 33 -
.../juneau/http/annotation/ResponseBody.java | 5 +-
.../http/annotation/ResponseBodyAnnotation.java | 181 +++
.../juneau/http/annotation/ResponseBodyArray.java | 33 -
.../http/annotation/ResponseBodyBuilder.java | 114 --
.../juneau/http/annotation/ResponseBuilder.java | 354 ------
.../juneau/http/annotation/ResponseHeader.java | 4 +-
.../http/annotation/ResponseHeaderAnnotation.java | 1017 +++++++++++++++
.../http/annotation/ResponseHeaderArray.java | 33 -
.../http/annotation/ResponseHeaderBuilder.java | 883 -------------
.../juneau/http/annotation/ResponseStatus.java | 4 +-
.../http/annotation/ResponseStatusAnnotation.java | 181 +++
.../http/annotation/ResponseStatusArray.java | 33 -
.../http/annotation/ResponseStatusBuilder.java | 114 --
.../juneau/httppart/HttpPartSchemaBuilder.java | 8 +-
.../java/org/apache/juneau/jso/annotation/Jso.java | 4 +-
.../juneau/jso/annotation/JsoAnnotation.java | 187 +++
.../org/apache/juneau/jso/annotation/JsoArray.java | 33 -
.../apache/juneau/jso/annotation/JsoBuilder.java | 120 --
.../apache/juneau/jso/annotation/JsoConfig.java | 2 +-
...soConfigApply.java => JsoConfigAnnotation.java} | 36 +-
.../org/apache/juneau/json/annotation/Json.java | 4 +
.../juneau/json/annotation/JsonAnnotation.java | 209 +++
.../apache/juneau/json/annotation/JsonArray.java | 33 -
.../apache/juneau/json/annotation/JsonBuilder.java | 141 ---
.../apache/juneau/json/annotation/JsonConfig.java | 2 +-
...nConfigApply.java => JsonConfigAnnotation.java} | 60 +-
.../org/apache/juneau/jsonschema/SchemaUtils.java | 10 +-
...ocsBuilder.java => ExternalDocsAnnotation.java} | 164 ++-
.../jsonschema/annotation/ItemsAnnotation.java | 741 +++++++++++
.../juneau/jsonschema/annotation/ItemsBuilder.java | 677 ----------
.../jsonschema/annotation/JsonSchemaConfig.java | 2 +-
...gApply.java => JsonSchemaConfigAnnotation.java} | 70 +-
.../juneau/jsonschema/annotation/Schema.java | 3 +
.../jsonschema/annotation/SchemaAnnotation.java | 1238 ++++++++++++++++++
.../jsonschema/annotation/SchemaBuilder.java | 1105 ----------------
.../jsonschema/annotation/SubItemsAnnotation.java | 739 +++++++++++
.../jsonschema/annotation/SubItemsBuilder.java | 675 ----------
.../{http => jsonschema}/annotation/Tag.java | 4 +-
.../annotation/TagAnnotation.java} | 166 +--
.../apache/juneau/msgpack/annotation/MsgPack.java | 4 +-
.../msgpack/annotation/MsgPackAnnotation.java | 187 +++
.../juneau/msgpack/annotation/MsgPackArray.java | 33 -
.../juneau/msgpack/annotation/MsgPackBuilder.java | 120 --
.../juneau/msgpack/annotation/MsgPackConfig.java | 2 +-
...nfigApply.java => MsgPackConfigAnnotation.java} | 42 +-
.../org/apache/juneau/oapi/annotation/OpenApi.java | 4 +-
.../juneau/oapi/annotation/OpenApiAnnotation.java | 187 +++
.../juneau/oapi/annotation/OpenApiArray.java | 33 -
.../juneau/oapi/annotation/OpenApiBuilder.java | 120 --
.../juneau/oapi/annotation/OpenApiConfig.java | 2 +-
...nfigApply.java => OpenApiConfigAnnotation.java} | 44 +-
.../juneau/parser/annotation/ParserConfig.java | 2 +-
...onfigApply.java => ParserConfigAnnotation.java} | 86 +-
.../juneau/plaintext/annotation/PlainText.java | 4 +-
.../plaintext/annotation/PlainTextAnnotation.java | 187 +++
.../plaintext/annotation/PlainTextArray.java | 33 -
.../plaintext/annotation/PlainTextBuilder.java | 120 --
.../plaintext/annotation/PlainTextConfig.java | 2 +-
...igApply.java => PlainTextConfigAnnotation.java} | 36 +-
.../serializer/annotation/SerializerConfig.java | 2 +-
.../annotation/SerializerConfigAnnotation.java | 102 ++
.../annotation/SerializerConfigApply.java | 97 --
.../org/apache/juneau/soap/annotation/SoapXml.java | 4 +-
.../juneau/soap/annotation/SoapXmlAnnotation.java | 187 +++
.../juneau/soap/annotation/SoapXmlArray.java | 33 -
.../juneau/soap/annotation/SoapXmlBuilder.java | 120 --
.../juneau/soap/annotation/SoapXmlConfig.java | 2 +-
...nfigApply.java => SoapXmlConfigAnnotation.java} | 42 +-
.../org/apache/juneau/svl/VarResolverSession.java | 13 +
.../java/org/apache/juneau/uon/annotation/Uon.java | 4 +-
.../juneau/uon/annotation/UonAnnotation.java | 187 +++
.../org/apache/juneau/uon/annotation/UonArray.java | 33 -
.../apache/juneau/uon/annotation/UonBuilder.java | 120 --
.../apache/juneau/uon/annotation/UonConfig.java | 2 +-
...onConfigApply.java => UonConfigAnnotation.java} | 64 +-
.../juneau/urlencoding/annotation/UrlEncoding.java | 4 +-
.../annotation/UrlEncodingAnnotation.java | 211 +++
.../urlencoding/annotation/UrlEncodingArray.java | 33 -
.../urlencoding/annotation/UrlEncodingBuilder.java | 142 ---
.../urlencoding/annotation/UrlEncodingConfig.java | 2 +-
...Apply.java => UrlEncodingConfigAnnotation.java} | 44 +-
.../java/org/apache/juneau/xml/annotation/Xml.java | 5 +-
.../juneau/xml/annotation/XmlAnnotation.java | 265 ++++
.../org/apache/juneau/xml/annotation/XmlArray.java | 33 -
.../apache/juneau/xml/annotation/XmlBuilder.java | 194 ---
.../apache/juneau/xml/annotation/XmlConfig.java | 2 +-
.../juneau/xml/annotation/XmlConfigAnnotation.java | 75 ++
.../juneau/xml/annotation/XmlConfigApply.java | 67 -
.../main/ConfigurablePropertyCodeGenerator.java | 63 -
.../client/RestClient_Config_Context_Test.java | 2 +-
.../java/org/apache/juneau/rest/Swagger_Test.java | 8 +-
...ilder_Test.java => LoggingAnnotation_Test.java} | 10 +-
...r_Test.java => LoggingRuleAnnotation_Test.java} | 6 +-
...Test.java => MethodSwaggerAnnotation_Test.java} | 10 +-
...st.java => ResourceSwaggerAnnotation_Test.java} | 22 +-
...tBuilder_Test.java => RestAnnotation_Test.java} | 36 +-
...lder_Test.java => RestHookAnnotation_Test.java} | 10 +-
...er_Test.java => RestMethodAnnotation_Test.java} | 18 +-
.../java/org/apache/juneau/rest/RestContext.java | 2 +-
.../juneau/rest/RestMethodContextBuilder.java | 2 +-
.../org/apache/juneau/rest/SwaggerGenerator.java | 43 +-
.../juneau/rest/annotation/AnnotationUtils.java | 24 -
...{LoggingBuilder.java => LoggingAnnotation.java} | 193 +--
.../rest/annotation/LoggingRuleAnnotation.java | 214 ++++
.../juneau/rest/annotation/LoggingRuleBuilder.java | 209 ---
.../rest/annotation/MethodSwaggerAnnotation.java | 289 +++++
.../rest/annotation/MethodSwaggerBuilder.java | 284 -----
.../juneau/rest/annotation/ResourceSwagger.java | 3 +-
.../rest/annotation/ResourceSwaggerAnnotation.java | 255 ++++
.../rest/annotation/ResourceSwaggerBuilder.java | 240 ----
.../org/apache/juneau/rest/annotation/Rest.java | 4 +-
.../juneau/rest/annotation/RestAnnotation.java | 1337 ++++++++++++++++++++
.../apache/juneau/rest/annotation/RestArray.java | 33 -
.../apache/juneau/rest/annotation/RestBuilder.java | 1035 ---------------
.../juneau/rest/annotation/RestConfigApply.java | 301 -----
.../apache/juneau/rest/annotation/RestHook.java | 2 +-
...estHookBuilder.java => RestHookAnnotation.java} | 128 +-
.../juneau/rest/annotation/RestHookArray.java | 33 -
.../apache/juneau/rest/annotation/RestMethod.java | 4 +-
.../rest/annotation/RestMethodAnnotation.java | 881 +++++++++++++
.../juneau/rest/annotation/RestMethodArray.java | 33 -
.../juneau/rest/annotation/RestMethodBuilder.java | 633 ---------
.../rest/annotation/RestMethodConfigApply.java | 242 ----
.../apache/juneau/rest/util/AnnotationUtils.java | 39 -
276 files changed, 20563 insertions(+), 19096 deletions(-)
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
index 7981a41..9591972 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMapsTest.java
@@ -395,8 +395,8 @@ public class RoundTripBeanMapsTest extends RoundTripTest {
if (isValidationOnly())
return;
- Serializer s = getSerializer().builder().annotations(BeanBuilder.create(CA.class).dictionary(CAFilterDictionaryMap.class).build()).build();
- Parser p = getParser().builder().annotations(BeanBuilder.create(CA.class).dictionary(CAFilterDictionaryMap.class).build()).build();
+ Serializer s = getSerializer().builder().annotations(BeanAnnotation.create(CA.class).dictionary(CAFilterDictionaryMap.class).build()).build();
+ Parser p = getParser().builder().annotations(BeanAnnotation.create(CA.class).dictionary(CAFilterDictionaryMap.class).build()).build();
CA1 c1 = CA1.create();
Object r = s.serialize(c1);
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java
similarity index 92%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java
index d436085..361e9eb 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java
@@ -21,18 +21,18 @@ import org.apache.juneau.transform.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class BeanBuilder_Test {
+public class BeanAnnotation_Test {
- private static final String CNAME = BeanBuilder_Test.class.getName();
+ private static final String CNAME = BeanAnnotation_Test.class.getName();
private static class X1 {}
- private static class X2 extends BeanInterceptor<BeanBuilder_Test> {}
+ private static class X2 extends BeanInterceptor<BeanAnnotation_Test> {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Bean a1 = BeanBuilder.create()
+ Bean a1 = BeanAnnotation.create()
.dictionary(X1.class)
.example("example")
.excludeProperties("excludeProperties")
@@ -56,7 +56,7 @@ public class BeanBuilder_Test {
.xp("xp")
.build();
- Bean a2 = BeanBuilder.create()
+ Bean a2 = BeanAnnotation.create()
.dictionary(X1.class)
.example("example")
.excludeProperties("excludeProperties")
@@ -135,8 +135,8 @@ public class BeanBuilder_Test {
@Test
public void c01_otherMethods() {
- Bean c1 = BeanBuilder.create(C1.class).on(C2.class).build();
- Bean c2 = BeanBuilder.create("a").on("b").build();
+ Bean c1 = BeanAnnotation.create(C1.class).on(C2.class).build();
+ Bean c2 = BeanAnnotation.create("a").on("b").build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java
similarity index 84%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java
index 298b32d..9494002 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class BeanIgnoreBuilder_Test {
+public class BeanIgnoreAnnotation_Test {
- private static final String CNAME = BeanIgnoreBuilder_Test.class.getName();
+ private static final String CNAME = BeanIgnoreAnnotation_Test.class.getName();
private static class X1 {}
@@ -30,12 +30,12 @@ public class BeanIgnoreBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- BeanIgnore a1 = BeanIgnoreBuilder.create()
+ BeanIgnore a1 = BeanIgnoreAnnotation.create()
.on("a")
.onClass(X1.class)
.build();
- BeanIgnore a2 = BeanIgnoreBuilder.create()
+ BeanIgnore a2 = BeanIgnoreAnnotation.create()
.on("a")
.onClass(X1.class)
.build();
@@ -82,11 +82,11 @@ public class BeanIgnoreBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- BeanIgnore c1 = BeanIgnoreBuilder.create(C1.class).on(C2.class).build();
- BeanIgnore c2 = BeanIgnoreBuilder.create("a").on("b").build();
- BeanIgnore c3 = BeanIgnoreBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- BeanIgnore c4 = BeanIgnoreBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
- BeanIgnore c5 = BeanIgnoreBuilder.create().on(C1.class.getConstructor()).on(C2.class.getConstructor()).build();
+ BeanIgnore c1 = BeanIgnoreAnnotation.create(C1.class).on(C2.class).build();
+ BeanIgnore c2 = BeanIgnoreAnnotation.create("a").on("b").build();
+ BeanIgnore c3 = BeanIgnoreAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ BeanIgnore c4 = BeanIgnoreAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ BeanIgnore c5 = BeanIgnoreAnnotation.create().on(C1.class.getConstructor()).on(C2.class.getConstructor()).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java
index a22b695..b22fa66 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java
@@ -244,7 +244,7 @@ public class Bean_Test {
@Test
public void d05_beanPropertiesExcludePropertiesCombined_beanContextBuilderOverride() throws Exception {
- Bean ba = BeanBuilder.create("D1").properties("b,c,d").excludeProperties("c").build();
+ Bean ba = BeanAnnotation.create("D1").properties("b,c,d").excludeProperties("c").build();
JsonSerializer js = JsonSerializer.create().simple().annotations(ba).build();
JsonParser jp = JsonParser.create().annotations(ba).build();
@@ -257,7 +257,7 @@ public class Bean_Test {
@Test
public void d06_beanPXpCombined_beanContextBuilderOverride() throws Exception {
- Bean ba = BeanBuilder.create("D2").p("b,c,d").xp("c").build();
+ Bean ba = BeanAnnotation.create("D2").p("b,c,d").xp("c").build();
JsonSerializer js = JsonSerializer.create().simple().annotations(ba).build();
JsonParser jp = JsonParser.create().annotations(ba).build();
@@ -361,7 +361,7 @@ public class Bean_Test {
@Test
public void e05_beanPropertiersExcludePropertiesCombined_multipleBeanAnnotations_beanContextBuilderOverride() throws Exception {
- Bean ba = BeanBuilder.create("E1").properties("b,c,d").excludeProperties("c").build();
+ Bean ba = BeanAnnotation.create("E1").properties("b,c,d").excludeProperties("c").build();
JsonSerializer js = JsonSerializer.create().simple().annotations(ba).build();
JsonParser jp = JsonParser.create().annotations(ba).build();
@@ -374,7 +374,7 @@ public class Bean_Test {
@Test
public void e06_beanBpiBpxCombined_multipleBeanAnnotations_beanContextBuilderOverride() throws Exception {
- Bean ba = BeanBuilder.create("E2").p("b,c,d").xp("c").build();
+ Bean ba = BeanAnnotation.create("E2").p("b,c,d").xp("c").build();
JsonSerializer js = JsonSerializer.create().simple().annotations(ba).build();
JsonParser jp = JsonParser.create().annotations(ba).build();
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java
similarity index 90%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java
index 802364e..3130679 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java
@@ -20,20 +20,20 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class BeancBuilder_Test {
+public class BeancAnnotation_Test {
- private static final String CNAME = BeancBuilder_Test.class.getName();
+ private static final String CNAME = BeancAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Beanc a1 = BeancBuilder.create()
+ Beanc a1 = BeancAnnotation.create()
.on("on")
.properties("properties")
.build();
- Beanc a2 = BeancBuilder.create()
+ Beanc a2 = BeancAnnotation.create()
.on("on")
.properties("properties")
.build();
@@ -74,8 +74,8 @@ public class BeancBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Beanc c1 = BeancBuilder.create("a").on("b").build();
- Beanc c2 = BeancBuilder.create().on(C1.class.getConstructor()).on(C2.class.getConstructor()).build();
+ Beanc c1 = BeancAnnotation.create("a").on("b").build();
+ Beanc c2 = BeancAnnotation.create().on(C1.class.getConstructor()).on(C2.class.getConstructor()).build();
assertObject(c1).json().contains("on:['a','b']");
assertObject(c2).json().contains("on:['"+CNAME+"$C1()','"+CNAME+"$C2()']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java
similarity index 89%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java
index a1f140f..1a3147a 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class BeanpBuilder_Test {
+public class BeanpAnnotation_Test {
- private static final String CNAME = BeanpBuilder_Test.class.getName();
+ private static final String CNAME = BeanpAnnotation_Test.class.getName();
public static class X1 {}
@@ -30,7 +30,7 @@ public class BeanpBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Beanp a1 = BeanpBuilder.create()
+ Beanp a1 = BeanpAnnotation.create()
.dictionary(X1.class)
.format("format")
.name("name")
@@ -43,7 +43,7 @@ public class BeanpBuilder_Test {
.wo("wo")
.build();
- Beanp a2 = BeanpBuilder.create()
+ Beanp a2 = BeanpAnnotation.create()
.dictionary(X1.class)
.format("format")
.name("name")
@@ -106,9 +106,9 @@ public class BeanpBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Beanp c1 = BeanpBuilder.create("a").on("b").build();
- Beanp c2 = BeanpBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Beanp c3 = BeanpBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Beanp c1 = BeanpAnnotation.create("a").on("b").build();
+ Beanp c2 = BeanpAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Beanp c3 = BeanpAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['a','b']");
assertObject(c2).json().contains("on:['"+CNAME+"$C1.f1','"+CNAME+"$C2.f2']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleAnnotation_Test.java
index f1c00ba..af4fdcf 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ExampleAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ExampleBuilder_Test {
+public class ExampleAnnotation_Test {
- private static final String CNAME = ExampleBuilder_Test.class.getName();
+ private static final String CNAME = ExampleAnnotation_Test.class.getName();
private static class X1 {}
@@ -30,13 +30,13 @@ public class ExampleBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Example a1 = ExampleBuilder.create()
+ Example a1 = ExampleAnnotation.create()
.on("on")
.onClass(X1.class)
.value("value")
.build();
- Example a2 = ExampleBuilder.create()
+ Example a2 = ExampleAnnotation.create()
.on("on")
.onClass(X1.class)
.value("value")
@@ -85,10 +85,10 @@ public class ExampleBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Example c1 = ExampleBuilder.create(C1.class).on(C2.class).build();
- Example c2 = ExampleBuilder.create("a").on("b").build();
- Example c3 = ExampleBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Example c4 = ExampleBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Example c1 = ExampleAnnotation.create(C1.class).on(C2.class).build();
+ Example c2 = ExampleAnnotation.create("a").on("b").build();
+ Example c3 = ExampleAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Example c4 = ExampleAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
similarity index 90%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
index 41f2fa2..4fa0429 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class MarshalledBuilder_Test {
+public class MarshalledAnnotation_Test {
- private static final String CNAME = MarshalledBuilder_Test.class.getName();
+ private static final String CNAME = MarshalledAnnotation_Test.class.getName();
private static class X1 {}
@@ -30,14 +30,14 @@ public class MarshalledBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Marshalled a1 = MarshalledBuilder.create()
+ Marshalled a1 = MarshalledAnnotation.create()
.example("example")
.implClass(X1.class)
.on("on")
.onClass(X1.class)
.build();
- Marshalled a2 = MarshalledBuilder.create()
+ Marshalled a2 = MarshalledAnnotation.create()
.example("example")
.implClass(X1.class)
.on("on")
@@ -88,8 +88,8 @@ public class MarshalledBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Marshalled c1 = MarshalledBuilder.create(C1.class).on(C2.class).build();
- Marshalled c2 = MarshalledBuilder.create("a").on("b").build();
+ Marshalled c1 = MarshalledAnnotation.create(C1.class).on(C2.class).build();
+ Marshalled c2 = MarshalledAnnotation.create("a").on("b").build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyAnnotation_Test.java
index 693b19f..31745e2 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/NamePropertyAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class NamePropertyBuilder_Test {
+public class NamePropertyAnnotation_Test {
- private static final String CNAME = NamePropertyBuilder_Test.class.getName();
+ private static final String CNAME = NamePropertyAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- NameProperty a1 = NamePropertyBuilder.create()
+ NameProperty a1 = NamePropertyAnnotation.create()
.on("on")
.build();
- NameProperty a2 = NamePropertyBuilder.create()
+ NameProperty a2 = NamePropertyAnnotation.create()
.on("on")
.build();
@@ -77,9 +77,9 @@ public class NamePropertyBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- NameProperty c1 = NamePropertyBuilder.create("a").on("b").build();
- NameProperty c2 = NamePropertyBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- NameProperty c3 = NamePropertyBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ NameProperty c1 = NamePropertyAnnotation.create("a").on("b").build();
+ NameProperty c2 = NamePropertyAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ NameProperty c3 = NamePropertyAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['a','b']");
assertObject(c2).json().contains("on:['"+CNAME+"$C1.f1','"+CNAME+"$C2.f2']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyAnnotation_Test.java
index 143b1cc..6cab937 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/ParentPropertyAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ParentPropertyBuilder_Test {
+public class ParentPropertyAnnotation_Test {
- private static final String CNAME = ParentPropertyBuilder_Test.class.getName();
+ private static final String CNAME = ParentPropertyAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- ParentProperty a1 = ParentPropertyBuilder.create()
+ ParentProperty a1 = ParentPropertyAnnotation.create()
.on("on")
.build();
- ParentProperty a2 = ParentPropertyBuilder.create()
+ ParentProperty a2 = ParentPropertyAnnotation.create()
.on("on")
.build();
@@ -77,9 +77,9 @@ public class ParentPropertyBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- ParentProperty c1 = ParentPropertyBuilder.create("a").on("b").build();
- ParentProperty c2 = ParentPropertyBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- ParentProperty c3 = ParentPropertyBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ ParentProperty c1 = ParentPropertyAnnotation.create("a").on("b").build();
+ ParentProperty c2 = ParentPropertyAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ ParentProperty c3 = ParentPropertyAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['a','b']");
assertObject(c2).json().contains("on:['"+CNAME+"$C1.f1','"+CNAME+"$C2.f2']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapAnnotation_Test.java
similarity index 88%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapAnnotation_Test.java
index d2c8ecc..8b72737 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/SwapAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class SwapBuilder_Test {
+public class SwapAnnotation_Test {
- private static final String CNAME = SwapBuilder_Test.class.getName();
+ private static final String CNAME = SwapAnnotation_Test.class.getName();
private static class X1 {}
@@ -30,7 +30,7 @@ public class SwapBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Swap a1 = SwapBuilder.create()
+ Swap a1 = SwapAnnotation.create()
.impl(X1.class)
.mediaTypes("mediaTypes")
.on("on")
@@ -39,7 +39,7 @@ public class SwapBuilder_Test {
.value(X1.class)
.build();
- Swap a2 = SwapBuilder.create()
+ Swap a2 = SwapAnnotation.create()
.impl(X1.class)
.mediaTypes("mediaTypes")
.on("on")
@@ -93,10 +93,10 @@ public class SwapBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Swap c1 = SwapBuilder.create(C1.class).on(C2.class).build();
- Swap c2 = SwapBuilder.create("a").on("b").build();
- Swap c3 = SwapBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Swap c4 = SwapBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Swap c1 = SwapAnnotation.create(C1.class).on(C2.class).build();
+ Swap c2 = SwapAnnotation.create("a").on("b").build();
+ Swap c3 = SwapAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Swap c4 = SwapAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriAnnotation_Test.java
index e2017d0..0128f0a 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/annotation/UriAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class UriBuilder_Test {
+public class UriAnnotation_Test {
- private static final String CNAME = UriBuilder_Test.class.getName();
+ private static final String CNAME = UriAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Uri a1 = UriBuilder.create()
+ Uri a1 = UriAnnotation.create()
.on("a")
.build();
- Uri a2 = UriBuilder.create()
+ Uri a2 = UriAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class UriBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Uri c1 = UriBuilder.create(C1.class).on(C2.class).build();
- Uri c2 = UriBuilder.create("a").on("b").build();
- Uri c3 = UriBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Uri c4 = UriBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Uri c1 = UriAnnotation.create(C1.class).on(C2.class).build();
+ Uri c2 = UriAnnotation.create("a").on("b").build();
+ Uri c3 = UriAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Uri c4 = UriAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvAnnotation_Test.java
index 1257b11..91d2fe4 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/csv/annotation/CsvAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class CsvBuilder_Test {
+public class CsvAnnotation_Test {
- private static final String CNAME = CsvBuilder_Test.class.getName();
+ private static final String CNAME = CsvAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Csv a1 = CsvBuilder.create()
+ Csv a1 = CsvAnnotation.create()
.on("a")
.build();
- Csv a2 = CsvBuilder.create()
+ Csv a2 = CsvAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class CsvBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Csv c1 = CsvBuilder.create(C1.class).on(C2.class).build();
- Csv c2 = CsvBuilder.create("a").on("b").build();
- Csv c3 = CsvBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Csv c4 = CsvBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Csv c1 = CsvAnnotation.create(C1.class).on(C2.class).build();
+ Csv c2 = CsvAnnotation.create("a").on("b").build();
+ Csv c3 = CsvAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Csv c4 = CsvAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/Html_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/Html_Test.java
index 54aa2b0..23aae8a 100755
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/Html_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/Html_Test.java
@@ -397,7 +397,7 @@ public class Html_Test {
@Test
public void d05_testNoTableHeadersOnBeans_usingConcreteAnnotation() throws Exception {
- HtmlSerializer s = HtmlSerializer.DEFAULT_SQ.builder().annotations(HtmlBuilder.create("MyBean2").noTables(true).build()).build();
+ HtmlSerializer s = HtmlSerializer.DEFAULT_SQ.builder().annotations(HtmlAnnotation.create("MyBean2").noTables(true).build()).build();
Object o = null;
String r;
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlAnnotation_Test.java
similarity index 90%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlAnnotation_Test.java
index 0c86050..ae66435 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlAnnotation_Test.java
@@ -21,9 +21,9 @@ import org.apache.juneau.html.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class HtmlBuilder_Test {
+public class HtmlAnnotation_Test {
- private static final String CNAME = HtmlBuilder_Test.class.getName();
+ private static final String CNAME = HtmlAnnotation_Test.class.getName();
private static class X1 extends HtmlRender<Object> {}
@@ -31,7 +31,7 @@ public class HtmlBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Html a1 = HtmlBuilder.create()
+ Html a1 = HtmlAnnotation.create()
.anchorText("a")
.format(HtmlFormat.XML)
.link("c")
@@ -41,7 +41,7 @@ public class HtmlBuilder_Test {
.render(X1.class)
.build();
- Html a2 = HtmlBuilder.create()
+ Html a2 = HtmlAnnotation.create()
.anchorText("a")
.format(HtmlFormat.XML)
.link("c")
@@ -99,10 +99,10 @@ public class HtmlBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Html c1 = HtmlBuilder.create(C1.class).on(C2.class).build();
- Html c2 = HtmlBuilder.create("a").on("b").build();
- Html c3 = HtmlBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Html c4 = HtmlBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Html c1 = HtmlAnnotation.create(C1.class).on(C2.class).build();
+ Html c2 = HtmlAnnotation.create("a").on("b").build();
+ Html c3 = HtmlAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Html c4 = HtmlAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation_Test.java
similarity index 92%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation_Test.java
index bdc96ab..4d486fb 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation_Test.java
@@ -20,21 +20,21 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class HtmlLinkBuilder_Test {
+public class HtmlLinkAnnotation_Test {
- private static final String CNAME = HtmlLinkBuilder_Test.class.getName();
+ private static final String CNAME = HtmlLinkAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- HtmlLink a1 = HtmlLinkBuilder.create()
+ HtmlLink a1 = HtmlLinkAnnotation.create()
.nameProperty("a")
.on("b")
.uriProperty("c")
.build();
- HtmlLink a2 = HtmlLinkBuilder.create()
+ HtmlLink a2 = HtmlLinkAnnotation.create()
.nameProperty("a")
.on("b")
.uriProperty("c")
@@ -84,8 +84,8 @@ public class HtmlLinkBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- HtmlLink c1 = HtmlLinkBuilder.create(C1.class).on(C2.class).build();
- HtmlLink c2 = HtmlLinkBuilder.create("a").on("b").build();
+ HtmlLink c1 = HtmlLinkAnnotation.create(C1.class).on(C2.class).build();
+ HtmlLink c2 = HtmlLinkAnnotation.create("a").on("b").build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/AnnotationUtils_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/AnnotationUtils_Test.java
index f31a2eb..659874e 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/AnnotationUtils_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/AnnotationUtils_Test.java
@@ -17,7 +17,6 @@ import static org.junit.runners.MethodSorters.*;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
import static org.apache.juneau.assertions.Assertions.*;
-import static org.apache.juneau.http.annotation.AnnotationUtils.*;
import java.lang.annotation.*;
import java.lang.reflect.*;
@@ -61,22 +60,22 @@ public class AnnotationUtils_Test {
public void a01_Body() throws Exception {
assertObject(body().build().annotationType()).json().contains("Body");
- assertTrue(empty(A1.class.getAnnotation(Body.class)));
- assertTrue(empty(A2.class.getAnnotation(Body.class)));
- assertTrue(empty(body().build()));
- assertTrue(empty((Body)null));
+ assertTrue(BodyAnnotation.empty(A1.class.getAnnotation(Body.class)));
+ assertTrue(BodyAnnotation.empty(A2.class.getAnnotation(Body.class)));
+ assertTrue(BodyAnnotation.empty(body().build()));
+ assertTrue(BodyAnnotation.empty((Body)null));
- assertFalse(empty(body().api(a("foo")).build()));
- assertFalse(empty(body().d(a("foo")).build()));
- assertFalse(empty(body().description(a("foo")).build()));
- assertFalse(empty(body().ex(a("foo")).build()));
- assertFalse(empty(body().example(a("foo")).build()));
- assertFalse(empty(body().examples(a("foo")).build()));
- assertFalse(empty(body().exs(a("foo")).build()));
- assertFalse(empty(body().required(true).build()));
- assertFalse(empty(body().r(true).build()));
- assertFalse(empty(body().schema(schema().$ref("foo").build()).build()));
- assertFalse(empty(body().value(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().api(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().d(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().description(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().ex(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().example(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().examples(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().exs(a("foo")).build()));
+ assertFalse(BodyAnnotation.empty(body().required(true).build()));
+ assertFalse(BodyAnnotation.empty(body().r(true).build()));
+ assertFalse(BodyAnnotation.empty(body().schema(schema().$ref("foo").build()).build()));
+ assertFalse(BodyAnnotation.empty(body().value(a("foo")).build()));
}
@Test
@@ -85,14 +84,14 @@ public class AnnotationUtils_Test {
assertObject(contact().build().annotationType()).json().contains("Contact");
- assertTrue(empty(x1.contact()));
- assertTrue(empty(contact().build()));
- assertTrue(empty((Contact)null));
+ assertTrue(ContactAnnotation.empty(x1.contact()));
+ assertTrue(ContactAnnotation.empty(contact().build()));
+ assertTrue(ContactAnnotation.empty((Contact)null));
- assertFalse(empty(contact().email("foo").build()));
- assertFalse(empty(contact().name("foo").build()));
- assertFalse(empty(contact().url("foo").build()));
- assertFalse(empty(contact().value(a("foo")).build()));
+ assertFalse(ContactAnnotation.empty(contact().email("foo").build()));
+ assertFalse(ContactAnnotation.empty(contact().name("foo").build()));
+ assertFalse(ContactAnnotation.empty(contact().url("foo").build()));
+ assertFalse(ContactAnnotation.empty(contact().value(a("foo")).build()));
}
@Test
@@ -102,61 +101,61 @@ public class AnnotationUtils_Test {
assertObject(formData().build().annotationType()).json().contains("FormData");
- assertTrue(empty(f1.getAnnotation(FormData.class)));
- assertTrue(empty(f2.getAnnotation(FormData.class)));
- assertTrue(empty((FormData)null));
- assertTrue(empty(formData().build()));
-
- assertFalse(empty(formData()._default(a("foo")).build()));
- assertFalse(empty(formData()._enum(a("foo")).build()));
- assertFalse(empty(formData().aev(true).build()));
- assertFalse(empty(formData().allowEmptyValue(true).build()));
- assertFalse(empty(formData().api(a("foo")).build()));
- assertFalse(empty(formData().cf("foo").build()));
- assertFalse(empty(formData().collectionFormat("foo").build()));
- assertFalse(empty(formData().d(a("foo")).build()));
- assertFalse(empty(formData().description(a("foo")).build()));
- assertFalse(empty(formData().df(a("foo")).build()));
- assertFalse(empty(formData().e(a("foo")).build()));
- assertFalse(empty(formData().emax(true).build()));
- assertFalse(empty(formData().emin(true).build()));
- assertFalse(empty(formData().ex(a("foo")).build()));
- assertFalse(empty(formData().example(a("foo")).build()));
- assertFalse(empty(formData().exclusiveMaximum(true).build()));
- assertFalse(empty(formData().exclusiveMinimum(true).build()));
- assertFalse(empty(formData().f("foo").build()));
- assertFalse(empty(formData().format("foo").build()));
- assertFalse(empty(formData().items(items().$ref("foo").build()).build()));
- assertFalse(empty(formData().max("foo").build()));
- assertFalse(empty(formData().maxi(0).build()));
- assertFalse(empty(formData().maximum("foo").build()));
- assertFalse(empty(formData().maxItems(0).build()));
- assertFalse(empty(formData().maxl(0).build()));
- assertFalse(empty(formData().maxLength(0).build()));
- assertFalse(empty(formData().min("foo").build()));
- assertFalse(empty(formData().mini(0).build()));
- assertFalse(empty(formData().minimum("foo").build()));
- assertFalse(empty(formData().minItems(0).build()));
- assertFalse(empty(formData().minl(0).build()));
- assertFalse(empty(formData().minLength(0).build()));
- assertFalse(empty(formData().mo("foo").build()));
- assertFalse(empty(formData().multi(true).build()));
- assertFalse(empty(formData().multipleOf("foo").build()));
- assertFalse(empty(formData().n("foo").build()));
- assertFalse(empty(formData().name("foo").build()));
- assertFalse(empty(formData().p("foo").build()));
- assertFalse(empty(formData().parser(OpenApiParser.class).build()));
- assertFalse(empty(formData().pattern("foo").build()));
- assertFalse(empty(formData().r(true).build()));
- assertFalse(empty(formData().required(true).build()));
- assertFalse(empty(formData().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(formData().sie(true).build()));
- assertFalse(empty(formData().skipIfEmpty(true).build()));
- assertFalse(empty(formData().t("foo").build()));
- assertFalse(empty(formData().type("foo").build()));
- assertFalse(empty(formData().ui(true).build()));
- assertFalse(empty(formData().uniqueItems(true).build()));
- assertFalse(empty(formData().value("foo").build()));
+ assertTrue(FormDataAnnotation.empty(f1.getAnnotation(FormData.class)));
+ assertTrue(FormDataAnnotation.empty(f2.getAnnotation(FormData.class)));
+ assertTrue(FormDataAnnotation.empty((FormData)null));
+ assertTrue(FormDataAnnotation.empty(formData().build()));
+
+ assertFalse(FormDataAnnotation.empty(formData()._default(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData()._enum(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().aev(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().allowEmptyValue(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().api(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().cf("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().collectionFormat("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().d(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().description(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().df(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().e(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().emax(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().emin(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().ex(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().example(a("foo")).build()));
+ assertFalse(FormDataAnnotation.empty(formData().exclusiveMaximum(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().exclusiveMinimum(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().f("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().format("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().items(items().$ref("foo").build()).build()));
+ assertFalse(FormDataAnnotation.empty(formData().max("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().maxi(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().maximum("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().maxItems(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().maxl(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().maxLength(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().min("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().mini(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().minimum("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().minItems(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().minl(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().minLength(0).build()));
+ assertFalse(FormDataAnnotation.empty(formData().mo("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().multi(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().multipleOf("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().n("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().name("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().p("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().parser(OpenApiParser.class).build()));
+ assertFalse(FormDataAnnotation.empty(formData().pattern("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().r(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().required(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().serializer(OpenApiSerializer.class).build()));
+ assertFalse(FormDataAnnotation.empty(formData().sie(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().skipIfEmpty(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().t("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().type("foo").build()));
+ assertFalse(FormDataAnnotation.empty(formData().ui(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().uniqueItems(true).build()));
+ assertFalse(FormDataAnnotation.empty(formData().value("foo").build()));
}
@Test
@@ -175,61 +174,61 @@ public class AnnotationUtils_Test {
assertObject(query().build().annotationType()).json().contains("Query");
- assertTrue(empty(f1.getAnnotation(Query.class)));
- assertTrue(empty(f2.getAnnotation(Query.class)));
- assertTrue(empty((Query)null));
- assertTrue(empty(query().build()));
-
- assertFalse(empty(query()._default(a("foo")).build()));
- assertFalse(empty(query()._enum(a("foo")).build()));
- assertFalse(empty(query().aev(true).build()));
- assertFalse(empty(query().allowEmptyValue(true).build()));
- assertFalse(empty(query().api(a("foo")).build()));
- assertFalse(empty(query().cf("foo").build()));
- assertFalse(empty(query().collectionFormat("foo").build()));
- assertFalse(empty(query().d(a("foo")).build()));
- assertFalse(empty(query().description(a("foo")).build()));
- assertFalse(empty(query().df(a("foo")).build()));
- assertFalse(empty(query().e(a("foo")).build()));
- assertFalse(empty(query().emax(true).build()));
- assertFalse(empty(query().emin(true).build()));
- assertFalse(empty(query().ex(a("foo")).build()));
- assertFalse(empty(query().example(a("foo")).build()));
- assertFalse(empty(query().exclusiveMaximum(true).build()));
- assertFalse(empty(query().exclusiveMinimum(true).build()));
- assertFalse(empty(query().f("foo").build()));
- assertFalse(empty(query().format("foo").build()));
- assertFalse(empty(query().items(items().$ref("foo").build()).build()));
- assertFalse(empty(query().max("foo").build()));
- assertFalse(empty(query().maxi(0).build()));
- assertFalse(empty(query().maximum("foo").build()));
- assertFalse(empty(query().maxItems(0).build()));
- assertFalse(empty(query().maxl(0).build()));
- assertFalse(empty(query().maxLength(0).build()));
- assertFalse(empty(query().min("foo").build()));
- assertFalse(empty(query().mini(0).build()));
- assertFalse(empty(query().minimum("foo").build()));
- assertFalse(empty(query().minItems(0).build()));
- assertFalse(empty(query().minl(0).build()));
- assertFalse(empty(query().minLength(0).build()));
- assertFalse(empty(query().mo("foo").build()));
- assertFalse(empty(query().multi(true).build()));
- assertFalse(empty(query().multipleOf("foo").build()));
- assertFalse(empty(query().n("foo").build()));
- assertFalse(empty(query().name("foo").build()));
- assertFalse(empty(query().p("foo").build()));
- assertFalse(empty(query().parser(OpenApiParser.class).build()));
- assertFalse(empty(query().pattern("foo").build()));
- assertFalse(empty(query().r(true).build()));
- assertFalse(empty(query().required(true).build()));
- assertFalse(empty(query().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(query().sie(true).build()));
- assertFalse(empty(query().skipIfEmpty(true).build()));
- assertFalse(empty(query().t("foo").build()));
- assertFalse(empty(query().type("foo").build()));
- assertFalse(empty(query().ui(true).build()));
- assertFalse(empty(query().uniqueItems(true).build()));
- assertFalse(empty(query().value("foo").build()));
+ assertTrue(QueryAnnotation.empty(f1.getAnnotation(Query.class)));
+ assertTrue(QueryAnnotation.empty(f2.getAnnotation(Query.class)));
+ assertTrue(QueryAnnotation.empty((Query)null));
+ assertTrue(QueryAnnotation.empty(query().build()));
+
+ assertFalse(QueryAnnotation.empty(query()._default(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query()._enum(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().aev(true).build()));
+ assertFalse(QueryAnnotation.empty(query().allowEmptyValue(true).build()));
+ assertFalse(QueryAnnotation.empty(query().api(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().cf("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().collectionFormat("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().d(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().description(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().df(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().e(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().emax(true).build()));
+ assertFalse(QueryAnnotation.empty(query().emin(true).build()));
+ assertFalse(QueryAnnotation.empty(query().ex(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().example(a("foo")).build()));
+ assertFalse(QueryAnnotation.empty(query().exclusiveMaximum(true).build()));
+ assertFalse(QueryAnnotation.empty(query().exclusiveMinimum(true).build()));
+ assertFalse(QueryAnnotation.empty(query().f("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().format("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().items(items().$ref("foo").build()).build()));
+ assertFalse(QueryAnnotation.empty(query().max("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().maxi(0).build()));
+ assertFalse(QueryAnnotation.empty(query().maximum("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().maxItems(0).build()));
+ assertFalse(QueryAnnotation.empty(query().maxl(0).build()));
+ assertFalse(QueryAnnotation.empty(query().maxLength(0).build()));
+ assertFalse(QueryAnnotation.empty(query().min("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().mini(0).build()));
+ assertFalse(QueryAnnotation.empty(query().minimum("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().minItems(0).build()));
+ assertFalse(QueryAnnotation.empty(query().minl(0).build()));
+ assertFalse(QueryAnnotation.empty(query().minLength(0).build()));
+ assertFalse(QueryAnnotation.empty(query().mo("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().multi(true).build()));
+ assertFalse(QueryAnnotation.empty(query().multipleOf("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().n("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().name("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().p("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().parser(OpenApiParser.class).build()));
+ assertFalse(QueryAnnotation.empty(query().pattern("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().r(true).build()));
+ assertFalse(QueryAnnotation.empty(query().required(true).build()));
+ assertFalse(QueryAnnotation.empty(query().serializer(OpenApiSerializer.class).build()));
+ assertFalse(QueryAnnotation.empty(query().sie(true).build()));
+ assertFalse(QueryAnnotation.empty(query().skipIfEmpty(true).build()));
+ assertFalse(QueryAnnotation.empty(query().t("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().type("foo").build()));
+ assertFalse(QueryAnnotation.empty(query().ui(true).build()));
+ assertFalse(QueryAnnotation.empty(query().uniqueItems(true).build()));
+ assertFalse(QueryAnnotation.empty(query().value("foo").build()));
}
@Test
@@ -248,61 +247,61 @@ public class AnnotationUtils_Test {
assertObject(header().build().annotationType()).json().contains("Header");
- assertTrue(empty(f1.getAnnotation(Header.class)));
- assertTrue(empty(f2.getAnnotation(Header.class)));
- assertTrue(empty((Header)null));
- assertTrue(empty(header().build()));
-
- assertFalse(empty(header()._default(a("foo")).build()));
- assertFalse(empty(header()._enum(a("foo")).build()));
- assertFalse(empty(header().aev(true).build()));
- assertFalse(empty(header().allowEmptyValue(true).build()));
- assertFalse(empty(header().api(a("foo")).build()));
- assertFalse(empty(header().cf("foo").build()));
- assertFalse(empty(header().collectionFormat("foo").build()));
- assertFalse(empty(header().d(a("foo")).build()));
- assertFalse(empty(header().description(a("foo")).build()));
- assertFalse(empty(header().df(a("foo")).build()));
- assertFalse(empty(header().e(a("foo")).build()));
- assertFalse(empty(header().emax(true).build()));
- assertFalse(empty(header().emin(true).build()));
- assertFalse(empty(header().ex(a("foo")).build()));
- assertFalse(empty(header().example(a("foo")).build()));
- assertFalse(empty(header().exclusiveMaximum(true).build()));
- assertFalse(empty(header().exclusiveMinimum(true).build()));
- assertFalse(empty(header().f("foo").build()));
- assertFalse(empty(header().format("foo").build()));
- assertFalse(empty(header().items(items().$ref("foo").build()).build()));
- assertFalse(empty(header().max("foo").build()));
- assertFalse(empty(header().maxi(0).build()));
- assertFalse(empty(header().maximum("foo").build()));
- assertFalse(empty(header().maxItems(0).build()));
- assertFalse(empty(header().maxl(0).build()));
- assertFalse(empty(header().maxLength(0).build()));
- assertFalse(empty(header().min("foo").build()));
- assertFalse(empty(header().mini(0).build()));
- assertFalse(empty(header().minimum("foo").build()));
- assertFalse(empty(header().minItems(0).build()));
- assertFalse(empty(header().minl(0).build()));
- assertFalse(empty(header().minLength(0).build()));
- assertFalse(empty(header().mo("foo").build()));
- assertFalse(empty(header().multi(true).build()));
- assertFalse(empty(header().multipleOf("foo").build()));
- assertFalse(empty(header().n("foo").build()));
- assertFalse(empty(header().name("foo").build()));
- assertFalse(empty(header().p("foo").build()));
- assertFalse(empty(header().parser(OpenApiParser.class).build()));
- assertFalse(empty(header().pattern("foo").build()));
- assertFalse(empty(header().r(true).build()));
- assertFalse(empty(header().required(true).build()));
- assertFalse(empty(header().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(header().sie(true).build()));
- assertFalse(empty(header().skipIfEmpty(true).build()));
- assertFalse(empty(header().t("foo").build()));
- assertFalse(empty(header().type("foo").build()));
- assertFalse(empty(header().ui(true).build()));
- assertFalse(empty(header().uniqueItems(true).build()));
- assertFalse(empty(header().value("foo").build()));
+ assertTrue(HeaderAnnotation.empty(f1.getAnnotation(Header.class)));
+ assertTrue(HeaderAnnotation.empty(f2.getAnnotation(Header.class)));
+ assertTrue(HeaderAnnotation.empty((Header)null));
+ assertTrue(HeaderAnnotation.empty(header().build()));
+
+ assertFalse(HeaderAnnotation.empty(header()._default(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header()._enum(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().aev(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().allowEmptyValue(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().api(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().cf("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().collectionFormat("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().d(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().description(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().df(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().e(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().emax(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().emin(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().ex(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().example(a("foo")).build()));
+ assertFalse(HeaderAnnotation.empty(header().exclusiveMaximum(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().exclusiveMinimum(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().f("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().format("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().items(items().$ref("foo").build()).build()));
+ assertFalse(HeaderAnnotation.empty(header().max("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().maxi(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().maximum("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().maxItems(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().maxl(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().maxLength(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().min("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().mini(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().minimum("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().minItems(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().minl(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().minLength(0).build()));
+ assertFalse(HeaderAnnotation.empty(header().mo("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().multi(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().multipleOf("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().n("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().name("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().p("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().parser(OpenApiParser.class).build()));
+ assertFalse(HeaderAnnotation.empty(header().pattern("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().r(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().required(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().serializer(OpenApiSerializer.class).build()));
+ assertFalse(HeaderAnnotation.empty(header().sie(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().skipIfEmpty(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().t("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().type("foo").build()));
+ assertFalse(HeaderAnnotation.empty(header().ui(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().uniqueItems(true).build()));
+ assertFalse(HeaderAnnotation.empty(header().value("foo").build()));
}
@Test
@@ -311,13 +310,13 @@ public class AnnotationUtils_Test {
assertObject(license().build().annotationType()).json().contains("License");
- assertTrue(empty(x.license()));
- assertTrue(empty((License)null));
- assertTrue(empty(license().build()));
+ assertTrue(LicenseAnnotation.empty(x.license()));
+ assertTrue(LicenseAnnotation.empty((License)null));
+ assertTrue(LicenseAnnotation.empty(license().build()));
- assertFalse(empty(license().name("foo").build()));
- assertFalse(empty(license().url("foo").build()));
- assertFalse(empty(license().value(a("foo")).build()));
+ assertFalse(LicenseAnnotation.empty(license().name("foo").build()));
+ assertFalse(LicenseAnnotation.empty(license().url("foo").build()));
+ assertFalse(LicenseAnnotation.empty(license().value(a("foo")).build()));
}
@Test
@@ -327,56 +326,56 @@ public class AnnotationUtils_Test {
assertObject(path().build().annotationType()).json().contains("Path");
- assertTrue(empty(f1.getAnnotation(Path.class)));
- assertTrue(empty(f2.getAnnotation(Path.class)));
- assertTrue(empty((Path)null));
- assertTrue(empty(path().build()));
-
- assertFalse(empty(path()._enum(a("foo")).build()));
- assertFalse(empty(path().aev(true).build()));
- assertFalse(empty(path().allowEmptyValue(true).build()));
- assertFalse(empty(path().api(a("foo")).build()));
- assertFalse(empty(path().cf("foo").build()));
- assertFalse(empty(path().collectionFormat("foo").build()));
- assertFalse(empty(path().d(a("foo")).build()));
- assertFalse(empty(path().description(a("foo")).build()));
- assertFalse(empty(path().e(a("foo")).build()));
- assertFalse(empty(path().emax(true).build()));
- assertFalse(empty(path().emin(true).build()));
- assertFalse(empty(path().ex(a("foo")).build()));
- assertFalse(empty(path().example(a("foo")).build()));
- assertFalse(empty(path().exclusiveMaximum(true).build()));
- assertFalse(empty(path().exclusiveMinimum(true).build()));
- assertFalse(empty(path().f("foo").build()));
- assertFalse(empty(path().format("foo").build()));
- assertFalse(empty(path().items(items().$ref("foo").build()).build()));
- assertFalse(empty(path().max("foo").build()));
- assertFalse(empty(path().maxi(0).build()));
- assertFalse(empty(path().maximum("foo").build()));
- assertFalse(empty(path().maxItems(0).build()));
- assertFalse(empty(path().maxl(0).build()));
- assertFalse(empty(path().maxLength(0).build()));
- assertFalse(empty(path().min("foo").build()));
- assertFalse(empty(path().mini(0).build()));
- assertFalse(empty(path().minimum("foo").build()));
- assertFalse(empty(path().minItems(0).build()));
- assertFalse(empty(path().minl(0).build()));
- assertFalse(empty(path().minLength(0).build()));
- assertFalse(empty(path().mo("foo").build()));
- assertFalse(empty(path().multipleOf("foo").build()));
- assertFalse(empty(path().n("foo").build()));
- assertFalse(empty(path().name("foo").build()));
- assertFalse(empty(path().p("foo").build()));
- assertFalse(empty(path().parser(OpenApiParser.class).build()));
- assertFalse(empty(path().pattern("foo").build()));
- assertFalse(empty(path().r(false).build()));
- assertFalse(empty(path().required(false).build()));
- assertFalse(empty(path().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(path().t("foo").build()));
- assertFalse(empty(path().type("foo").build()));
- assertFalse(empty(path().ui(true).build()));
- assertFalse(empty(path().uniqueItems(true).build()));
- assertFalse(empty(path().value("foo").build()));
+ assertTrue(PathAnnotation.empty(f1.getAnnotation(Path.class)));
+ assertTrue(PathAnnotation.empty(f2.getAnnotation(Path.class)));
+ assertTrue(PathAnnotation.empty((Path)null));
+ assertTrue(PathAnnotation.empty(path().build()));
+
+ assertFalse(PathAnnotation.empty(path()._enum(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().aev(true).build()));
+ assertFalse(PathAnnotation.empty(path().allowEmptyValue(true).build()));
+ assertFalse(PathAnnotation.empty(path().api(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().cf("foo").build()));
+ assertFalse(PathAnnotation.empty(path().collectionFormat("foo").build()));
+ assertFalse(PathAnnotation.empty(path().d(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().description(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().e(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().emax(true).build()));
+ assertFalse(PathAnnotation.empty(path().emin(true).build()));
+ assertFalse(PathAnnotation.empty(path().ex(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().example(a("foo")).build()));
+ assertFalse(PathAnnotation.empty(path().exclusiveMaximum(true).build()));
+ assertFalse(PathAnnotation.empty(path().exclusiveMinimum(true).build()));
+ assertFalse(PathAnnotation.empty(path().f("foo").build()));
+ assertFalse(PathAnnotation.empty(path().format("foo").build()));
+ assertFalse(PathAnnotation.empty(path().items(items().$ref("foo").build()).build()));
+ assertFalse(PathAnnotation.empty(path().max("foo").build()));
+ assertFalse(PathAnnotation.empty(path().maxi(0).build()));
+ assertFalse(PathAnnotation.empty(path().maximum("foo").build()));
+ assertFalse(PathAnnotation.empty(path().maxItems(0).build()));
+ assertFalse(PathAnnotation.empty(path().maxl(0).build()));
+ assertFalse(PathAnnotation.empty(path().maxLength(0).build()));
+ assertFalse(PathAnnotation.empty(path().min("foo").build()));
+ assertFalse(PathAnnotation.empty(path().mini(0).build()));
+ assertFalse(PathAnnotation.empty(path().minimum("foo").build()));
+ assertFalse(PathAnnotation.empty(path().minItems(0).build()));
+ assertFalse(PathAnnotation.empty(path().minl(0).build()));
+ assertFalse(PathAnnotation.empty(path().minLength(0).build()));
+ assertFalse(PathAnnotation.empty(path().mo("foo").build()));
+ assertFalse(PathAnnotation.empty(path().multipleOf("foo").build()));
+ assertFalse(PathAnnotation.empty(path().n("foo").build()));
+ assertFalse(PathAnnotation.empty(path().name("foo").build()));
+ assertFalse(PathAnnotation.empty(path().p("foo").build()));
+ assertFalse(PathAnnotation.empty(path().parser(OpenApiParser.class).build()));
+ assertFalse(PathAnnotation.empty(path().pattern("foo").build()));
+ assertFalse(PathAnnotation.empty(path().r(false).build()));
+ assertFalse(PathAnnotation.empty(path().required(false).build()));
+ assertFalse(PathAnnotation.empty(path().serializer(OpenApiSerializer.class).build()));
+ assertFalse(PathAnnotation.empty(path().t("foo").build()));
+ assertFalse(PathAnnotation.empty(path().type("foo").build()));
+ assertFalse(PathAnnotation.empty(path().ui(true).build()));
+ assertFalse(PathAnnotation.empty(path().uniqueItems(true).build()));
+ assertFalse(PathAnnotation.empty(path().value("foo").build()));
}
@Test
@@ -391,24 +390,24 @@ public class AnnotationUtils_Test {
public void a11_Response() throws Exception {
assertObject(response().build().annotationType()).json().contains("Response");
- assertTrue(empty(A1.class.getAnnotation(Response.class)));
- assertTrue(empty(A2.class.getAnnotation(Response.class)));
- assertTrue(empty(response().build()));
- assertTrue(empty((Response)null));
-
- assertFalse(empty(response().api(a("foo")).build()));
- assertFalse(empty(response().code(a(0)).build()));
- assertFalse(empty(response().d(a("foo")).build()));
- assertFalse(empty(response().description(a("foo")).build()));
- assertFalse(empty(response().ex(a("foo")).build()));
- assertFalse(empty(response().example(a("foo")).build()));
- assertFalse(empty(response().examples(a("foo")).build()));
- assertFalse(empty(response().exs(a("foo")).build()));
- assertFalse(empty(response().headers(new ResponseHeader[]{responseHeader().$ref("foo").build()}).build()));
- assertFalse(empty(response().parser(OpenApiParser.class).build()));
- assertFalse(empty(response().schema(schema().$ref("foo").build()).build()));
- assertFalse(empty(response().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(response().value(a(0)).build()));
+ assertTrue(ResponseAnnotation.empty(A1.class.getAnnotation(Response.class)));
+ assertTrue(ResponseAnnotation.empty(A2.class.getAnnotation(Response.class)));
+ assertTrue(ResponseAnnotation.empty(response().build()));
+ assertTrue(ResponseAnnotation.empty((Response)null));
+
+ assertFalse(ResponseAnnotation.empty(response().api(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().code(a(0)).build()));
+ assertFalse(ResponseAnnotation.empty(response().d(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().description(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().ex(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().example(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().examples(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().exs(a("foo")).build()));
+ assertFalse(ResponseAnnotation.empty(response().headers(new ResponseHeader[]{responseHeader().$ref("foo").build()}).build()));
+ assertFalse(ResponseAnnotation.empty(response().parser(OpenApiParser.class).build()));
+ assertFalse(ResponseAnnotation.empty(response().schema(schema().$ref("foo").build()).build()));
+ assertFalse(ResponseAnnotation.empty(response().serializer(OpenApiSerializer.class).build()));
+ assertFalse(ResponseAnnotation.empty(response().value(a(0)).build()));
}
@Test
@@ -420,52 +419,52 @@ public class AnnotationUtils_Test {
public void a13_ResponseHeader() throws Exception {
assertObject(responseHeader().build().annotationType()).json().contains("ResponseHeader");
- assertTrue(empty(A1.class.getAnnotation(ResponseHeader.class)));
- assertTrue(empty(A2.class.getAnnotation(ResponseHeader.class)));
-
- assertFalse(empty(responseHeader()._default(a("foo")).build()));
- assertFalse(empty(responseHeader()._enum(a("foo")).build()));
- assertFalse(empty(responseHeader().api(a("foo")).build()));
- assertFalse(empty(responseHeader().code(a(0)).build()));
- assertFalse(empty(responseHeader().cf("foo").build()));
- assertFalse(empty(responseHeader().collectionFormat("foo").build()));
- assertFalse(empty(responseHeader().d(a("foo")).build()));
- assertFalse(empty(responseHeader().description(a("foo")).build()));
- assertFalse(empty(responseHeader().df(a("foo")).build()));
- assertFalse(empty(responseHeader().e(a("foo")).build()));
- assertFalse(empty(responseHeader().emax(true).build()));
- assertFalse(empty(responseHeader().emin(true).build()));
- assertFalse(empty(responseHeader().ex(a("foo")).build()));
- assertFalse(empty(responseHeader().example(a("foo")).build()));
- assertFalse(empty(responseHeader().exclusiveMaximum(true).build()));
- assertFalse(empty(responseHeader().exclusiveMinimum(true).build()));
- assertFalse(empty(responseHeader().f("foo").build()));
- assertFalse(empty(responseHeader().format("foo").build()));
- assertFalse(empty(responseHeader().items(items().$ref("foo").build()).build()));
- assertFalse(empty(responseHeader().max("foo").build()));
- assertFalse(empty(responseHeader().maxi(0).build()));
- assertFalse(empty(responseHeader().maximum("foo").build()));
- assertFalse(empty(responseHeader().maxItems(0).build()));
- assertFalse(empty(responseHeader().maxl(0).build()));
- assertFalse(empty(responseHeader().maxLength(0).build()));
- assertFalse(empty(responseHeader().min("foo").build()));
- assertFalse(empty(responseHeader().mini(0).build()));
- assertFalse(empty(responseHeader().minimum("foo").build()));
- assertFalse(empty(responseHeader().minItems(0).build()));
- assertFalse(empty(responseHeader().minl(0).build()));
- assertFalse(empty(responseHeader().minLength(0).build()));
- assertFalse(empty(responseHeader().mo("foo").build()));
- assertFalse(empty(responseHeader().multipleOf("foo").build()));
- assertFalse(empty(responseHeader().n("foo").build()));
- assertFalse(empty(responseHeader().name("foo").build()));
- assertFalse(empty(responseHeader().p("foo").build()));
- assertFalse(empty(responseHeader().pattern("foo").build()));
- assertFalse(empty(responseHeader().serializer(OpenApiSerializer.class).build()));
- assertFalse(empty(responseHeader().t("foo").build()));
- assertFalse(empty(responseHeader().type("foo").build()));
- assertFalse(empty(responseHeader().ui(true).build()));
- assertFalse(empty(responseHeader().uniqueItems(true).build()));
- assertFalse(empty(responseHeader().value("foo").build()));
+ assertTrue(ResponseHeaderAnnotation.empty(A1.class.getAnnotation(ResponseHeader.class)));
+ assertTrue(ResponseHeaderAnnotation.empty(A2.class.getAnnotation(ResponseHeader.class)));
+
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader()._default(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader()._enum(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().api(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().code(a(0)).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().cf("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().collectionFormat("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().d(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().description(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().df(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().e(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().emax(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().emin(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().ex(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().example(a("foo")).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().exclusiveMaximum(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().exclusiveMinimum(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().f("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().format("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().items(items().$ref("foo").build()).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().max("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().maxi(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().maximum("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().maxItems(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().maxl(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().maxLength(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().min("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().mini(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().minimum("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().minItems(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().minl(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().minLength(0).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().mo("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().multipleOf("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().n("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().name("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().p("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().pattern("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().serializer(OpenApiSerializer.class).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().t("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().type("foo").build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().ui(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().uniqueItems(true).build()));
+ assertFalse(ResponseHeaderAnnotation.empty(responseHeader().value("foo").build()));
}
@Test
@@ -489,12 +488,12 @@ public class AnnotationUtils_Test {
assertObject(externalDocs().build().annotationType()).json().contains("ExternalDocs");
- assertTrue(empty(x.externalDocs()));
- assertTrue(empty((ExternalDocs)null));
+ assertTrue(ExternalDocsAnnotation.empty(x.externalDocs()));
+ assertTrue(ExternalDocsAnnotation.empty((ExternalDocs)null));
- assertFalse(empty(externalDocs().description(a("foo")).build()));
- assertFalse(empty(externalDocs().url("foo").build()));
- assertFalse(empty(externalDocs().value(a("foo")).build()));
+ assertFalse(ExternalDocsAnnotation.empty(externalDocs().description(a("foo")).build()));
+ assertFalse(ExternalDocsAnnotation.empty(externalDocs().url("foo").build()));
+ assertFalse(ExternalDocsAnnotation.empty(externalDocs().value(a("foo")).build()));
}
@Test
@@ -503,66 +502,66 @@ public class AnnotationUtils_Test {
assertObject(schema().build().annotationType()).json().contains("Schema");
- assertTrue(empty(x.schema()));
- assertTrue(empty((Schema)null));
-
- assertFalse(empty(schema()._default(a("foo")).build()));
- assertFalse(empty(schema()._enum(a("foo")).build()));
- assertFalse(empty(schema().$ref("foo").build()));
- assertFalse(empty(schema().additionalProperties(a("foo")).build()));
- assertFalse(empty(schema().allOf(a("foo")).build()));
- assertFalse(empty(schema().cf("foo").build()));
- assertFalse(empty(schema().collectionFormat("foo").build()));
- assertFalse(empty(schema().d(a("foo")).build()));
- assertFalse(empty(schema().description(a("foo")).build()));
- assertFalse(empty(schema().df(a("foo")).build()));
- assertFalse(empty(schema().discriminator("foo").build()));
- assertFalse(empty(schema().e(a("foo")).build()));
- assertFalse(empty(schema().emax(true).build()));
- assertFalse(empty(schema().emin(true).build()));
- assertFalse(empty(schema().ex(a("foo")).build()));
- assertFalse(empty(schema().example(a("foo")).build()));
- assertFalse(empty(schema().examples(a("foo")).build()));
- assertFalse(empty(schema().exclusiveMaximum(true).build()));
- assertFalse(empty(schema().exclusiveMinimum(true).build()));
- assertFalse(empty(schema().exs(a("foo")).build()));
- assertFalse(empty(schema().externalDocs(externalDocs().url("foo").build()).build()));
- assertFalse(empty(schema().f("foo").build()));
- assertFalse(empty(schema().format("foo").build()));
- assertFalse(empty(schema().ignore(true).build()));
- assertFalse(empty(schema().items(items().$ref("foo").build()).build()));
- assertFalse(empty(schema().max("foo").build()));
- assertFalse(empty(schema().maxi(0).build()));
- assertFalse(empty(schema().maximum("foo").build()));
- assertFalse(empty(schema().maxItems(0).build()));
- assertFalse(empty(schema().maxl(0).build()));
- assertFalse(empty(schema().maxLength(0).build()));
- assertFalse(empty(schema().maxp(0).build()));
- assertFalse(empty(schema().maxProperties(0).build()));
- assertFalse(empty(schema().min("foo").build()));
- assertFalse(empty(schema().mini(0).build()));
- assertFalse(empty(schema().minimum("foo").build()));
- assertFalse(empty(schema().minItems(0).build()));
- assertFalse(empty(schema().minl(0).build()));
- assertFalse(empty(schema().minLength(0).build()));
- assertFalse(empty(schema().minp(0).build()));
- assertFalse(empty(schema().minProperties(0).build()));
- assertFalse(empty(schema().mo("foo").build()));
- assertFalse(empty(schema().multipleOf("foo").build()));
- assertFalse(empty(schema().p("foo").build()));
- assertFalse(empty(schema().pattern("foo").build()));
- assertFalse(empty(schema().properties(a("foo")).build()));
- assertFalse(empty(schema().r(true).build()));
- assertFalse(empty(schema().readOnly(true).build()));
- assertFalse(empty(schema().required(true).build()));
- assertFalse(empty(schema().ro(true).build()));
- assertFalse(empty(schema().t("foo").build()));
- assertFalse(empty(schema().title("foo").build()));
- assertFalse(empty(schema().type("foo").build()));
- assertFalse(empty(schema().ui(true).build()));
- assertFalse(empty(schema().uniqueItems(true).build()));
- assertFalse(empty(schema().value(a("foo")).build()));
- assertFalse(empty(schema().xml(a("foo")).build()));
+ assertTrue(SchemaAnnotation.empty(x.schema()));
+ assertTrue(SchemaAnnotation.empty((Schema)null));
+
+ assertFalse(SchemaAnnotation.empty(schema()._default(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema()._enum(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().$ref("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().additionalProperties(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().allOf(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().cf("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().collectionFormat("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().d(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().description(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().df(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().discriminator("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().e(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().emax(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().emin(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().ex(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().example(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().examples(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().exclusiveMaximum(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().exclusiveMinimum(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().exs(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().externalDocs(externalDocs().url("foo").build()).build()));
+ assertFalse(SchemaAnnotation.empty(schema().f("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().format("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().ignore(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().items(items().$ref("foo").build()).build()));
+ assertFalse(SchemaAnnotation.empty(schema().max("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxi(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().maximum("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxItems(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxl(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxLength(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxp(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().maxProperties(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().min("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().mini(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().minimum("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().minItems(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().minl(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().minLength(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().minp(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().minProperties(0).build()));
+ assertFalse(SchemaAnnotation.empty(schema().mo("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().multipleOf("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().p("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().pattern("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().properties(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().r(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().readOnly(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().required(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().ro(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().t("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().title("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().type("foo").build()));
+ assertFalse(SchemaAnnotation.empty(schema().ui(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().uniqueItems(true).build()));
+ assertFalse(SchemaAnnotation.empty(schema().value(a("foo")).build()));
+ assertFalse(SchemaAnnotation.empty(schema().xml(a("foo")).build()));
}
@Test
@@ -571,44 +570,44 @@ public class AnnotationUtils_Test {
assertObject(subItems().build().annotationType()).json().contains("SubItems");
- assertTrue(empty(x.subItems()));
- assertTrue(empty((SubItems)null));
-
- assertFalse(empty(subItems()._default(a("foo")).build()));
- assertFalse(empty(subItems()._enum(a("foo")).build()));
- assertFalse(empty(subItems().$ref("foo").build()));
- assertFalse(empty(subItems().cf("foo").build()));
- assertFalse(empty(subItems().collectionFormat("foo").build()));
- assertFalse(empty(subItems().df(a("foo")).build()));
- assertFalse(empty(subItems().e(a("foo")).build()));
- assertFalse(empty(subItems().emax(true).build()));
- assertFalse(empty(subItems().emin(true).build()));
- assertFalse(empty(subItems().exclusiveMaximum(true).build()));
- assertFalse(empty(subItems().exclusiveMinimum(true).build()));
- assertFalse(empty(subItems().f("foo").build()));
- assertFalse(empty(subItems().format("foo").build()));
- assertFalse(empty(subItems().items(a("foo")).build()));
- assertFalse(empty(subItems().max("foo").build()));
- assertFalse(empty(subItems().maxi(0).build()));
- assertFalse(empty(subItems().maximum("foo").build()));
- assertFalse(empty(subItems().maxItems(0).build()));
- assertFalse(empty(subItems().maxl(0).build()));
- assertFalse(empty(subItems().maxLength(0).build()));
- assertFalse(empty(subItems().min("foo").build()));
- assertFalse(empty(subItems().mini(0).build()));
- assertFalse(empty(subItems().minimum("foo").build()));
- assertFalse(empty(subItems().minItems(0).build()));
- assertFalse(empty(subItems().minl(0).build()));
- assertFalse(empty(subItems().minLength(0).build()));
- assertFalse(empty(subItems().mo("foo").build()));
- assertFalse(empty(subItems().multipleOf("foo").build()));
- assertFalse(empty(subItems().p("foo").build()));
- assertFalse(empty(subItems().pattern("foo").build()));
- assertFalse(empty(subItems().t("foo").build()));
- assertFalse(empty(subItems().type("foo").build()));
- assertFalse(empty(subItems().ui(true).build()));
- assertFalse(empty(subItems().uniqueItems(true).build()));
- assertFalse(empty(subItems().value(a("foo")).build()));
+ assertTrue(SubItemsAnnotation.empty(x.subItems()));
+ assertTrue(SubItemsAnnotation.empty((SubItems)null));
+
+ assertFalse(SubItemsAnnotation.empty(subItems()._default(a("foo")).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems()._enum(a("foo")).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().$ref("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().cf("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().collectionFormat("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().df(a("foo")).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().e(a("foo")).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().emax(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().emin(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().exclusiveMaximum(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().exclusiveMinimum(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().f("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().format("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().items(a("foo")).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().max("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().maxi(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().maximum("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().maxItems(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().maxl(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().maxLength(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().min("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().mini(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().minimum("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().minItems(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().minl(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().minLength(0).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().mo("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().multipleOf("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().p("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().pattern("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().t("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().type("foo").build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().ui(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().uniqueItems(true).build()));
+ assertFalse(SubItemsAnnotation.empty(subItems().value(a("foo")).build()));
}
@Test
@@ -617,176 +616,123 @@ public class AnnotationUtils_Test {
assertObject(items().build().annotationType()).json().contains("Items");
- assertTrue(empty(x.items()));
- assertTrue(empty((Items)null));
- assertFalse(empty(items()._default(a("foo")).build()));
- assertFalse(empty(items()._enum(a("foo")).build()));
- assertFalse(empty(items().$ref("foo").build()));
- assertFalse(empty(items().cf("foo").build()));
- assertFalse(empty(items().collectionFormat("foo").build()));
- assertFalse(empty(items().df(a("foo")).build()));
- assertFalse(empty(items().e(a("foo")).build()));
- assertFalse(empty(items().emax(true).build()));
- assertFalse(empty(items().emin(true).build()));
- assertFalse(empty(items().exclusiveMaximum(true).build()));
- assertFalse(empty(items().exclusiveMinimum(true).build()));
- assertFalse(empty(items().f("foo").build()));
- assertFalse(empty(items().format("foo").build()));
- assertFalse(empty(items().items(subItems().$ref("foo").build()).build()));
- assertFalse(empty(items().max("foo").build()));
- assertFalse(empty(items().maxi(0).build()));
- assertFalse(empty(items().maximum("foo").build()));
- assertFalse(empty(items().maxItems(0).build()));
- assertFalse(empty(items().maxl(0).build()));
- assertFalse(empty(items().maxLength(0).build()));
- assertFalse(empty(items().min("foo").build()));
- assertFalse(empty(items().mini(0).build()));
- assertFalse(empty(items().minimum("foo").build()));
- assertFalse(empty(items().minItems(0).build()));
- assertFalse(empty(items().minl(0).build()));
- assertFalse(empty(items().minLength(0).build()));
- assertFalse(empty(items().mo("foo").build()));
- assertFalse(empty(items().multipleOf("foo").build()));
- assertFalse(empty(items().p("foo").build()));
- assertFalse(empty(items().pattern("foo").build()));
- assertFalse(empty(items().t("foo").build()));
- assertFalse(empty(items().type("foo").build()));
- assertFalse(empty(items().ui(true).build()));
- assertFalse(empty(items().uniqueItems(true).build()));
- assertFalse(empty(items().value(a("foo")).build()));
- }
-
-
- @Test
- public void b01_allEmpty() {
- assertTrue(allEmpty(new String[0]));
- assertTrue(allEmpty(""));
- assertTrue(allEmpty(null,""));
- assertFalse(allEmpty(null,"","x"));
- assertTrue(allEmpty(new String[0],new String[0]));
- assertTrue(allEmpty(null,new String[0]));
- assertFalse(allEmpty(null,new String[]{""}));
- assertFalse(allEmpty(null,new String[]{"x"}));
- }
-
- @Test
- public void b02_allTrue() {
- assertTrue(allTrue());
- assertTrue(allTrue(true));
- assertTrue(allTrue(true,true));
- assertFalse(allTrue(false,true));
- assertFalse(allTrue(false));
- }
-
- @Test
- public void b03_allFalse() {
- assertTrue(allFalse());
- assertTrue(allFalse(false));
- assertTrue(allFalse(false,false));
- assertFalse(allFalse(false,true));
- assertFalse(allFalse(true));
- }
-
- @Test
- public void b04_allMinusOne() {
- assertTrue(allMinusOne());
- assertTrue(allMinusOne(-1));
- assertTrue(allMinusOne(-1,-1));
- assertFalse(allMinusOne(-1,0));
- assertFalse(allMinusOne(0));
- }
-
- @Test
- public void b05_allMinusOneLongs() {
- assertTrue(allMinusOne(-1l));
- assertTrue(allMinusOne(-1l,-1l));
- assertFalse(allMinusOne(-1l,0l));
- assertFalse(allMinusOne(0l));
- }
-
- @Test
- public void b06_other() throws Exception {
- new AnnotationUtils();
+ assertTrue(ItemsAnnotation.empty(x.items()));
+ assertTrue(ItemsAnnotation.empty((Items)null));
+ assertFalse(ItemsAnnotation.empty(items()._default(a("foo")).build()));
+ assertFalse(ItemsAnnotation.empty(items()._enum(a("foo")).build()));
+ assertFalse(ItemsAnnotation.empty(items().$ref("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().cf("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().collectionFormat("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().df(a("foo")).build()));
+ assertFalse(ItemsAnnotation.empty(items().e(a("foo")).build()));
+ assertFalse(ItemsAnnotation.empty(items().emax(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().emin(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().exclusiveMaximum(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().exclusiveMinimum(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().f("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().format("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().items(subItems().$ref("foo").build()).build()));
+ assertFalse(ItemsAnnotation.empty(items().max("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().maxi(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().maximum("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().maxItems(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().maxl(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().maxLength(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().min("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().mini(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().minimum("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().minItems(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().minl(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().minLength(0).build()));
+ assertFalse(ItemsAnnotation.empty(items().mo("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().multipleOf("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().p("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().pattern("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().t("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().type("foo").build()));
+ assertFalse(ItemsAnnotation.empty(items().ui(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().uniqueItems(true).build()));
+ assertFalse(ItemsAnnotation.empty(items().value(a("foo")).build()));
}
//-----------------------------------------------------------------------------------------------------------------
// Helper methods.
//-----------------------------------------------------------------------------------------------------------------
- private static BodyBuilder body() {
- return BodyBuilder.create();
+ private static BodyAnnotation.Builder body() {
+ return BodyAnnotation.create();
}
- private static ContactBuilder contact() {
- return ContactBuilder.create();
+ private static ContactAnnotation.Builder contact() {
+ return ContactAnnotation.create();
}
- private static FormDataBuilder formData() {
- return FormDataBuilder.create();
+ private static FormDataAnnotation.Builder formData() {
+ return FormDataAnnotation.create();
}
- private static HasFormDataBuilder hasFormData() {
- return HasFormDataBuilder.create();
+ private static HasFormDataAnnotation.Builder hasFormData() {
+ return HasFormDataAnnotation.create();
}
- private static QueryBuilder query() {
- return QueryBuilder.create();
+ private static QueryAnnotation.Builder query() {
+ return QueryAnnotation.create();
}
- private static HasQueryBuilder hasQuery() {
- return HasQueryBuilder.create();
+ private static HasQueryAnnotation.Builder hasQuery() {
+ return HasQueryAnnotation.create();
}
- private static HeaderBuilder header() {
- return HeaderBuilder.create();
+ private static HeaderAnnotation.Builder header() {
+ return HeaderAnnotation.create();
}
- private static LicenseBuilder license() {
- return LicenseBuilder.create();
+ private static LicenseAnnotation.Builder license() {
+ return LicenseAnnotation.create();
}
- private static PathBuilder path() {
- return PathBuilder.create();
+ private static PathAnnotation.Builder path() {
+ return PathAnnotation.create();
}
- private static RequestBuilder request() {
- return RequestBuilder.create();
+ private static RequestAnnotation.Builder request() {
+ return RequestAnnotation.create();
}
- private static ResponseBuilder response() {
- return ResponseBuilder.create();
+ private static ResponseAnnotation.Builder response() {
+ return ResponseAnnotation.create();
}
- private static ResponseBodyBuilder responseBody() {
- return ResponseBodyBuilder.create();
+ private static ResponseBodyAnnotation.Builder responseBody() {
+ return ResponseBodyAnnotation.create();
}
- private static ResponseHeaderBuilder responseHeader() {
- return ResponseHeaderBuilder.create();
+ private static ResponseHeaderAnnotation.Builder responseHeader() {
+ return ResponseHeaderAnnotation.create();
}
- private static ResponseStatusBuilder responseStatus() {
- return ResponseStatusBuilder.create();
+ private static ResponseStatusAnnotation.Builder responseStatus() {
+ return ResponseStatusAnnotation.create();
}
- private static TagBuilder tag() {
- return TagBuilder.create();
+ private static TagAnnotation.Builder tag() {
+ return TagAnnotation.create();
}
- private static SchemaBuilder schema() {
- return SchemaBuilder.create();
+ private static SchemaAnnotation.Builder schema() {
+ return SchemaAnnotation.create();
}
- private static ItemsBuilder items() {
- return ItemsBuilder.create();
+ private static ItemsAnnotation.Builder items() {
+ return ItemsAnnotation.create();
}
- private static SubItemsBuilder subItems() {
- return SubItemsBuilder.create();
+ private static SubItemsAnnotation.Builder subItems() {
+ return SubItemsAnnotation.create();
}
- private static ExternalDocsBuilder externalDocs() {
- return ExternalDocsBuilder.create();
+ private static ExternalDocsAnnotation.Builder externalDocs() {
+ return ExternalDocsAnnotation.create();
}
private static String[] a(String...s) {
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyAnnotation_Test.java
index f059798..b231459 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/BodyAnnotation_Test.java
@@ -21,9 +21,9 @@ import org.apache.juneau.jsonschema.annotation.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class BodyBuilder_Test {
+public class BodyAnnotation_Test {
- private static final String CNAME = BodyBuilder_Test.class.getName();
+ private static final String CNAME = BodyAnnotation_Test.class.getName();
public static class X1 {}
@@ -31,7 +31,7 @@ public class BodyBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Body a1 = BodyBuilder.create()
+ Body a1 = BodyAnnotation.create()
.api("api")
.d("d")
.description("description")
@@ -43,11 +43,11 @@ public class BodyBuilder_Test {
.onClass(X1.class)
.r(true)
.required(true)
- .schema(SchemaBuilder.create().build())
+ .schema(SchemaAnnotation.create().build())
.value("value")
.build();
- Body a2 = BodyBuilder.create()
+ Body a2 = BodyAnnotation.create()
.api("api")
.d("d")
.description("description")
@@ -59,7 +59,7 @@ public class BodyBuilder_Test {
.onClass(X1.class)
.r(true)
.required(true)
- .schema(SchemaBuilder.create().build())
+ .schema(SchemaAnnotation.create().build())
.value("value")
.build();
@@ -116,9 +116,9 @@ public class BodyBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Body c1 = BodyBuilder.create(C1.class).on(C2.class).build();
- Body c2 = BodyBuilder.create("a").on("b").build();
- Body c4 = BodyBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Body c1 = BodyAnnotation.create(C1.class).on(C2.class).build();
+ Body c2 = BodyAnnotation.create("a").on("b").build();
+ Body c4 = BodyAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactAnnotation_Test.java
similarity index 96%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactAnnotation_Test.java
index 0584731..91824e2 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ContactAnnotation_Test.java
@@ -20,20 +20,20 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ContactBuilder_Test {
+public class ContactAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Contact a1 = ContactBuilder.create()
+ Contact a1 = ContactAnnotation.create()
.email("email")
.name("name")
.url("url")
.value("value")
.build();
- Contact a2 = ContactBuilder.create()
+ Contact a2 = ContactAnnotation.create()
.email("email")
.name("name")
.url("url")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataAnnotation_Test.java
index cf0a585..a30f2f3 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/FormDataAnnotation_Test.java
@@ -22,9 +22,9 @@ import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class FormDataBuilder_Test {
+public class FormDataAnnotation_Test {
- private static final String CNAME = FormDataBuilder_Test.class.getName();
+ private static final String CNAME = FormDataAnnotation_Test.class.getName();
public static class X1 {}
@@ -32,7 +32,7 @@ public class FormDataBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- FormData a1 = FormDataBuilder.create()
+ FormData a1 = FormDataAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -52,7 +52,7 @@ public class FormDataBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -87,7 +87,7 @@ public class FormDataBuilder_Test {
.value("value")
.build();
- FormData a2 = FormDataBuilder.create()
+ FormData a2 = FormDataAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -107,7 +107,7 @@ public class FormDataBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -184,7 +184,7 @@ public class FormDataBuilder_Test {
+ "n:'n',"
+ "name:'name',"
+ "on:['on'],"
- + "onClass:['org.apache.juneau.http.annotation.FormDataBuilder_Test$X1'],"
+ + "onClass:['org.apache.juneau.http.annotation.FormDataAnnotation_Test$X1'],"
+ "p:'p',"
+ "parser:'org.apache.juneau.oapi.OpenApiParser',"
+ "pattern:'pattern',"
@@ -234,10 +234,10 @@ public class FormDataBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- FormData c1 = FormDataBuilder.create(C1.class).on(C2.class).build();
- FormData c2 = FormDataBuilder.create("a").on("b").build();
- FormData c3 = FormDataBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- FormData c4 = FormDataBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ FormData c1 = FormDataAnnotation.create(C1.class).on(C2.class).build();
+ FormData c2 = FormDataAnnotation.create("a").on("b").build();
+ FormData c3 = FormDataAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ FormData c4 = FormDataAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataAnnotation_Test.java
similarity index 95%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataAnnotation_Test.java
index 2807b9b..dffde71 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasFormDataAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class HasFormDataBuilder_Test {
+public class HasFormDataAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- HasFormData a1 = HasFormDataBuilder.create()
+ HasFormData a1 = HasFormDataAnnotation.create()
.n("n")
.name("name")
.value("value")
.build();
- HasFormData a2 = HasFormDataBuilder.create()
+ HasFormData a2 = HasFormDataAnnotation.create()
.n("n")
.name("name")
.value("value")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryAnnotation_Test.java
similarity index 95%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryAnnotation_Test.java
index da65518..beb9647 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HasQueryAnnotation_Test.java
@@ -20,7 +20,7 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class HasQueryBuilder_Test {
+public class HasQueryAnnotation_Test {
public static class X1 {}
@@ -28,13 +28,13 @@ public class HasQueryBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- HasQuery a1 = HasQueryBuilder.create()
+ HasQuery a1 = HasQueryAnnotation.create()
.n("n")
.name("name")
.value("value")
.build();
- HasQuery a2 = HasQueryBuilder.create()
+ HasQuery a2 = HasQueryAnnotation.create()
.n("n")
.name("name")
.value("value")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderAnnotation_Test.java
index 34f669f..2db6bd9 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/HeaderAnnotation_Test.java
@@ -17,21 +17,22 @@ import static org.junit.Assert.*;
import static org.junit.runners.MethodSorters.*;
import org.apache.juneau.*;
-import org.apache.juneau.http.annotation.FormDataBuilder_Test.*;
import org.apache.juneau.jsonschema.annotation.*;
import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class HeaderBuilder_Test {
+public class HeaderAnnotation_Test {
- private static final String CNAME = HeaderBuilder_Test.class.getName();
+ private static final String CNAME = HeaderAnnotation_Test.class.getName();
+
+ public static class X1 {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Header a1 = HeaderBuilder.create()
+ Header a1 = HeaderAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -51,7 +52,7 @@ public class HeaderBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -86,7 +87,7 @@ public class HeaderBuilder_Test {
.value("value")
.build();
- Header a2 = HeaderBuilder.create()
+ Header a2 = HeaderAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -106,7 +107,7 @@ public class HeaderBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -183,7 +184,7 @@ public class HeaderBuilder_Test {
+ "n:'n',"
+ "name:'name',"
+ "on:['on'],"
- + "onClass:['org.apache.juneau.http.annotation.FormDataBuilder_Test$X1'],"
+ + "onClass:['"+CNAME+"$X1'],"
+ "p:'p',"
+ "parser:'org.apache.juneau.oapi.OpenApiParser',"
+ "pattern:'pattern',"
@@ -233,10 +234,10 @@ public class HeaderBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Header c1 = HeaderBuilder.create(C1.class).on(C2.class).build();
- Header c2 = HeaderBuilder.create("a").on("b").build();
- Header c3 = HeaderBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Header c4 = HeaderBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Header c1 = HeaderAnnotation.create(C1.class).on(C2.class).build();
+ Header c2 = HeaderAnnotation.create("a").on("b").build();
+ Header c3 = HeaderAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Header c4 = HeaderAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseAnnotation_Test.java
similarity index 97%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseAnnotation_Test.java
index c6a6a44..4ff0425 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/LicenseAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class LicenseBuilder_Test {
+public class LicenseAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- License a1 = LicenseBuilder.create()
+ License a1 = LicenseAnnotation.create()
.name("name")
.url("url")
.value("value")
.build();
- License a2 = LicenseBuilder.create()
+ License a2 = LicenseAnnotation.create()
.name("name")
.url("url")
.value("value")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathAnnotation_Test.java
index 27b70af..a07a2af 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/PathAnnotation_Test.java
@@ -17,21 +17,22 @@ import static org.junit.Assert.*;
import static org.junit.runners.MethodSorters.*;
import org.apache.juneau.*;
-import org.apache.juneau.http.annotation.FormDataBuilder_Test.*;
import org.apache.juneau.jsonschema.annotation.*;
import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class PathBuilder_Test {
+public class PathAnnotation_Test {
- private static final String CNAME = PathBuilder_Test.class.getName();
+ private static final String CNAME = PathAnnotation_Test.class.getName();
+
+ public static class X1 {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Path a1 = PathBuilder.create()
+ Path a1 = PathAnnotation.create()
._enum("enum")
.aev(true)
.allowEmptyValue(true)
@@ -49,7 +50,7 @@ public class PathBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -81,7 +82,7 @@ public class PathBuilder_Test {
.value("value")
.build();
- Path a2 = PathBuilder.create()
+ Path a2 = PathAnnotation.create()
._enum("enum")
.aev(true)
.allowEmptyValue(true)
@@ -99,7 +100,7 @@ public class PathBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -170,7 +171,7 @@ public class PathBuilder_Test {
+ "n:'n',"
+ "name:'name',"
+ "on:['on'],"
- + "onClass:['org.apache.juneau.http.annotation.FormDataBuilder_Test$X1'],"
+ + "onClass:['"+CNAME+"$X1'],"
+ "p:'p',"
+ "parser:'org.apache.juneau.oapi.OpenApiParser',"
+ "pattern:'pattern',"
@@ -218,10 +219,10 @@ public class PathBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Path c1 = PathBuilder.create(C1.class).on(C2.class).build();
- Path c2 = PathBuilder.create("a").on("b").build();
- Path c3 = PathBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Path c4 = PathBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Path c1 = PathAnnotation.create(C1.class).on(C2.class).build();
+ Path c2 = PathAnnotation.create("a").on("b").build();
+ Path c3 = PathAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Path c4 = PathAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryAnnotation_Test.java
index 6d97575..f07532f 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/QueryAnnotation_Test.java
@@ -17,21 +17,22 @@ import static org.junit.Assert.*;
import static org.junit.runners.MethodSorters.*;
import org.apache.juneau.*;
-import org.apache.juneau.http.annotation.FormDataBuilder_Test.*;
import org.apache.juneau.jsonschema.annotation.*;
import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class QueryBuilder_Test {
+public class QueryAnnotation_Test {
- private static final String CNAME = QueryBuilder_Test.class.getName();
+ private static final String CNAME = QueryAnnotation_Test.class.getName();
+
+ public static class X1 {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Query a1 = QueryBuilder.create()
+ Query a1 = QueryAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -51,7 +52,7 @@ public class QueryBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -86,7 +87,7 @@ public class QueryBuilder_Test {
.value("value")
.build();
- Query a2 = QueryBuilder.create()
+ Query a2 = QueryAnnotation.create()
._default("default")
._enum("enum")
.aev(true)
@@ -106,7 +107,7 @@ public class QueryBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -183,7 +184,7 @@ public class QueryBuilder_Test {
+ "n:'n',"
+ "name:'name',"
+ "on:['on'],"
- + "onClass:['org.apache.juneau.http.annotation.FormDataBuilder_Test$X1'],"
+ + "onClass:['"+CNAME+"$X1'],"
+ "p:'p',"
+ "parser:'org.apache.juneau.oapi.OpenApiParser',"
+ "pattern:'pattern',"
@@ -233,10 +234,10 @@ public class QueryBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Query c1 = QueryBuilder.create(C1.class).on(C2.class).build();
- Query c2 = QueryBuilder.create("a").on("b").build();
- Query c3 = QueryBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Query c4 = QueryBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Query c1 = QueryAnnotation.create(C1.class).on(C2.class).build();
+ Query c2 = QueryAnnotation.create("a").on("b").build();
+ Query c3 = QueryAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Query c4 = QueryAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestAnnotation_Test.java
similarity index 94%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestAnnotation_Test.java
index 10ab3df..7a1f1c8 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/RequestAnnotation_Test.java
@@ -21,9 +21,9 @@ import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class RequestBuilder_Test {
+public class RequestAnnotation_Test {
- private static final String CNAME = RequestBuilder_Test.class.getName();
+ private static final String CNAME = RequestAnnotation_Test.class.getName();
public static class X1 {}
@@ -31,14 +31,14 @@ public class RequestBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Request a1 = RequestBuilder.create()
+ Request a1 = RequestAnnotation.create()
.on("on")
.onClass(X1.class)
.parser(OpenApiParser.class)
.serializer(OpenApiSerializer.class)
.build();
- Request a2 = RequestBuilder.create()
+ Request a2 = RequestAnnotation.create()
.on("on")
.onClass(X1.class)
.parser(OpenApiParser.class)
@@ -89,8 +89,8 @@ public class RequestBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Request c1 = RequestBuilder.create(C1.class).on(C2.class).build();
- Request c2 = RequestBuilder.create("a").on("b").build();
+ Request c1 = RequestAnnotation.create(C1.class).on(C2.class).build();
+ Request c2 = RequestAnnotation.create("a").on("b").build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseAnnotation_Test.java
similarity index 93%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseAnnotation_Test.java
index 91da1b0..f91a19c 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseAnnotation_Test.java
@@ -22,9 +22,9 @@ import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ResponseBuilder_Test {
+public class ResponseAnnotation_Test {
- private static final String CNAME = ResponseBuilder_Test.class.getName();
+ private static final String CNAME = ResponseAnnotation_Test.class.getName();
public static class X1 {}
@@ -32,7 +32,7 @@ public class ResponseBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Response a1 = ResponseBuilder.create()
+ Response a1 = ResponseAnnotation.create()
.api("api")
.code(1)
.d("d")
@@ -41,16 +41,16 @@ public class ResponseBuilder_Test {
.example("example")
.examples("examples")
.exs("exs")
- .headers(ResponseHeaderBuilder.DEFAULT)
+ .headers(ResponseHeaderAnnotation.DEFAULT)
.on("on")
.onClass(X1.class)
.parser(OpenApiParser.class)
- .schema(SchemaBuilder.DEFAULT)
+ .schema(SchemaAnnotation.DEFAULT)
.serializer(OpenApiSerializer.class)
.value(2)
.build();
- Response a2 = ResponseBuilder.create()
+ Response a2 = ResponseAnnotation.create()
.api("api")
.code(1)
.d("d")
@@ -59,11 +59,11 @@ public class ResponseBuilder_Test {
.example("example")
.examples("examples")
.exs("exs")
- .headers(ResponseHeaderBuilder.DEFAULT)
+ .headers(ResponseHeaderAnnotation.DEFAULT)
.on("on")
.onClass(X1.class)
.parser(OpenApiParser.class)
- .schema(SchemaBuilder.DEFAULT)
+ .schema(SchemaAnnotation.DEFAULT)
.serializer(OpenApiSerializer.class)
.value(2)
.build();
@@ -123,9 +123,9 @@ public class ResponseBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Response c1 = ResponseBuilder.create(C1.class).on(C2.class).build();
- Response c2 = ResponseBuilder.create("a").on("b").build();
- Response c4 = ResponseBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Response c1 = ResponseAnnotation.create(C1.class).on(C2.class).build();
+ Response c2 = ResponseAnnotation.create("a").on("b").build();
+ Response c4 = ResponseAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyAnnotation_Test.java
similarity index 89%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyAnnotation_Test.java
index b2ff2e7..7e57ae0 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseBodyAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ResponseBodyBuilder_Test {
+public class ResponseBodyAnnotation_Test {
- private static final String CNAME = ResponseBodyBuilder_Test.class.getName();
+ private static final String CNAME = ResponseBodyAnnotation_Test.class.getName();
public static class X1 {}
@@ -30,12 +30,12 @@ public class ResponseBodyBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- ResponseBody a1 = ResponseBodyBuilder.create()
+ ResponseBody a1 = ResponseBodyAnnotation.create()
.on("on")
.onClass(X1.class)
.build();
- ResponseBody a2 = ResponseBodyBuilder.create()
+ ResponseBody a2 = ResponseBodyAnnotation.create()
.on("on")
.onClass(X1.class)
.build();
@@ -82,9 +82,9 @@ public class ResponseBodyBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- ResponseBody c1 = ResponseBodyBuilder.create(C1.class).on(C2.class).build();
- ResponseBody c2 = ResponseBodyBuilder.create("a").on("b").build();
- ResponseBody c4 = ResponseBodyBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ ResponseBody c1 = ResponseBodyAnnotation.create(C1.class).on(C2.class).build();
+ ResponseBody c2 = ResponseBodyAnnotation.create("a").on("b").build();
+ ResponseBody c4 = ResponseBodyAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderAnnotation_Test.java
similarity index 92%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderAnnotation_Test.java
index a718cda..fb9cb8f 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseHeaderAnnotation_Test.java
@@ -17,21 +17,22 @@ import static org.junit.Assert.*;
import static org.junit.runners.MethodSorters.*;
import org.apache.juneau.*;
-import org.apache.juneau.http.annotation.FormDataBuilder_Test.*;
import org.apache.juneau.jsonschema.annotation.*;
import org.apache.juneau.oapi.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ResponseHeaderBuilder_Test {
+public class ResponseHeaderAnnotation_Test {
- private static final String CNAME = ResponseHeaderBuilder_Test.class.getName();
+ private static final String CNAME = ResponseHeaderAnnotation_Test.class.getName();
+
+ public static class X1 {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- ResponseHeader a1 = ResponseHeaderBuilder.create()
+ ResponseHeader a1 = ResponseHeaderAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
@@ -51,7 +52,7 @@ public class ResponseHeaderBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -80,7 +81,7 @@ public class ResponseHeaderBuilder_Test {
.value("value")
.build();
- ResponseHeader a2 = ResponseHeaderBuilder.create()
+ ResponseHeader a2 = ResponseHeaderAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
@@ -100,7 +101,7 @@ public class ResponseHeaderBuilder_Test {
.exclusiveMinimum(true)
.f("f")
.format("format")
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -170,7 +171,7 @@ public class ResponseHeaderBuilder_Test {
+ "n:'n',"
+ "name:'name',"
+ "on:['on'],"
- + "onClass:['org.apache.juneau.http.annotation.FormDataBuilder_Test$X1'],"
+ + "onClass:['"+CNAME+"$X1'],"
+ "p:'p',"
+ "pattern:'pattern',"
+ "serializer:'org.apache.juneau.oapi.OpenApiSerializer',"
@@ -215,9 +216,9 @@ public class ResponseHeaderBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- ResponseHeader c1 = ResponseHeaderBuilder.create(C1.class).on(C2.class).build();
- ResponseHeader c2 = ResponseHeaderBuilder.create("a").on("b").build();
- ResponseHeader c4 = ResponseHeaderBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ ResponseHeader c1 = ResponseHeaderAnnotation.create(C1.class).on(C2.class).build();
+ ResponseHeader c2 = ResponseHeaderAnnotation.create("a").on("b").build();
+ ResponseHeader c4 = ResponseHeaderAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusAnnotation_Test.java
similarity index 89%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusAnnotation_Test.java
index faeefda..f288c59 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/ResponseStatusAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ResponseStatusBuilder_Test {
+public class ResponseStatusAnnotation_Test {
- private static final String CNAME = ResponseStatusBuilder_Test.class.getName();
+ private static final String CNAME = ResponseStatusAnnotation_Test.class.getName();
public static class X1 {}
@@ -30,12 +30,12 @@ public class ResponseStatusBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- ResponseStatus a1 = ResponseStatusBuilder.create()
+ ResponseStatus a1 = ResponseStatusAnnotation.create()
.on("on")
.onClass(X1.class)
.build();
- ResponseStatus a2 = ResponseStatusBuilder.create()
+ ResponseStatus a2 = ResponseStatusAnnotation.create()
.on("on")
.onClass(X1.class)
.build();
@@ -82,9 +82,9 @@ public class ResponseStatusBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- ResponseStatus c1 = ResponseStatusBuilder.create(C1.class).on(C2.class).build();
- ResponseStatus c2 = ResponseStatusBuilder.create("a").on("b").build();
- ResponseStatus c4 = ResponseStatusBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ ResponseStatus c1 = ResponseStatusAnnotation.create(C1.class).on(C2.class).build();
+ ResponseStatus c2 = ResponseStatusAnnotation.create("a").on("b").build();
+ ResponseStatus c4 = ResponseStatusAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagAnnotation_Test.java
similarity index 95%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagAnnotation_Test.java
index 3084219..19c8ffb 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/http/annotation/TagAnnotation_Test.java
@@ -21,22 +21,22 @@ import org.apache.juneau.jsonschema.annotation.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class TagBuilder_Test {
+public class TagAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Tag a1 = TagBuilder.create()
+ Tag a1 = TagAnnotation.create()
.description("description")
- .externalDocs(ExternalDocsBuilder.DEFAULT)
+ .externalDocs(ExternalDocsAnnotation.DEFAULT)
.name("name")
.value("value")
.build();
- Tag a2 = TagBuilder.create()
+ Tag a2 = TagAnnotation.create()
.description("description")
- .externalDocs(ExternalDocsBuilder.DEFAULT)
+ .externalDocs(ExternalDocsAnnotation.DEFAULT)
.name("name")
.value("value")
.build();
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfAnnotation_Test.java
similarity index 88%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfAnnotation_Test.java
index 670a888..d956137 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jena/annotation/RdfAnnotation_Test.java
@@ -21,15 +21,15 @@ import org.apache.juneau.jena.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class RdfBuilder_Test {
+public class RdfAnnotation_Test {
- private static final String CNAME = RdfBuilder_Test.class.getName();
+ private static final String CNAME = RdfAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Rdf a1 = RdfBuilder.create()
+ Rdf a1 = RdfAnnotation.create()
.beanUri(true)
.collectionFormat(RdfCollectionFormat.BAG)
.namespace("c")
@@ -37,7 +37,7 @@ public class RdfBuilder_Test {
.prefix("e")
.build();
- Rdf a2 = RdfBuilder.create()
+ Rdf a2 = RdfAnnotation.create()
.beanUri(true)
.collectionFormat(RdfCollectionFormat.BAG)
.namespace("c")
@@ -91,10 +91,10 @@ public class RdfBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Rdf c1 = RdfBuilder.create(C1.class).on(C2.class).build();
- Rdf c2 = RdfBuilder.create("a").on("b").build();
- Rdf c3 = RdfBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Rdf c4 = RdfBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Rdf c1 = RdfAnnotation.create(C1.class).on(C2.class).build();
+ Rdf c2 = RdfAnnotation.create("a").on("b").build();
+ Rdf c3 = RdfAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Rdf c4 = RdfAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java
index 66c6982..c9ed1cf 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jso/annotation/JsoAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class JsoBuilder_Test {
+public class JsoAnnotation_Test {
- private static final String CNAME = JsoBuilder_Test.class.getName();
+ private static final String CNAME = JsoAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Jso a1 = JsoBuilder.create()
+ Jso a1 = JsoAnnotation.create()
.on("a")
.build();
- Jso a2 = JsoBuilder.create()
+ Jso a2 = JsoAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class JsoBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Jso c1 = JsoBuilder.create(C1.class).on(C2.class).build();
- Jso c2 = JsoBuilder.create("a").on("b").build();
- Jso c3 = JsoBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Jso c4 = JsoBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Jso c1 = JsoAnnotation.create(C1.class).on(C2.class).build();
+ Jso c2 = JsoAnnotation.create("a").on("b").build();
+ Jso c3 = JsoAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Jso c4 = JsoAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonAnnotation_Test.java
index 1bbd00f..a6458a0 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/json/annotation/JsonAnnotation_Test.java
@@ -20,20 +20,20 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class JsonBuilder_Test {
+public class JsonAnnotation_Test {
- private static final String CNAME = JsonBuilder_Test.class.getName();
+ private static final String CNAME = JsonAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Json a1 = JsonBuilder.create()
+ Json a1 = JsonAnnotation.create()
.on("a")
.wrapperAttr("b")
.build();
- Json a2 = JsonBuilder.create()
+ Json a2 = JsonAnnotation.create()
.on("a")
.wrapperAttr("b")
.build();
@@ -81,10 +81,10 @@ public class JsonBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Json c1 = JsonBuilder.create(C1.class).on(C2.class).build();
- Json c2 = JsonBuilder.create("a").on("b").build();
- Json c3 = JsonBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Json c4 = JsonBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Json c1 = JsonAnnotation.create(C1.class).on(C2.class).build();
+ Json c2 = JsonAnnotation.create("a").on("b").build();
+ Json c3 = JsonAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Json c4 = JsonAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsAnnotation_Test.java
similarity index 94%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsAnnotation_Test.java
index 7cacf63..28a4e2c 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ExternalDocsAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ExternalDocsBuilder_Test {
+public class ExternalDocsAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- ExternalDocs a1 = ExternalDocsBuilder.create()
+ ExternalDocs a1 = ExternalDocsAnnotation.create()
.description("description")
.url("url")
.value("value")
.build();
- ExternalDocs a2 = ExternalDocsBuilder.create()
+ ExternalDocs a2 = ExternalDocsAnnotation.create()
.description("description")
.url("url")
.value("value")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsAnnotation_Test.java
similarity index 95%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsAnnotation_Test.java
index 60f5254..ad4b4ad 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/ItemsAnnotation_Test.java
@@ -20,13 +20,13 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class ItemsBuilder_Test {
+public class ItemsAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Items a1 = ItemsBuilder.create()
+ Items a1 = ItemsAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
@@ -63,7 +63,7 @@ public class ItemsBuilder_Test {
.value("value")
.build();
- Items a2 = ItemsBuilder.create()
+ Items a2 = ItemsAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaAnnotation_Test.java
similarity index 90%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaAnnotation_Test.java
index 2dc480e..58cc6cd 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SchemaAnnotation_Test.java
@@ -20,9 +20,9 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class SchemaBuilder_Test {
+public class SchemaAnnotation_Test {
- private static final String CNAME = SchemaBuilder_Test.class.getName();
+ private static final String CNAME = SchemaAnnotation_Test.class.getName();
private static class X1 {}
@@ -30,7 +30,7 @@ public class SchemaBuilder_Test {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Schema a1 = SchemaBuilder.create()
+ Schema a1 = SchemaAnnotation.create()
._default("default")
._enum("enum")
.$ref("$ref")
@@ -51,11 +51,11 @@ public class SchemaBuilder_Test {
.exclusiveMaximum(true)
.exclusiveMinimum(true)
.exs("exs")
- .externalDocs(ExternalDocsBuilder.DEFAULT)
+ .externalDocs(ExternalDocsAnnotation.DEFAULT)
.f("f")
.format("format")
.ignore(true)
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -92,7 +92,7 @@ public class SchemaBuilder_Test {
.xml("xml")
.build();
- Schema a2 = SchemaBuilder.create()
+ Schema a2 = SchemaAnnotation.create()
._default("default")
._enum("enum")
.$ref("$ref")
@@ -113,11 +113,11 @@ public class SchemaBuilder_Test {
.exclusiveMaximum(true)
.exclusiveMinimum(true)
.exs("exs")
- .externalDocs(ExternalDocsBuilder.DEFAULT)
+ .externalDocs(ExternalDocsAnnotation.DEFAULT)
.f("f")
.format("format")
.ignore(true)
- .items(ItemsBuilder.DEFAULT)
+ .items(ItemsAnnotation.DEFAULT)
.max("max")
.maxi(1)
.maximum("maximum")
@@ -253,10 +253,10 @@ public class SchemaBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Schema c1 = SchemaBuilder.create(C1.class).on(C2.class).build();
- Schema c2 = SchemaBuilder.create("a").on("b").build();
- Schema c3 = SchemaBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Schema c4 = SchemaBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Schema c1 = SchemaAnnotation.create(C1.class).on(C2.class).build();
+ Schema c2 = SchemaAnnotation.create("a").on("b").build();
+ Schema c3 = SchemaAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Schema c4 = SchemaAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsAnnotation_Test.java
similarity index 94%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsAnnotation_Test.java
index aca7106..d7ca7a1 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/jsonschema/annotation/SubItemsAnnotation_Test.java
@@ -20,13 +20,13 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class SubItemsBuilder_Test {
+public class SubItemsAnnotation_Test {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- SubItems a1 = SubItemsBuilder.create()
+ SubItems a1 = SubItemsAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
@@ -63,7 +63,7 @@ public class SubItemsBuilder_Test {
.value("value")
.build();
- SubItems a2 = SubItemsBuilder.create()
+ SubItems a2 = SubItemsAnnotation.create()
.$ref("$ref")
._default("default")
._enum("enum")
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation_Test.java
index 090e1a5..f866f88 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class MsgPackBuilder_Test {
+public class MsgPackAnnotation_Test {
- private static final String CNAME = MsgPackBuilder_Test.class.getName();
+ private static final String CNAME = MsgPackAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- MsgPack a1 = MsgPackBuilder.create()
+ MsgPack a1 = MsgPackAnnotation.create()
.on("a")
.build();
- MsgPack a2 = MsgPackBuilder.create()
+ MsgPack a2 = MsgPackAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class MsgPackBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- MsgPack c1 = MsgPackBuilder.create(C1.class).on(C2.class).build();
- MsgPack c2 = MsgPackBuilder.create("a").on("b").build();
- MsgPack c3 = MsgPackBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- MsgPack c4 = MsgPackBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ MsgPack c1 = MsgPackAnnotation.create(C1.class).on(C2.class).build();
+ MsgPack c2 = MsgPackAnnotation.create("a").on("b").build();
+ MsgPack c3 = MsgPackAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ MsgPack c4 = MsgPackAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation_Test.java
index dd5151b..0f75735 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class OpenApiBuilder_Test {
+public class OpenApiAnnotation_Test {
- private static final String CNAME = OpenApiBuilder_Test.class.getName();
+ private static final String CNAME = OpenApiAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- OpenApi a1 = OpenApiBuilder.create()
+ OpenApi a1 = OpenApiAnnotation.create()
.on("a")
.build();
- OpenApi a2 = OpenApiBuilder.create()
+ OpenApi a2 = OpenApiAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class OpenApiBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- OpenApi c1 = OpenApiBuilder.create(C1.class).on(C2.class).build();
- OpenApi c2 = OpenApiBuilder.create("a").on("b").build();
- OpenApi c3 = OpenApiBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- OpenApi c4 = OpenApiBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ OpenApi c1 = OpenApiAnnotation.create(C1.class).on(C2.class).build();
+ OpenApi c2 = OpenApiAnnotation.create("a").on("b").build();
+ OpenApi c3 = OpenApiAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ OpenApi c4 = OpenApiAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation_Test.java
index 9292288..c787351 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class PlainTextBuilder_Test {
+public class PlainTextAnnotation_Test {
- private static final String CNAME = PlainTextBuilder_Test.class.getName();
+ private static final String CNAME = PlainTextAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- PlainText a1 = PlainTextBuilder.create()
+ PlainText a1 = PlainTextAnnotation.create()
.on("a")
.build();
- PlainText a2 = PlainTextBuilder.create()
+ PlainText a2 = PlainTextAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class PlainTextBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- PlainText c1 = PlainTextBuilder.create(C1.class).on(C2.class).build();
- PlainText c2 = PlainTextBuilder.create("a").on("b").build();
- PlainText c3 = PlainTextBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- PlainText c4 = PlainTextBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ PlainText c1 = PlainTextAnnotation.create(C1.class).on(C2.class).build();
+ PlainText c2 = PlainTextAnnotation.create("a").on("b").build();
+ PlainText c3 = PlainTextAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ PlainText c4 = PlainTextAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlAnnotation_Test.java
index 6eb3e38..7972e5a 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/soap/annotation/SoapXmlAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class SoapXmlBuilder_Test {
+public class SoapXmlAnnotation_Test {
- private static final String CNAME = SoapXmlBuilder_Test.class.getName();
+ private static final String CNAME = SoapXmlAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- SoapXml a1 = SoapXmlBuilder.create()
+ SoapXml a1 = SoapXmlAnnotation.create()
.on("a")
.build();
- SoapXml a2 = SoapXmlBuilder.create()
+ SoapXml a2 = SoapXmlAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class SoapXmlBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- SoapXml c1 = SoapXmlBuilder.create(C1.class).on(C2.class).build();
- SoapXml c2 = SoapXmlBuilder.create("a").on("b").build();
- SoapXml c3 = SoapXmlBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- SoapXml c4 = SoapXmlBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ SoapXml c1 = SoapXmlAnnotation.create(C1.class).on(C2.class).build();
+ SoapXml c2 = SoapXmlAnnotation.create("a").on("b").build();
+ SoapXml c3 = SoapXmlAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ SoapXml c4 = SoapXmlAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonAnnotation_Test.java
similarity index 87%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonAnnotation_Test.java
index 2b5d36e..bf23efe 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/uon/annotation/UonAnnotation_Test.java
@@ -20,19 +20,19 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class UonBuilder_Test {
+public class UonAnnotation_Test {
- private static final String CNAME = UonBuilder_Test.class.getName();
+ private static final String CNAME = UonAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Uon a1 = UonBuilder.create()
+ Uon a1 = UonAnnotation.create()
.on("a")
.build();
- Uon a2 = UonBuilder.create()
+ Uon a2 = UonAnnotation.create()
.on("a")
.build();
@@ -78,10 +78,10 @@ public class UonBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Uon c1 = UonBuilder.create(C1.class).on(C2.class).build();
- Uon c2 = UonBuilder.create("a").on("b").build();
- Uon c3 = UonBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Uon c4 = UonBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Uon c1 = UonAnnotation.create(C1.class).on(C2.class).build();
+ Uon c2 = UonAnnotation.create("a").on("b").build();
+ Uon c3 = UonAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Uon c4 = UonAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingAnnotation_Test.java
similarity index 86%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingAnnotation_Test.java
index 365410e..0c0a25f 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/urlencoding/annotation/UrlEncodingAnnotation_Test.java
@@ -20,20 +20,20 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class UrlEncodingBuilder_Test {
+public class UrlEncodingAnnotation_Test {
- private static final String CNAME = UrlEncodingBuilder_Test.class.getName();
+ private static final String CNAME = UrlEncodingAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- UrlEncoding a1 = UrlEncodingBuilder.create()
+ UrlEncoding a1 = UrlEncodingAnnotation.create()
.expandedParams(true)
.on("a")
.build();
- UrlEncoding a2 = UrlEncodingBuilder.create()
+ UrlEncoding a2 = UrlEncodingAnnotation.create()
.expandedParams(true)
.on("a")
.build();
@@ -81,10 +81,10 @@ public class UrlEncodingBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- UrlEncoding c1 = UrlEncodingBuilder.create(C1.class).on(C2.class).build();
- UrlEncoding c2 = UrlEncodingBuilder.create("a").on("b").build();
- UrlEncoding c3 = UrlEncodingBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- UrlEncoding c4 = UrlEncodingBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ UrlEncoding c1 = UrlEncodingAnnotation.create(C1.class).on(C2.class).build();
+ UrlEncoding c2 = UrlEncodingAnnotation.create("a").on("b").build();
+ UrlEncoding c3 = UrlEncodingAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ UrlEncoding c4 = UrlEncodingAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlBuilder_Test.java b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlAnnotation_Test.java
similarity index 88%
rename from juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlBuilder_Test.java
rename to juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlAnnotation_Test.java
index 5cfc505..b960dea 100644
--- a/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlBuilder_Test.java
+++ b/juneau-core/juneau-core-utest/src/test/java/org/apache/juneau/xml/annotation/XmlAnnotation_Test.java
@@ -20,15 +20,15 @@ import org.apache.juneau.*;
import org.junit.*;
@FixMethodOrder(NAME_ASCENDING)
-public class XmlBuilder_Test {
+public class XmlAnnotation_Test {
- private static final String CNAME = XmlBuilder_Test.class.getName();
+ private static final String CNAME = XmlAnnotation_Test.class.getName();
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Xml a1 = XmlBuilder.create()
+ Xml a1 = XmlAnnotation.create()
.childName("a")
.format(XmlFormat.ATTR)
.namespace("c")
@@ -36,7 +36,7 @@ public class XmlBuilder_Test {
.prefix("e")
.build();
- Xml a2 = XmlBuilder.create()
+ Xml a2 = XmlAnnotation.create()
.childName("a")
.format(XmlFormat.ATTR)
.namespace("c")
@@ -90,10 +90,10 @@ public class XmlBuilder_Test {
@Test
public void c01_otherMethods() throws Exception {
- Xml c1 = XmlBuilder.create(C1.class).on(C2.class).build();
- Xml c2 = XmlBuilder.create("a").on("b").build();
- Xml c3 = XmlBuilder.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
- Xml c4 = XmlBuilder.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
+ Xml c1 = XmlAnnotation.create(C1.class).on(C2.class).build();
+ Xml c2 = XmlAnnotation.create("a").on("b").build();
+ Xml c3 = XmlAnnotation.create().on(C1.class.getField("f1")).on(C2.class.getField("f2")).build();
+ Xml c4 = XmlAnnotation.create().on(C1.class.getMethod("m1")).on(C2.class.getMethod("m2")).build();
assertObject(c1).json().contains("on:['"+CNAME+"$C1','"+CNAME+"$C2']");
assertObject(c2).json().contains("on:['a','b']");
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
index 9d4f502..f56f3e1 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/Rdf.java
@@ -17,6 +17,7 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
+import org.apache.juneau.annotation.*;
import org.apache.juneau.jena.*;
/**
@@ -39,6 +40,8 @@ import org.apache.juneau.jena.*;
@Target({PACKAGE,TYPE,FIELD,METHOD})
@Retention(RUNTIME)
@Inherited
+@Repeatable(RdfAnnotation.Array.class)
+@PropertyStoreApply(RdfAnnotation.Apply.class)
public @interface Rdf {
/**
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java
new file mode 100644
index 0000000..7dc5770
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java
@@ -0,0 +1,268 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.jena.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.annotation.*;
+import org.apache.juneau.jena.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Rdf @Rdf} annotation.
+ */
+public class RdfAnnotation {
+
+ /** Default value */
+ public static final Rdf DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Rdf copy(Rdf a, VarResolverSession r) {
+ return
+ create()
+ .beanUri(r.resolve(a.beanUri()))
+ .collectionFormat(a.collectionFormat())
+ .namespace(r.resolve(a.namespace()))
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .prefix(r.resolve(a.prefix()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Rdf} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTMFBuilder {
+
+ String namespace="", prefix="";
+ boolean beanUri;
+ RdfCollectionFormat collectionFormat=RdfCollectionFormat.DEFAULT;
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Rdf.class);
+ }
+
+ /**
+ * Instantiates a new {@link Rdf @Rdf} object initialized with this builder.
+ *
+ * @return A new {@link Rdf @Rdf} object.
+ */
+ public Rdf build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Rdf#beanUri} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder beanUri(boolean value) {
+ this.beanUri = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Rdf#collectionFormat} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder collectionFormat(RdfCollectionFormat value) {
+ this.collectionFormat = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Rdf#namespace} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder namespace(String value) {
+ this.namespace = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Rdf#prefix} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder prefix(String value) {
+ this.prefix = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Rdf {
+
+ private final boolean beanUri;
+ private final RdfCollectionFormat collectionFormat;
+ private final String namespace, prefix;
+
+ Impl(Builder b) {
+ super(b);
+ this.beanUri = b.beanUri;
+ this.collectionFormat = b.collectionFormat;
+ this.namespace = b.namespace;
+ this.prefix = b.prefix;
+ postConstruct();
+ }
+
+ @Override /* Rdf */
+ public boolean beanUri() {
+ return beanUri;
+ }
+
+ @Override /* Rdf */
+ public RdfCollectionFormat collectionFormat() {
+ return collectionFormat;
+ }
+
+ @Override /* Rdf */
+ public String namespace() {
+ return namespace;
+ }
+
+ @Override /* Rdf */
+ public String prefix() {
+ return prefix;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Rdf} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Rdf> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Rdf> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Rdf> ai, PropertyStoreBuilder psb) {
+ Rdf a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Rdf @Rdf annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Rdf[] value();
+ }
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfArray.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfArray.java
deleted file mode 100644
index caecba5..0000000
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jena.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Rdf @Rdf annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface RdfArray {
-
- /**
- * The child annotations.
- */
- Rdf[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfBuilder.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfBuilder.java
deleted file mode 100644
index a147fd9..0000000
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfBuilder.java
+++ /dev/null
@@ -1,197 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jena.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.jena.*;
-
-/**
- * Builder class for the {@link Rdf} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class RdfBuilder extends TargetedAnnotationTMFBuilder {
-
- /** Default value */
- public static final Rdf DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static RdfBuilder create() {
- return new RdfBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static RdfBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static RdfBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements Rdf {
-
- private final boolean beanUri;
- private final RdfCollectionFormat collectionFormat;
- private final String namespace, prefix;
-
- Impl(RdfBuilder b) {
- super(b);
- this.beanUri = b.beanUri;
- this.collectionFormat = b.collectionFormat;
- this.namespace = b.namespace;
- this.prefix = b.prefix;
- postConstruct();
- }
-
- @Override /* Rdf */
- public boolean beanUri() {
- return beanUri;
- }
-
- @Override /* Rdf */
- public RdfCollectionFormat collectionFormat() {
- return collectionFormat;
- }
-
- @Override /* Rdf */
- public String namespace() {
- return namespace;
- }
-
- @Override /* Rdf */
- public String prefix() {
- return prefix;
- }
- }
-
-
- String namespace="", prefix="";
- boolean beanUri;
- RdfCollectionFormat collectionFormat=RdfCollectionFormat.DEFAULT;
-
- /**
- * Constructor.
- */
- public RdfBuilder() {
- super(Rdf.class);
- }
-
- /**
- * Instantiates a new {@link Rdf @Rdf} object initialized with this builder.
- *
- * @return A new {@link Rdf @Rdf} object.
- */
- public Rdf build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Rdf#beanUri} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public RdfBuilder beanUri(boolean value) {
- this.beanUri = value;
- return this;
- }
-
- /**
- * Sets the {@link Rdf#collectionFormat} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public RdfBuilder collectionFormat(RdfCollectionFormat value) {
- this.collectionFormat = value;
- return this;
- }
-
- /**
- * Sets the {@link Rdf#namespace} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public RdfBuilder namespace(String value) {
- this.namespace = value;
- return this;
- }
-
- /**
- * Sets the {@link Rdf#prefix} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public RdfBuilder prefix(String value) {
- this.prefix = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public RdfBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public RdfBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public RdfBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public RdfBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public RdfBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfig.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfig.java
index ea2b7c6..30a305c 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfig.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfig.java
@@ -33,7 +33,7 @@ import org.apache.juneau.xml.annotation.*;
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Inherited
-@PropertyStoreApply(RdfConfigApply.class)
+@PropertyStoreApply(RdfConfigAnnotation.Apply.class)
public @interface RdfConfig {
/**
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigAnnotation.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigAnnotation.java
new file mode 100644
index 0000000..73dc85a
--- /dev/null
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigAnnotation.java
@@ -0,0 +1,122 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.jena.annotation;
+
+import static org.apache.juneau.BeanContext.*;
+import static org.apache.juneau.jena.RdfCommon.*;
+import static org.apache.juneau.jena.RdfParser.*;
+import static org.apache.juneau.jena.RdfSerializer.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link RdfConfig @RdfConfig} annotation.
+ */
+public class RdfConfigAnnotation {
+
+ /**
+ * Applies {@link RdfConfig} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<RdfConfig> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<RdfConfig> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<RdfConfig> ai, PropertyStoreBuilder psb) {
+ RdfConfig a = ai.getAnnotation();
+ if (! a.language().isEmpty())
+ psb.set(RDF_language, string(a.language()));
+ if (! a.juneauNs().isEmpty())
+ psb.set(RDF_juneauNs, string(a.juneauNs()));
+ if (! a.juneauBpNs().isEmpty())
+ psb.set(RDF_juneauBpNs, string(a.juneauBpNs()));
+ if (! a.useXmlNamespaces().isEmpty())
+ psb.set(RDF_useXmlNamespaces, bool(a.useXmlNamespaces()));
+ if (! a.arp_iriRules().isEmpty())
+ psb.set(RDF_arp_iriRules, string(a.arp_iriRules()));
+ if (! a.arp_errorMode().isEmpty())
+ psb.set(RDF_arp_errorMode, string(a.arp_errorMode()));
+ if (! a.arp_embedding().isEmpty())
+ psb.set(RDF_arp_embedding, bool(a.arp_embedding()));
+ if (! a.rdfxml_xmlBase().isEmpty())
+ psb.set(RDF_rdfxml_xmlBase, string(a.rdfxml_xmlBase()));
+ if (! a.rdfxml_longId().isEmpty())
+ psb.set(RDF_rdfxml_longId, bool(a.rdfxml_longId()));
+ if (! a.rdfxml_allowBadUris().isEmpty())
+ psb.set(RDF_rdfxml_allowBadUris, bool(a.rdfxml_allowBadUris()));
+ if (! a.rdfxml_relativeUris().isEmpty())
+ psb.set(RDF_rdfxml_relativeUris, string(a.rdfxml_relativeUris()));
+ if (! a.rdfxml_showXmlDeclaration().isEmpty())
+ psb.set(RDF_rdfxml_showXmlDeclaration, string(a.rdfxml_showXmlDeclaration()));
+ if (! a.rdfxml_showDoctypeDeclaration().isEmpty())
+ psb.set(RDF_rdfxml_showDoctypeDeclaration, bool(a.rdfxml_showDoctypeDeclaration()));
+ if (! a.rdfxml_tab().isEmpty())
+ psb.set(RDF_rdfxml_tab, integer(a.rdfxml_tab(), "rdfxml_tab"));
+ if (! a.rdfxml_attributeQuoteChar().isEmpty())
+ psb.set(RDF_rdfxml_attributeQuoteChar, string(a.rdfxml_attributeQuoteChar()));
+ if (! a.rdfxml_blockRules().isEmpty())
+ psb.set(RDF_rdfxml_blockRules, string(a.rdfxml_blockRules()));
+ if (! a.n3_minGap().isEmpty())
+ psb.set(RDF_n3_minGap, integer(a.n3_minGap(), "n3_minGap"));
+ if (! a.n3_objectLists().isEmpty())
+ psb.set(RDF_n3_objectLists, bool(a.n3_objectLists()));
+ if (! a.n3_subjectColumn().isEmpty())
+ psb.set(RDF_n3_subjectColumn, integer(a.n3_subjectColumn(), "n3_subjectColumn"));
+ if (! a.n3_propertyColumn().isEmpty())
+ psb.set(RDF_n3_propertyColumn, integer(a.n3_propertyColumn(), "n3_propertyColumn"));
+ if (! a.n3_indentProperty().isEmpty())
+ psb.set(RDF_n3_indentProperty, integer(a.n3_indentProperty(), "n3_indentProperty"));
+ if (! a.n3_widePropertyLen().isEmpty())
+ psb.set(RDF_n3_widePropertyLen, integer(a.n3_widePropertyLen(), "n3_widePropertyLen"));
+ if (! a.n3_abbrevBaseUri().isEmpty())
+ psb.set(RDF_n3_abbrevBaseUri, bool(a.n3_abbrevBaseUri()));
+ if (! a.n3_usePropertySymbols().isEmpty())
+ psb.set(RDF_n3_usePropertySymbols, bool(a.n3_usePropertySymbols()));
+ if (! a.n3_useTripleQuotedStrings().isEmpty())
+ psb.set(RDF_n3_useTripleQuotedStrings, bool(a.n3_useTripleQuotedStrings()));
+ if (! a.n3_useDoubles().isEmpty())
+ psb.set(RDF_n3_useDoubles, bool(a.n3_useDoubles()));
+ if (! a.collectionFormat().isEmpty())
+ psb.set(RDF_collectionFormat, string(a.collectionFormat()));
+ if (! a.looseCollections().isEmpty())
+ psb.set(RDF_looseCollections, bool(a.looseCollections()));
+
+ if (! a.addBeanTypes().isEmpty())
+ psb.set(RDF_addBeanTypes, bool(a.addBeanTypes()));
+ if (! a.addLiteralTypes().isEmpty())
+ psb.set(RDF_addLiteralTypes, bool(a.addLiteralTypes()));
+ if (! a.addRootProperty().isEmpty())
+ psb.set(RDF_addRootProperty, bool(a.addRootProperty()));
+ if (! a.autoDetectNamespaces().isEmpty())
+ psb.set(RDF_autoDetectNamespaces, bool(a.autoDetectNamespaces()));
+ if (a.namespaces().length > 0)
+ psb.set(RDF_namespaces, strings(a.namespaces()));
+
+ if (! a.trimWhitespace().isEmpty())
+ psb.set(RDF_trimWhitespace, bool(a.trimWhitespace()));
+
+ if (a.applyRdf().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyRdf());
+ }
+ }
+}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigApply.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigApply.java
deleted file mode 100644
index b6fc300..0000000
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfConfigApply.java
+++ /dev/null
@@ -1,115 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.jena.annotation;
-
-import static org.apache.juneau.jena.RdfCommon.*;
-import static org.apache.juneau.jena.RdfSerializer.*;
-import static org.apache.juneau.jena.RdfParser.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Applies {@link RdfConfig} annotations to a {@link PropertyStoreBuilder}.
- */
-public class RdfConfigApply extends ConfigApply<RdfConfig> {
-
- /**
- * Constructor.
- *
- * @param c The annotation class.
- * @param r The resolver for resolving values in annotations.
- */
- public RdfConfigApply(Class<RdfConfig> c, VarResolverSession r) {
- super(c, r);
- }
-
- @Override
- public void apply(AnnotationInfo<RdfConfig> ai, PropertyStoreBuilder psb) {
- RdfConfig a = ai.getAnnotation();
- if (! a.language().isEmpty())
- psb.set(RDF_language, string(a.language()));
- if (! a.juneauNs().isEmpty())
- psb.set(RDF_juneauNs, string(a.juneauNs()));
- if (! a.juneauBpNs().isEmpty())
- psb.set(RDF_juneauBpNs, string(a.juneauBpNs()));
- if (! a.useXmlNamespaces().isEmpty())
- psb.set(RDF_useXmlNamespaces, bool(a.useXmlNamespaces()));
- if (! a.arp_iriRules().isEmpty())
- psb.set(RDF_arp_iriRules, string(a.arp_iriRules()));
- if (! a.arp_errorMode().isEmpty())
- psb.set(RDF_arp_errorMode, string(a.arp_errorMode()));
- if (! a.arp_embedding().isEmpty())
- psb.set(RDF_arp_embedding, bool(a.arp_embedding()));
- if (! a.rdfxml_xmlBase().isEmpty())
- psb.set(RDF_rdfxml_xmlBase, string(a.rdfxml_xmlBase()));
- if (! a.rdfxml_longId().isEmpty())
- psb.set(RDF_rdfxml_longId, bool(a.rdfxml_longId()));
- if (! a.rdfxml_allowBadUris().isEmpty())
- psb.set(RDF_rdfxml_allowBadUris, bool(a.rdfxml_allowBadUris()));
- if (! a.rdfxml_relativeUris().isEmpty())
- psb.set(RDF_rdfxml_relativeUris, string(a.rdfxml_relativeUris()));
- if (! a.rdfxml_showXmlDeclaration().isEmpty())
- psb.set(RDF_rdfxml_showXmlDeclaration, string(a.rdfxml_showXmlDeclaration()));
- if (! a.rdfxml_showDoctypeDeclaration().isEmpty())
- psb.set(RDF_rdfxml_showDoctypeDeclaration, bool(a.rdfxml_showDoctypeDeclaration()));
- if (! a.rdfxml_tab().isEmpty())
- psb.set(RDF_rdfxml_tab, integer(a.rdfxml_tab(), "rdfxml_tab"));
- if (! a.rdfxml_attributeQuoteChar().isEmpty())
- psb.set(RDF_rdfxml_attributeQuoteChar, string(a.rdfxml_attributeQuoteChar()));
- if (! a.rdfxml_blockRules().isEmpty())
- psb.set(RDF_rdfxml_blockRules, string(a.rdfxml_blockRules()));
- if (! a.n3_minGap().isEmpty())
- psb.set(RDF_n3_minGap, integer(a.n3_minGap(), "n3_minGap"));
- if (! a.n3_objectLists().isEmpty())
- psb.set(RDF_n3_objectLists, bool(a.n3_objectLists()));
- if (! a.n3_subjectColumn().isEmpty())
- psb.set(RDF_n3_subjectColumn, integer(a.n3_subjectColumn(), "n3_subjectColumn"));
- if (! a.n3_propertyColumn().isEmpty())
- psb.set(RDF_n3_propertyColumn, integer(a.n3_propertyColumn(), "n3_propertyColumn"));
- if (! a.n3_indentProperty().isEmpty())
- psb.set(RDF_n3_indentProperty, integer(a.n3_indentProperty(), "n3_indentProperty"));
- if (! a.n3_widePropertyLen().isEmpty())
- psb.set(RDF_n3_widePropertyLen, integer(a.n3_widePropertyLen(), "n3_widePropertyLen"));
- if (! a.n3_abbrevBaseUri().isEmpty())
- psb.set(RDF_n3_abbrevBaseUri, bool(a.n3_abbrevBaseUri()));
- if (! a.n3_usePropertySymbols().isEmpty())
- psb.set(RDF_n3_usePropertySymbols, bool(a.n3_usePropertySymbols()));
- if (! a.n3_useTripleQuotedStrings().isEmpty())
- psb.set(RDF_n3_useTripleQuotedStrings, bool(a.n3_useTripleQuotedStrings()));
- if (! a.n3_useDoubles().isEmpty())
- psb.set(RDF_n3_useDoubles, bool(a.n3_useDoubles()));
- if (! a.collectionFormat().isEmpty())
- psb.set(RDF_collectionFormat, string(a.collectionFormat()));
- if (! a.looseCollections().isEmpty())
- psb.set(RDF_looseCollections, bool(a.looseCollections()));
-
- if (! a.addBeanTypes().isEmpty())
- psb.set(RDF_addBeanTypes, bool(a.addBeanTypes()));
- if (! a.addLiteralTypes().isEmpty())
- psb.set(RDF_addLiteralTypes, bool(a.addLiteralTypes()));
- if (! a.addRootProperty().isEmpty())
- psb.set(RDF_addRootProperty, bool(a.addRootProperty()));
- if (! a.autoDetectNamespaces().isEmpty())
- psb.set(RDF_autoDetectNamespaces, bool(a.autoDetectNamespaces()));
- if (a.namespaces().length > 0)
- psb.set(RDF_namespaces, strings(a.namespaces()));
-
- if (! a.trimWhitespace().isEmpty())
- psb.set(RDF_trimWhitespace, bool(a.trimWhitespace()));
-
- if (a.applyRdf().length > 0)
- psb.prependTo(BEAN_annotations, a.applyRdf());
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
index 6ef3a5e..18165a7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
@@ -223,27 +223,27 @@ public class BeanContext extends Context implements MetaProvider {
* The following is the list of builders for annotations that can be constructed and passed into the builder
* class:
* <ul class='javatree'>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeancBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanIgnoreBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanpBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.ExampleBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.NamePropertyBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.ParentPropertyBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.SwapBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.UriBuilder}
- * <li class='ja'>{@link org.apache.juneau.csv.annotation.CsvBuilder}
- * <li class='ja'>{@link org.apache.juneau.html.annotation.HtmlBuilder}
- * <li class='ja'>{@link org.apache.juneau.jso.annotation.JsoBuilder}
- * <li class='ja'>{@link org.apache.juneau.json.annotation.JsonBuilder}
- * <li class='ja'>{@link org.apache.juneau.jsonschema.annotation.SchemaBuilder}
- * <li class='ja'>{@link org.apache.juneau.msgpack.annotation.MsgPackBuilder}
- * <li class='ja'>{@link org.apache.juneau.oapi.annotation.OpenApiBuilder}
- * <li class='ja'>{@link org.apache.juneau.plaintext.annotation.PlainTextBuilder}
- * <li class='ja'>{@link org.apache.juneau.soap.annotation.SoapXmlBuilder}
- * <li class='ja'>{@link org.apache.juneau.uon.annotation.UonBuilder}
- * <li class='ja'>{@link org.apache.juneau.urlencoding.annotation.UrlEncodingBuilder}
- * <li class='ja'>{@link org.apache.juneau.xml.annotation.XmlBuilder}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeancAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanIgnoreAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanpAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.ExampleAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.NamePropertyAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.ParentPropertyAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.SwapAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.UriAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.csv.annotation.CsvAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.html.annotation.HtmlAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.jso.annotation.JsoAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.json.annotation.JsonAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.jsonschema.annotation.SchemaAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.msgpack.annotation.MsgPackAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.oapi.annotation.OpenApiAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.plaintext.annotation.PlainTextAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.soap.annotation.SoapXmlAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.uon.annotation.UonAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.urlencoding.annotation.UrlEncodingAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.xml.annotation.XmlAnnotation}
* </ul>
*
* <p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
index 0ef366a..9ed67d7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextBuilder.java
@@ -145,27 +145,27 @@ public class BeanContextBuilder extends ContextBuilder {
* The following is the list of annotations builders provided that can be constructed
* and passed into the builder class:
* <ul class='javatree'>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeancBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanIgnoreBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanpBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.ExampleBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.NamePropertyBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.ParentPropertyBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.SwapBuilder}
- * <li class='ja'>{@link org.apache.juneau.annotation.UriBuilder}
- * <li class='ja'>{@link org.apache.juneau.csv.annotation.CsvBuilder}
- * <li class='ja'>{@link org.apache.juneau.html.annotation.HtmlBuilder}
- * <li class='ja'>{@link org.apache.juneau.jso.annotation.JsoBuilder}
- * <li class='ja'>{@link org.apache.juneau.json.annotation.JsonBuilder}
- * <li class='ja'>{@link org.apache.juneau.jsonschema.annotation.SchemaBuilder}
- * <li class='ja'>{@link org.apache.juneau.msgpack.annotation.MsgPackBuilder}
- * <li class='ja'>{@link org.apache.juneau.oapi.annotation.OpenApiBuilder}
- * <li class='ja'>{@link org.apache.juneau.plaintext.annotation.PlainTextBuilder}
- * <li class='ja'>{@link org.apache.juneau.soap.annotation.SoapXmlBuilder}
- * <li class='ja'>{@link org.apache.juneau.uon.annotation.UonBuilder}
- * <li class='ja'>{@link org.apache.juneau.urlencoding.annotation.UrlEncodingBuilder}
- * <li class='ja'>{@link org.apache.juneau.xml.annotation.XmlBuilder}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeancAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanIgnoreAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.BeanpAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.ExampleAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.NamePropertyAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.ParentPropertyAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.SwapAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.annotation.UriAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.csv.annotation.CsvAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.html.annotation.HtmlAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.jso.annotation.JsoAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.json.annotation.JsonAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.jsonschema.annotation.SchemaAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.msgpack.annotation.MsgPackAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.oapi.annotation.OpenApiAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.plaintext.annotation.PlainTextAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.soap.annotation.SoapXmlAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.uon.annotation.UonAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.urlencoding.annotation.UrlEncodingAnnotation}
+ * <li class='ja'>{@link org.apache.juneau.xml.annotation.XmlAnnotation}
* </ul>
*
* <p>
@@ -496,7 +496,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanInterceptor(Class<?> on, Class<? extends BeanInterceptor<?>> value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).interceptor(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).interceptor(value).build());
}
/**
@@ -859,7 +859,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanProperties(Class<?> beanClass, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClass).p(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClass).p(properties).build());
}
/**
@@ -922,7 +922,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder beanProperties(Map<String,Object> values) {
for (Map.Entry<String,Object> e : values.entrySet())
- prependTo(BEAN_annotations, BeanBuilder.create(e.getKey()).p(stringify(e.getValue())).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(e.getKey()).p(stringify(e.getValue())).build());
return this;
}
@@ -985,7 +985,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanProperties(String beanClassName, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClassName).p(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClassName).p(properties).build());
}
/**
@@ -1037,7 +1037,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesExcludes(Class<?> beanClass, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClass).xp(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClass).xp(properties).build());
}
/**
@@ -1092,7 +1092,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder beanPropertiesExcludes(Map<String,Object> values) {
for (Map.Entry<String,Object> e : values.entrySet())
- prependTo(BEAN_annotations, BeanBuilder.create(e.getKey()).xp(stringify(e.getValue())).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(e.getKey()).xp(stringify(e.getValue())).build());
return this;
}
@@ -1147,7 +1147,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesExcludes(String beanClassName, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClassName).xp(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClassName).xp(properties).build());
}
/**
@@ -1202,7 +1202,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesReadOnly(Class<?> beanClass, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClass).ro(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClass).ro(properties).build());
}
/**
@@ -1260,7 +1260,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder beanPropertiesReadOnly(Map<String,Object> values) {
for (Map.Entry<String,Object> e : values.entrySet())
- prependTo(BEAN_annotations, BeanBuilder.create(e.getKey()).ro(stringify(e.getValue())).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(e.getKey()).ro(stringify(e.getValue())).build());
return this;
}
@@ -1318,7 +1318,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesReadOnly(String beanClassName, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClassName).ro(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClassName).ro(properties).build());
}
/**
@@ -1372,7 +1372,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesWriteOnly(Class<?> beanClass, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClass).wo(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClass).wo(properties).build());
}
/**
@@ -1429,7 +1429,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder beanPropertiesWriteOnly(Map<String,Object> values) {
for (Map.Entry<String,Object> e : values.entrySet())
- prependTo(BEAN_annotations, BeanBuilder.create(e.getKey()).wo(stringify(e.getValue())).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(e.getKey()).wo(stringify(e.getValue())).build());
return this;
}
@@ -1486,7 +1486,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder beanPropertiesWriteOnly(String beanClassName, String properties) {
- return prependTo(BEAN_annotations, BeanBuilder.create(beanClassName).wo(properties).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(beanClassName).wo(properties).build());
}
/**
@@ -1630,7 +1630,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder dictionaryOn(Class<?> on, Class<?>...values) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).dictionary(values).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).dictionary(values).build());
}
/**
@@ -1678,7 +1678,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public <T> BeanContextBuilder example(Class<T> pojoClass, T o) {
- return annotations(MarshalledBuilder.create(pojoClass).example(SimpleJson.DEFAULT.toString(o)).build());
+ return annotations(MarshalledAnnotation.create(pojoClass).example(SimpleJson.DEFAULT.toString(o)).build());
}
/**
@@ -1727,7 +1727,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public <T> BeanContextBuilder example(Class<T> pojoClass, String json) {
- return annotations(MarshalledBuilder.create(pojoClass).example(json).build());
+ return annotations(MarshalledAnnotation.create(pojoClass).example(json).build());
}
/**
@@ -1821,7 +1821,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder fluentSetters(Class<?> on) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).fluentSetters(true).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).fluentSetters(true).build());
}
/**
@@ -2125,7 +2125,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder implClass(Class<?> interfaceClass, Class<?> implClass) {
- return annotations(MarshalledBuilder.create(interfaceClass).implClass(implClass).build());
+ return annotations(MarshalledAnnotation.create(interfaceClass).implClass(implClass).build());
}
/**
@@ -2171,7 +2171,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder implClasses(Map<Class<?>,Class<?>> values) {
for (Map.Entry<Class<?>,Class<?>> e : values.entrySet())
- annotations(MarshalledBuilder.create(e.getKey()).implClass(e.getValue()).build());
+ annotations(MarshalledAnnotation.create(e.getKey()).implClass(e.getValue()).build());
return this;
}
@@ -2218,7 +2218,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder interfaceClass(Class<?> on, Class<?> value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).interfaceClass(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).interfaceClass(value).build());
}
/**
@@ -2264,7 +2264,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder interfaces(Class<?>...value) {
for (Class<?> v : value)
- prependTo(BEAN_annotations, BeanBuilder.create(v).interfaceClass(v).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(v).interfaceClass(v).build());
return this;
}
@@ -2485,7 +2485,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder propertyNamer(Class<?> on, Class<? extends PropertyNamer> value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).propertyNamer(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).propertyNamer(value).build());
}
/**
@@ -2578,7 +2578,7 @@ public class BeanContextBuilder extends ContextBuilder {
@FluentSetter
public BeanContextBuilder sortProperties(Class<?>...on) {
for (Class<?> c : on)
- prependTo(BEAN_annotations, BeanBuilder.create(c).sort(true).build());
+ prependTo(BEAN_annotations, BeanAnnotation.create(c).sort(true).build());
return this;
}
@@ -2624,7 +2624,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder stopClass(Class<?> on, Class<?> value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).stopClass(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).stopClass(value).build());
}
/**
@@ -2766,7 +2766,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder typeName(Class<?> on, String value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).typeName(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).typeName(value).build());
}
/**
@@ -2865,7 +2865,7 @@ public class BeanContextBuilder extends ContextBuilder {
*/
@FluentSetter
public BeanContextBuilder typePropertyName(Class<?> on, String value) {
- return prependTo(BEAN_annotations, BeanBuilder.create(on).typePropertyName(value).build());
+ return prependTo(BEAN_annotations, BeanAnnotation.create(on).typePropertyName(value).build());
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigApply.java
index 699e3a6..df3b2a2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ConfigApply.java
@@ -15,6 +15,7 @@ package org.apache.juneau;
import static org.apache.juneau.internal.StringUtils.*;
import java.lang.annotation.*;
+import java.lang.reflect.*;
import java.util.*;
import org.apache.juneau.annotation.*;
@@ -45,6 +46,15 @@ public abstract class ConfigApply<T extends Annotation> {
}
/**
+ * Returns the var resolver that was added to this object.
+ *
+ * @return The var resolver that was added to this object.
+ */
+ protected VarResolverSession getVarResolver() {
+ return r;
+ }
+
+ /**
* Apply the specified annotation to the specified property store builder.
*
* @param a The annotation.
@@ -176,6 +186,16 @@ public abstract class ConfigApply<T extends Annotation> {
}
/**
+ * Convenience method for detecting if an array is empty.
+ *
+ * @param value The array to check.
+ * @return <jk>true</jk> if the specified array is empty.
+ */
+ protected boolean isEmpty(Object value) {
+ return Array.getLength(value) == 0;
+ }
+
+ /**
* Represents a no-op configuration apply.
*/
public static class NoOp extends ConfigApply<Annotation> {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
index 501ae23..0144c71 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
@@ -40,8 +40,8 @@ import org.apache.juneau.transform.*;
@Target({METHOD,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(BeanArray.class)
-@PropertyStoreApply(BeanApply.class)
+@Repeatable(BeanAnnotation.Array.class)
+@PropertyStoreApply(BeanAnnotation.Apply.class)
public @interface Bean {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanAnnotation.java
new file mode 100644
index 0000000..847c42c
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanAnnotation.java
@@ -0,0 +1,531 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+import static org.apache.juneau.internal.ArrayUtils.*;
+
+import java.lang.annotation.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+import org.apache.juneau.transform.*;
+
+/**
+ * Utility classes and methods for the {@link Bean @Bean} annotation.
+ */
+public class BeanAnnotation {
+
+ /** Default value */
+ public static final Bean DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Bean copy(Bean a, VarResolverSession r) {
+ return
+ create()
+ .dictionary(a.dictionary())
+ .example(r.resolve(a.example()))
+ .excludeProperties(r.resolve(a.excludeProperties()))
+ .fluentSetters(a.fluentSetters())
+ .implClass(a.implClass())
+ .interceptor(a.interceptor())
+ .interfaceClass(a.interfaceClass())
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .p(r.resolve(a.p()))
+ .properties(r.resolve(a.properties()))
+ .propertyNamer(a.propertyNamer())
+ .readOnlyProperties(r.resolve(a.readOnlyProperties()))
+ .ro(r.resolve(a.ro()))
+ .sort(a.sort())
+ .stopClass(a.stopClass())
+ .typeName(r.resolve(a.typeName()))
+ .typePropertyName(r.resolve(a.typePropertyName()))
+ .wo(r.resolve(a.wo()))
+ .writeOnlyProperties(r.resolve(a.writeOnlyProperties()))
+ .xp(r.resolve(a.xp()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Bean} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTBuilder {
+
+ Class<?>[] dictionary = new Class[0];
+ Class<?> implClass=Null.class, interfaceClass=Null.class, stopClass=Null.class;
+ Class<? extends BeanInterceptor<?>> interceptor=BeanInterceptor.Default.class;
+ Class<? extends PropertyNamer> propertyNamer=BasicPropertyNamer.class;
+ String example="", excludeProperties="", p="", properties="", readOnlyProperties="", ro="", typeName="", typePropertyName="", wo="", writeOnlyProperties="", xp="";
+ boolean fluentSetters, sort;
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Bean.class);
+ }
+
+ /**
+ * Instantiates a new {@link Bean @Bean} object initialized with this builder.
+ *
+ * @return A new {@link Bean @Bean} object.
+ */
+ public Bean build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Bean#dictionary()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder dictionary(Class<?>...value) {
+ this.dictionary = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#example()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder example(String value) {
+ this.example = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#excludeProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder excludeProperties(String value) {
+ this.excludeProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#fluentSetters()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder fluentSetters(boolean value) {
+ this.fluentSetters = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#implClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder implClass(Class<?> value) {
+ this.implClass = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#interceptor()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder interceptor(Class<? extends BeanInterceptor<?>> value) {
+ this.interceptor = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#interfaceClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder interfaceClass(Class<?> value) {
+ this.interfaceClass = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#properties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder properties(String value) {
+ this.properties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#p()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder p(String value) {
+ this.p = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#propertyNamer()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder propertyNamer(Class<? extends PropertyNamer> value) {
+ this.propertyNamer = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#readOnlyProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder readOnlyProperties(String value) {
+ this.readOnlyProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#ro()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder ro(String value) {
+ this.ro = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#sort()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder sort(boolean value) {
+ this.sort = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#stopClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder stopClass(Class<?> value) {
+ this.stopClass = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#typeName()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder typeName(String value) {
+ this.typeName = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#typePropertyName()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder typePropertyName(String value) {
+ this.typePropertyName = value;
+ return this;
+ }
+
+ /**
+ * Sets the{@link Bean#wo()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder wo(String value) {
+ this.wo = value;
+ return this;
+ }
+
+ /**
+ * Sets the{@link Bean#writeOnlyProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder writeOnlyProperties(String value) {
+ this.writeOnlyProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Bean#xp()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder xp(String value) {
+ this.xp = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Bean {
+
+ private final boolean fluentSetters, sort;
+ private final Class<? extends BeanInterceptor<?>> interceptor;
+ private final Class<? extends PropertyNamer> propertyNamer;
+ private final Class<?> implClass, interfaceClass, stopClass;
+ private final Class<?>[] dictionary;
+ private final String example, excludeProperties, p, properties, readOnlyProperties, ro, typeName, typePropertyName, wo, writeOnlyProperties, xp;
+
+ Impl(Builder b) {
+ super(b);
+ this.dictionary = copyOf(b.dictionary);
+ this.example = b.example;
+ this.excludeProperties = b.excludeProperties;
+ this.fluentSetters = b.fluentSetters;
+ this.implClass = b.implClass;
+ this.interceptor = b.interceptor;
+ this.interfaceClass = b.interfaceClass;
+ this.p = b.p;
+ this.properties = b.properties;
+ this.propertyNamer = b.propertyNamer;
+ this.readOnlyProperties = b.readOnlyProperties;
+ this.ro = b.ro;
+ this.sort = b.sort;
+ this.stopClass = b.stopClass;
+ this.typeName = b.typeName;
+ this.typePropertyName = b.typePropertyName;
+ this.wo = b.wo;
+ this.writeOnlyProperties = b.writeOnlyProperties;
+ this.xp = b.xp;
+ postConstruct();
+ }
+
+ @Override /* Bean */
+ public Class<?>[] dictionary() {
+ return dictionary;
+ }
+
+ @Override /* Bean */
+ public String example() {
+ return example;
+ }
+
+ @Override /* Bean */
+ public String excludeProperties() {
+ return excludeProperties;
+ }
+
+ @Override /* Bean */
+ public boolean fluentSetters() {
+ return fluentSetters;
+ }
+
+ @Override /* Bean */
+ public Class<?> implClass() {
+ return implClass;
+ }
+
+ @Override /* Bean */
+ public Class<? extends BeanInterceptor<?>> interceptor() {
+ return interceptor;
+ }
+
+ @Override /* Bean */
+ public Class<?> interfaceClass() {
+ return interfaceClass;
+ }
+
+ @Override /* Bean */
+ public String p() {
+ return p;
+ }
+
+ @Override /* Bean */
+ public String properties() {
+ return properties;
+ }
+
+ @Override /* Bean */
+ public Class<? extends PropertyNamer> propertyNamer() {
+ return propertyNamer;
+ }
+
+ @Override /* Bean */
+ public String readOnlyProperties() {
+ return readOnlyProperties;
+ }
+
+ @Override /* Bean */
+ public String ro() {
+ return ro;
+ }
+
+ @Override /* Bean */
+ public boolean sort() {
+ return sort;
+ }
+
+ @Override /* Bean */
+ public Class<?> stopClass() {
+ return stopClass;
+ }
+
+ @Override /* Bean */
+ public String typeName() {
+ return typeName;
+ }
+
+ @Override /* Bean */
+ public String typePropertyName() {
+ return typePropertyName;
+ }
+
+ @Override /* Bean */
+ public String writeOnlyProperties() {
+ return writeOnlyProperties;
+ }
+
+ @Override /* Bean */
+ public String wo() {
+ return wo;
+ }
+
+ @Override /* Bean */
+ public String xp() {
+ return xp;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Bean} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Bean> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Bean> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Bean> ai, PropertyStoreBuilder psb) {
+ Bean a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Bean @Bean annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Bean[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApply.java
deleted file mode 100644
index 6594b27..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApply.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static org.apache.juneau.BeanContext.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Applies targeted {@link Bean} annotations to a {@link PropertyStoreBuilder}.
- */
-public class BeanApply extends ConfigApply<Bean> {
-
- /**
- * Constructor.
- *
- * @param c The annotation class.
- * @param r The resolver for resolving values in annotations.
- */
- public BeanApply(Class<Bean> c, VarResolverSession r) {
- super(c, r);
- }
-
- @Override
- public void apply(AnnotationInfo<Bean> ai, PropertyStoreBuilder psb) {
- Bean a = ai.getAnnotation();
-
- if (a.on().length == 0 && a.onClass().length == 0)
- return;
-
- Bean copy = BeanBuilder
- .create()
- .dictionary(a.dictionary())
- .example(string(a.example()))
- .excludeProperties(string(a.excludeProperties()))
- .fluentSetters(a.fluentSetters())
- .implClass(a.implClass())
- .interceptor(a.interceptor())
- .interfaceClass(a.interfaceClass())
- .on(strings(a.on()))
- .onClass(a.onClass())
- .p(string(a.p()))
- .properties(string(a.properties()))
- .propertyNamer(a.propertyNamer())
- .readOnlyProperties(string(a.readOnlyProperties()))
- .ro(string(a.ro()))
- .sort(a.sort())
- .stopClass(a.stopClass())
- .typeName(string(a.typeName()))
- .typePropertyName(string(a.typePropertyName()))
- .wo(string(a.wo()))
- .writeOnlyProperties(string(a.writeOnlyProperties()))
- .xp(string(a.xp()))
- .build();
-
- psb.prependTo(BEAN_annotations, copy);
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanArray.java
deleted file mode 100644
index 2b5c083..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Bean @Bean annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface BeanArray {
-
- /**
- * The child annotations.
- */
- Bean[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanBuilder.java
deleted file mode 100644
index e880f91..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanBuilder.java
+++ /dev/null
@@ -1,446 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static org.apache.juneau.internal.ArrayUtils.*;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.transform.*;
-
-/**
- * Builder class for the {@link Bean} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class BeanBuilder extends TargetedAnnotationTBuilder {
-
- /** Default value */
- public static final Bean DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static BeanBuilder create() {
- return new BeanBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeanBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeanBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements Bean {
-
- private final boolean fluentSetters, sort;
- private final Class<? extends BeanInterceptor<?>> interceptor;
- private final Class<? extends PropertyNamer> propertyNamer;
- private final Class<?> implClass, interfaceClass, stopClass;
- private final Class<?>[] dictionary;
- private final String example, excludeProperties, p, properties, readOnlyProperties, ro, typeName, typePropertyName, wo, writeOnlyProperties, xp;
-
- Impl(BeanBuilder b) {
- super(b);
- this.dictionary = copyOf(b.dictionary);
- this.example = b.example;
- this.excludeProperties = b.excludeProperties;
- this.fluentSetters = b.fluentSetters;
- this.implClass = b.implClass;
- this.interceptor = b.interceptor;
- this.interfaceClass = b.interfaceClass;
- this.p = b.p;
- this.properties = b.properties;
- this.propertyNamer = b.propertyNamer;
- this.readOnlyProperties = b.readOnlyProperties;
- this.ro = b.ro;
- this.sort = b.sort;
- this.stopClass = b.stopClass;
- this.typeName = b.typeName;
- this.typePropertyName = b.typePropertyName;
- this.wo = b.wo;
- this.writeOnlyProperties = b.writeOnlyProperties;
- this.xp = b.xp;
- postConstruct();
- }
-
- @Override /* Bean */
- public Class<?>[] dictionary() {
- return dictionary;
- }
-
- @Override /* Bean */
- public String example() {
- return example;
- }
-
- @Override /* Bean */
- public String excludeProperties() {
- return excludeProperties;
- }
-
- @Override /* Bean */
- public boolean fluentSetters() {
- return fluentSetters;
- }
-
- @Override /* Bean */
- public Class<?> implClass() {
- return implClass;
- }
-
- @Override /* Bean */
- public Class<? extends BeanInterceptor<?>> interceptor() {
- return interceptor;
- }
-
- @Override /* Bean */
- public Class<?> interfaceClass() {
- return interfaceClass;
- }
-
- @Override /* Bean */
- public String p() {
- return p;
- }
-
- @Override /* Bean */
- public String properties() {
- return properties;
- }
-
- @Override /* Bean */
- public Class<? extends PropertyNamer> propertyNamer() {
- return propertyNamer;
- }
-
- @Override /* Bean */
- public String readOnlyProperties() {
- return readOnlyProperties;
- }
-
- @Override /* Bean */
- public String ro() {
- return ro;
- }
-
- @Override /* Bean */
- public boolean sort() {
- return sort;
- }
-
- @Override /* Bean */
- public Class<?> stopClass() {
- return stopClass;
- }
-
- @Override /* Bean */
- public String typeName() {
- return typeName;
- }
-
- @Override /* Bean */
- public String typePropertyName() {
- return typePropertyName;
- }
-
- @Override /* Bean */
- public String writeOnlyProperties() {
- return writeOnlyProperties;
- }
-
- @Override /* Bean */
- public String wo() {
- return wo;
- }
-
- @Override /* Bean */
- public String xp() {
- return xp;
- }
- }
-
-
- Class<?>[] dictionary = new Class[0];
- Class<?> implClass=Null.class, interfaceClass=Null.class, stopClass=Null.class;
- Class<? extends BeanInterceptor<?>> interceptor=BeanInterceptor.Default.class;
- Class<? extends PropertyNamer> propertyNamer=BasicPropertyNamer.class;
- String example="", excludeProperties="", p="", properties="", readOnlyProperties="", ro="", typeName="", typePropertyName="", wo="", writeOnlyProperties="", xp="";
- boolean fluentSetters, sort;
-
- /**
- * Constructor.
- */
- public BeanBuilder() {
- super(Bean.class);
- }
-
- /**
- * Instantiates a new {@link Bean @Bean} object initialized with this builder.
- *
- * @return A new {@link Bean @Bean} object.
- */
- public Bean build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Bean#dictionary()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder dictionary(Class<?>...value) {
- this.dictionary = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#example()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder example(String value) {
- this.example = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#excludeProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder excludeProperties(String value) {
- this.excludeProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#fluentSetters()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder fluentSetters(boolean value) {
- this.fluentSetters = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#implClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder implClass(Class<?> value) {
- this.implClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#interceptor()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder interceptor(Class<? extends BeanInterceptor<?>> value) {
- this.interceptor = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#interfaceClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder interfaceClass(Class<?> value) {
- this.interfaceClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#properties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder properties(String value) {
- this.properties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#p()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder p(String value) {
- this.p = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#propertyNamer()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder propertyNamer(Class<? extends PropertyNamer> value) {
- this.propertyNamer = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#readOnlyProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder readOnlyProperties(String value) {
- this.readOnlyProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#ro()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder ro(String value) {
- this.ro = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#sort()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder sort(boolean value) {
- this.sort = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#stopClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder stopClass(Class<?> value) {
- this.stopClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#typeName()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder typeName(String value) {
- this.typeName = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#typePropertyName()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder typePropertyName(String value) {
- this.typePropertyName = value;
- return this;
- }
-
- /**
- * Sets the{@link Bean#wo()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder wo(String value) {
- this.wo = value;
- return this;
- }
-
- /**
- * Sets the{@link Bean#writeOnlyProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder writeOnlyProperties(String value) {
- this.writeOnlyProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#xp()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanBuilder xp(String value) {
- this.xp = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public BeanBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public BeanBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public BeanBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
index e2b5703..023eddb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
@@ -34,7 +34,7 @@ import org.apache.juneau.transform.*;
@Target({TYPE,METHOD})
@Retention(RUNTIME)
@Inherited
-@PropertyStoreApply(BeanConfigApply.class)
+@PropertyStoreApply(BeanConfigAnnotation.Apply.class)
public @interface BeanConfig {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
new file mode 100644
index 0000000..f9ee108
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
@@ -0,0 +1,170 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static org.apache.juneau.BeanContext.*;
+import static org.apache.juneau.BeanTraverseContext.*;
+
+import java.util.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.http.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link BeanConfig @BeanConfig} annotation.
+ */
+public class BeanConfigAnnotation {
+
+ /**
+ * Applies {@link BeanConfig} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<BeanConfig> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<BeanConfig> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<BeanConfig> ai, PropertyStoreBuilder psb) {
+ BeanConfig a = ai.getAnnotation();
+
+ if (! a.beanClassVisibility().isEmpty())
+ psb.set(BEAN_beanClassVisibility, visibility(a.beanClassVisibility(), "beanClassVisibility"));
+ if (! a.beanConstructorVisibility().isEmpty())
+ psb.set(BEAN_beanConstructorVisibility, visibility(a.beanConstructorVisibility(), "beanConstructorVisibility"));
+ if (a.dictionary().length != 0)
+ psb.prependTo(BEAN_beanDictionary, a.dictionary());
+ if (a.dictionary_replace().length != 0)
+ psb.set(BEAN_beanDictionary, a.dictionary_replace());
+ if (a.dictionary_remove().length != 0)
+ psb.removeFrom(BEAN_beanDictionary, a.dictionary_remove());
+ if (! a.beanFieldVisibility().isEmpty())
+ psb.set(BEAN_beanFieldVisibility, visibility(a.beanFieldVisibility(), "beanFieldVisibility"));
+ if (! a.beanMapPutReturnsOldValue().isEmpty())
+ psb.set(BEAN_beanMapPutReturnsOldValue, bool(a.beanMapPutReturnsOldValue()));
+ if (! a.beanMethodVisibility().isEmpty())
+ psb.set(BEAN_beanMethodVisibility, visibility(a.beanMethodVisibility(), "beanMethodVisibility"));
+ if (! a.beansRequireDefaultConstructor().isEmpty())
+ psb.set(BEAN_beansRequireDefaultConstructor, bool(a.beansRequireDefaultConstructor()));
+ if (! a.beansRequireSerializable().isEmpty())
+ psb.set(BEAN_beansRequireSerializable, bool(a.beansRequireSerializable()));
+ if (! a.beansRequireSettersForGetters().isEmpty())
+ psb.set(BEAN_beansRequireSettersForGetters, bool(a.beansRequireSettersForGetters()));
+ if (! a.beansRequireSomeProperties().isEmpty())
+ psb.set(BEAN_beansRequireSomeProperties, bool(a.beansRequireSomeProperties()));
+ if (! a.typePropertyName().isEmpty())
+ psb.set(BEAN_typePropertyName, string(a.typePropertyName()));
+ if (! a.debug().isEmpty())
+ psb.set(CONTEXT_debug, bool(a.debug()));
+ if (! a.fluentSetters().isEmpty())
+ psb.set(BEAN_fluentSetters, bool(a.fluentSetters()));
+ if (! a.ignoreInvocationExceptionsOnGetters().isEmpty())
+ psb.set(BEAN_ignoreInvocationExceptionsOnGetters, bool(a.ignoreInvocationExceptionsOnGetters()));
+ if (! a.ignoreInvocationExceptionsOnSetters().isEmpty())
+ psb.set(BEAN_ignoreInvocationExceptionsOnSetters, bool(a.ignoreInvocationExceptionsOnSetters()));
+ if (! a.ignorePropertiesWithoutSetters().isEmpty())
+ psb.set(BEAN_ignorePropertiesWithoutSetters, bool(a.ignorePropertiesWithoutSetters()));
+ if (! a.ignoreTransientFields().isEmpty())
+ psb.set(BEAN_ignoreTransientFields, bool(a.ignoreTransientFields()));
+ if (! a.ignoreUnknownBeanProperties().isEmpty())
+ psb.set(BEAN_ignoreUnknownBeanProperties, bool(a.ignoreUnknownBeanProperties()));
+ if (! a.ignoreUnknownNullBeanProperties().isEmpty())
+ psb.set(BEAN_ignoreUnknownNullBeanProperties, bool(a.ignoreUnknownNullBeanProperties()));
+ for (Class<?> c : a.interfaces())
+ psb.prependTo(BEAN_annotations, BeanAnnotation.create(c).interfaceClass(c).build());
+ if (! a.locale().isEmpty())
+ psb.set(CONTEXT_locale, locale(a.locale()));
+ if (! a.mediaType().isEmpty())
+ psb.set(CONTEXT_mediaType, mediaType(a.mediaType()));
+ if (a.notBeanClasses().length != 0)
+ psb.addTo(BEAN_notBeanClasses, a.notBeanClasses());
+ if (a.notBeanClasses_replace().length != 0)
+ psb.set(BEAN_notBeanClasses, a.notBeanClasses_replace());
+ if (a.notBeanClasses_remove().length != 0)
+ psb.removeFrom(BEAN_notBeanClasses, a.notBeanClasses_remove());
+ if (a.notBeanPackages().length != 0)
+ psb.addTo(BEAN_notBeanPackages, strings(a.notBeanPackages()));
+ if (a.notBeanPackages_replace().length != 0)
+ psb.set(BEAN_notBeanPackages, strings(a.notBeanPackages_replace()));
+ if (a.notBeanPackages_remove().length != 0)
+ psb.removeFrom(BEAN_notBeanPackages, strings(a.notBeanPackages_remove()));
+ if (a.propertyNamer() != PropertyNamer.Null.class)
+ psb.set(BEAN_propertyNamer, a.propertyNamer());
+ if (! a.sortProperties().isEmpty())
+ psb.set(BEAN_sortProperties, bool(a.sortProperties()));
+ if (a.swaps().length != 0)
+ psb.prependTo(BEAN_swaps, a.swaps());
+ if (a.swaps_replace().length != 0)
+ psb.set(BEAN_swaps, a.swaps_replace());
+ if (a.swaps_remove().length != 0)
+ psb.removeFrom(BEAN_swaps, a.swaps_remove());
+ if (! a.timeZone().isEmpty())
+ psb.set(CONTEXT_timeZone, timeZone(a.timeZone()));
+ if (! a.useEnumNames().isEmpty())
+ psb.set(BEAN_useEnumNames, bool(a.useEnumNames()));
+ if (! a.useInterfaceProxies().isEmpty())
+ psb.set(BEAN_useInterfaceProxies, bool(a.useInterfaceProxies()));
+ if (! a.useJavaBeanIntrospector().isEmpty())
+ psb.set(BEAN_useJavaBeanIntrospector, bool(a.useJavaBeanIntrospector()));
+ if (! a.detectRecursions().isEmpty())
+ psb.set(BEANTRAVERSE_detectRecursions, bool(a.detectRecursions()));
+ if (! a.ignoreRecursions().isEmpty())
+ psb.set(BEANTRAVERSE_ignoreRecursions, bool(a.ignoreRecursions()));
+ if (! a.initialDepth().isEmpty())
+ psb.set(BEANTRAVERSE_initialDepth, integer(a.initialDepth(), "initialDepth"));
+ if (! a.maxDepth().isEmpty())
+ psb.set(BEANTRAVERSE_maxDepth, integer(a.maxDepth(), "maxDepth"));
+
+ if (a.applyBean().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyBean());
+ if (a.applyBeanp().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyBeanp());
+ if (a.applyBeanc().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyBeanc());
+ if (a.applyBeanIgnore().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyBeanIgnore());
+ if (a.applyExample().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyExample());
+ if (a.applyMarshalled().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyMarshalled());
+ if (a.applyNameProperty().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyNameProperty());
+ if (a.applyParentProperty().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyParentProperty());
+ if (a.applyURI().length > 0)
+ psb.prependTo(BEAN_annotations, a.applyURI());
+ if (a.applySwap().length > 0)
+ psb.prependTo(BEAN_annotations, a.applySwap());
+ }
+
+ private Locale locale(String in) {
+ return Locale.forLanguageTag(string(in));
+ }
+
+ private MediaType mediaType(String in) {
+ return MediaType.of(string(in));
+ }
+
+ private TimeZone timeZone(String in) {
+ return TimeZone.getTimeZone(string(in));
+ }
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
deleted file mode 100644
index 610b7a4..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigApply.java
+++ /dev/null
@@ -1,164 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static org.apache.juneau.BeanContext.*;
-import static org.apache.juneau.BeanTraverseContext.*;
-
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.http.*;
-import org.apache.juneau.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Applies {@link BeanConfig} annotations to a {@link PropertyStoreBuilder}.
- */
-public class BeanConfigApply extends ConfigApply<BeanConfig> {
-
- /**
- * Constructor.
- *
- * @param c The annotation class.
- * @param r The resolver for resolving values in annotations.
- */
- public BeanConfigApply(Class<BeanConfig> c, VarResolverSession r) {
- super(c, r);
- }
-
- @Override
- public void apply(AnnotationInfo<BeanConfig> ai, PropertyStoreBuilder psb) {
- BeanConfig a = ai.getAnnotation();
-
- if (! a.beanClassVisibility().isEmpty())
- psb.set(BEAN_beanClassVisibility, visibility(a.beanClassVisibility(), "beanClassVisibility"));
- if (! a.beanConstructorVisibility().isEmpty())
- psb.set(BEAN_beanConstructorVisibility, visibility(a.beanConstructorVisibility(), "beanConstructorVisibility"));
- if (a.dictionary().length != 0)
- psb.prependTo(BEAN_beanDictionary, a.dictionary());
- if (a.dictionary_replace().length != 0)
- psb.set(BEAN_beanDictionary, a.dictionary_replace());
- if (a.dictionary_remove().length != 0)
- psb.removeFrom(BEAN_beanDictionary, a.dictionary_remove());
- if (! a.beanFieldVisibility().isEmpty())
- psb.set(BEAN_beanFieldVisibility, visibility(a.beanFieldVisibility(), "beanFieldVisibility"));
- if (! a.beanMapPutReturnsOldValue().isEmpty())
- psb.set(BEAN_beanMapPutReturnsOldValue, bool(a.beanMapPutReturnsOldValue()));
- if (! a.beanMethodVisibility().isEmpty())
- psb.set(BEAN_beanMethodVisibility, visibility(a.beanMethodVisibility(), "beanMethodVisibility"));
- if (! a.beansRequireDefaultConstructor().isEmpty())
- psb.set(BEAN_beansRequireDefaultConstructor, bool(a.beansRequireDefaultConstructor()));
- if (! a.beansRequireSerializable().isEmpty())
- psb.set(BEAN_beansRequireSerializable, bool(a.beansRequireSerializable()));
- if (! a.beansRequireSettersForGetters().isEmpty())
- psb.set(BEAN_beansRequireSettersForGetters, bool(a.beansRequireSettersForGetters()));
- if (! a.beansRequireSomeProperties().isEmpty())
- psb.set(BEAN_beansRequireSomeProperties, bool(a.beansRequireSomeProperties()));
- if (! a.typePropertyName().isEmpty())
- psb.set(BEAN_typePropertyName, string(a.typePropertyName()));
- if (! a.debug().isEmpty())
- psb.set(CONTEXT_debug, bool(a.debug()));
- if (! a.fluentSetters().isEmpty())
- psb.set(BEAN_fluentSetters, bool(a.fluentSetters()));
- if (! a.ignoreInvocationExceptionsOnGetters().isEmpty())
- psb.set(BEAN_ignoreInvocationExceptionsOnGetters, bool(a.ignoreInvocationExceptionsOnGetters()));
- if (! a.ignoreInvocationExceptionsOnSetters().isEmpty())
- psb.set(BEAN_ignoreInvocationExceptionsOnSetters, bool(a.ignoreInvocationExceptionsOnSetters()));
- if (! a.ignorePropertiesWithoutSetters().isEmpty())
- psb.set(BEAN_ignorePropertiesWithoutSetters, bool(a.ignorePropertiesWithoutSetters()));
- if (! a.ignoreTransientFields().isEmpty())
- psb.set(BEAN_ignoreTransientFields, bool(a.ignoreTransientFields()));
- if (! a.ignoreUnknownBeanProperties().isEmpty())
- psb.set(BEAN_ignoreUnknownBeanProperties, bool(a.ignoreUnknownBeanProperties()));
- if (! a.ignoreUnknownNullBeanProperties().isEmpty())
- psb.set(BEAN_ignoreUnknownNullBeanProperties, bool(a.ignoreUnknownNullBeanProperties()));
- for (Class<?> c : a.interfaces())
- psb.prependTo(BEAN_annotations, BeanBuilder.create(c).interfaceClass(c).build());
- if (! a.locale().isEmpty())
- psb.set(CONTEXT_locale, locale(a.locale()));
- if (! a.mediaType().isEmpty())
- psb.set(CONTEXT_mediaType, mediaType(a.mediaType()));
- if (a.notBeanClasses().length != 0)
- psb.addTo(BEAN_notBeanClasses, a.notBeanClasses());
- if (a.notBeanClasses_replace().length != 0)
- psb.set(BEAN_notBeanClasses, a.notBeanClasses_replace());
- if (a.notBeanClasses_remove().length != 0)
- psb.removeFrom(BEAN_notBeanClasses, a.notBeanClasses_remove());
- if (a.notBeanPackages().length != 0)
- psb.addTo(BEAN_notBeanPackages, strings(a.notBeanPackages()));
- if (a.notBeanPackages_replace().length != 0)
- psb.set(BEAN_notBeanPackages, strings(a.notBeanPackages_replace()));
- if (a.notBeanPackages_remove().length != 0)
- psb.removeFrom(BEAN_notBeanPackages, strings(a.notBeanPackages_remove()));
- if (a.propertyNamer() != PropertyNamer.Null.class)
- psb.set(BEAN_propertyNamer, a.propertyNamer());
- if (! a.sortProperties().isEmpty())
- psb.set(BEAN_sortProperties, bool(a.sortProperties()));
- if (a.swaps().length != 0)
- psb.prependTo(BEAN_swaps, a.swaps());
- if (a.swaps_replace().length != 0)
- psb.set(BEAN_swaps, a.swaps_replace());
- if (a.swaps_remove().length != 0)
- psb.removeFrom(BEAN_swaps, a.swaps_remove());
- if (! a.timeZone().isEmpty())
- psb.set(CONTEXT_timeZone, timeZone(a.timeZone()));
- if (! a.useEnumNames().isEmpty())
- psb.set(BEAN_useEnumNames, bool(a.useEnumNames()));
- if (! a.useInterfaceProxies().isEmpty())
- psb.set(BEAN_useInterfaceProxies, bool(a.useInterfaceProxies()));
- if (! a.useJavaBeanIntrospector().isEmpty())
- psb.set(BEAN_useJavaBeanIntrospector, bool(a.useJavaBeanIntrospector()));
- if (! a.detectRecursions().isEmpty())
- psb.set(BEANTRAVERSE_detectRecursions, bool(a.detectRecursions()));
- if (! a.ignoreRecursions().isEmpty())
- psb.set(BEANTRAVERSE_ignoreRecursions, bool(a.ignoreRecursions()));
- if (! a.initialDepth().isEmpty())
- psb.set(BEANTRAVERSE_initialDepth, integer(a.initialDepth(), "initialDepth"));
- if (! a.maxDepth().isEmpty())
- psb.set(BEANTRAVERSE_maxDepth, integer(a.maxDepth(), "maxDepth"));
-
- if (a.applyBean().length > 0)
- psb.prependTo(BEAN_annotations, a.applyBean());
- if (a.applyBeanp().length > 0)
- psb.prependTo(BEAN_annotations, a.applyBeanp());
- if (a.applyBeanc().length > 0)
- psb.prependTo(BEAN_annotations, a.applyBeanc());
- if (a.applyBeanIgnore().length > 0)
- psb.prependTo(BEAN_annotations, a.applyBeanIgnore());
- if (a.applyExample().length > 0)
- psb.prependTo(BEAN_annotations, a.applyExample());
- if (a.applyMarshalled().length > 0)
- psb.prependTo(BEAN_annotations, a.applyMarshalled());
- if (a.applyNameProperty().length > 0)
- psb.prependTo(BEAN_annotations, a.applyNameProperty());
- if (a.applyParentProperty().length > 0)
- psb.prependTo(BEAN_annotations, a.applyParentProperty());
- if (a.applyURI().length > 0)
- psb.prependTo(BEAN_annotations, a.applyURI());
- if (a.applySwap().length > 0)
- psb.prependTo(BEAN_annotations, a.applySwap());
- }
-
- private Locale locale(String in) {
- return Locale.forLanguageTag(string(in));
- }
-
- private MediaType mediaType(String in) {
- return MediaType.of(string(in));
- }
-
- private TimeZone timeZone(String in) {
- return TimeZone.getTimeZone(string(in));
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java
index a79535f..1ed821b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java
@@ -37,7 +37,8 @@ import java.lang.annotation.*;
@Target({FIELD,METHOD,TYPE,CONSTRUCTOR})
@Retention(RUNTIME)
@Inherited
-@Repeatable(BeanIgnoreArray.class)
+@Repeatable(BeanIgnoreAnnotation.Array.class)
+@PropertyStoreApply(BeanIgnoreAnnotation.Apply.class)
public @interface BeanIgnore {
/**
* Dynamically apply this annotation to the specified classes/methods/fields/constructors.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java
new file mode 100644
index 0000000..aba6a69
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java
@@ -0,0 +1,192 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link BeanIgnore @BeanIgnore} annotation.
+ */
+public class BeanIgnoreAnnotation {
+
+ /** Default value */
+ public static final BeanIgnore DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static BeanIgnore copy(BeanIgnore a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link BeanIgnore} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTMFCBuilder {
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(BeanIgnore.class);
+ }
+
+ /**
+ * Instantiates a new {@link BeanIgnore @BeanIgnore} object initialized with this builder.
+ *
+ * @return A new {@link BeanIgnore @BeanIgnore} object.
+ */
+ public BeanIgnore build() {
+ return new Impl(this);
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFCBuilder */
+ public Builder on(java.lang.reflect.Constructor<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements BeanIgnore {
+
+ Impl(Builder b) {
+ super(b);
+ postConstruct();
+ }
+ }
+
+ /**
+ * Applies targeted {@link BeanIgnore} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<BeanIgnore> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<BeanIgnore> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<BeanIgnore> ai, PropertyStoreBuilder psb) {
+ BeanIgnore a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link BeanIgnore @BeanIgnore annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ BeanIgnore[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreArray.java
deleted file mode 100644
index c2625b8..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link BeanIgnore @BeanIgnore annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface BeanIgnoreArray {
-
- /**
- * The child annotations.
- */
- BeanIgnore[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreBuilder.java
deleted file mode 100644
index f4b7768..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreBuilder.java
+++ /dev/null
@@ -1,125 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link BeanIgnore} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class BeanIgnoreBuilder extends TargetedAnnotationTMFCBuilder {
-
- /** Default value */
- public static final BeanIgnore DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static BeanIgnoreBuilder create() {
- return new BeanIgnoreBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeanIgnoreBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeanIgnoreBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements BeanIgnore {
-
- Impl(BeanIgnoreBuilder b) {
- super(b);
- postConstruct();
- }
- }
-
-
- /**
- * Constructor.
- */
- public BeanIgnoreBuilder() {
- super(BeanIgnore.class);
- }
-
- /**
- * Instantiates a new {@link BeanIgnore @BeanIgnore} object initialized with this builder.
- *
- * @return A new {@link BeanIgnore @BeanIgnore} object.
- */
- public BeanIgnore build() {
- return new Impl(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public BeanIgnoreBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public BeanIgnoreBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public BeanIgnoreBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public BeanIgnoreBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public BeanIgnoreBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFCBuilder */
- public BeanIgnoreBuilder on(java.lang.reflect.Constructor<?>...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
index 5be4fc1..c7d1be9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
@@ -57,7 +57,8 @@ import org.apache.juneau.*;
@Target({METHOD,TYPE,CONSTRUCTOR})
@Retention(RUNTIME)
@Inherited
-@Repeatable(BeancArray.class)
+@Repeatable(BeancAnnotation.Array.class)
+@PropertyStoreApply(BeancAnnotation.Apply.class)
public @interface Beanc {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java
new file mode 100644
index 0000000..20de1f7
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java
@@ -0,0 +1,178 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Beanc @Beanc} annotation.
+ */
+public class BeancAnnotation {
+
+ /** Default value */
+ public static final Beanc DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Beanc copy(Beanc a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .properties(r.resolve(a.properties()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Beanc} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationCBuilder {
+
+ String properties="";
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Beanc.class);
+ }
+
+ /**
+ * Instantiates a new {@link Beanc @Beanc} object initialized with this builder.
+ *
+ * @return A new {@link Beanc @Beanc} object.
+ */
+ public Beanc build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Beanc#properties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder properties(String value) {
+ this.properties = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationCBuilder */
+ public Builder on(java.lang.reflect.Constructor<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationImpl implements Beanc {
+
+ private String properties="";
+
+ Impl(Builder b) {
+ super(b);
+ this.properties = b.properties;
+ postConstruct();
+ }
+
+ @Override /* Beanc */
+ public String properties() {
+ return properties;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Beanc} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Beanc> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Beanc> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Beanc> ai, PropertyStoreBuilder psb) {
+ Beanc a = ai.getAnnotation();
+
+ if (isEmpty(a.on()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Beanc @Beanc annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Beanc[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancArray.java
deleted file mode 100644
index b513fa4..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Beanc @Beanc annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface BeancArray {
-
- /**
- * The child annotations.
- */
- Beanc[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancBuilder.java
deleted file mode 100644
index 00d574e..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancBuilder.java
+++ /dev/null
@@ -1,111 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link Beanc} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class BeancBuilder extends TargetedAnnotationCBuilder {
-
- /** Default value */
- public static final Beanc DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static BeancBuilder create() {
- return new BeancBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeancBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationImpl implements Beanc {
-
- private String properties="";
-
- Impl(BeancBuilder b) {
- super(b);
- this.properties = b.properties;
- postConstruct();
- }
-
- @Override /* Beanc */
- public String properties() {
- return properties;
- }
- }
-
-
- String properties="";
-
- /**
- * Constructor.
- */
- public BeancBuilder() {
- super(Beanc.class);
- }
-
- /**
- * Instantiates a new {@link Beanc @Beanc} object initialized with this builder.
- *
- * @return A new {@link Beanc @Beanc} object.
- */
- public Beanc build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Beanc#properties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeancBuilder properties(String value) {
- this.properties = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public BeancBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationCBuilder */
- public BeancBuilder on(java.lang.reflect.Constructor<?>...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanp.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanp.java
index d08c708..495ddfc 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanp.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanp.java
@@ -40,7 +40,8 @@ import org.apache.juneau.*;
@Target({FIELD,METHOD,PARAMETER,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(BeanpArray.class)
+@Repeatable(BeanpAnnotation.Array.class)
+@PropertyStoreApply(BeanpAnnotation.Apply.class)
public @interface Beanp {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java
new file mode 100644
index 0000000..437e80e
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java
@@ -0,0 +1,333 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+import static org.apache.juneau.internal.ArrayUtils.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Beanp @Beanp} annotation.
+ */
+public class BeanpAnnotation {
+
+ /** Default value */
+ public static final Beanp DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Beanp copy(Beanp a, VarResolverSession r) {
+ return
+ create()
+ .dictionary(a.dictionary())
+ .format(r.resolve(a.format()))
+ .name(r.resolve(a.name()))
+ .on(r.resolve(a.on()))
+ .params(a.params())
+ .properties(r.resolve(a.properties()))
+ .ro(r.resolve(a.ro()))
+ .type(a.type())
+ .value(r.resolve(a.value()))
+ .wo(r.resolve(a.wo()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Beanp} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationMFBuilder {
+
+ Class<?> type=Null.class;
+ Class<?>[] dictionary=new Class[0], params=new Class[0];
+ String format="", name="", properties="", ro="", value="", wo="";
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Beanp.class);
+ }
+
+ /**
+ * Instantiates a new {@link Beanp @Beanp} object initialized with this builder.
+ *
+ * @return A new {@link Beanp @Beanp} object.
+ */
+ public Beanp build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Beanp#dictionary()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder dictionary(Class<?>...value) {
+ this.dictionary = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#format()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder format(String value) {
+ this.format = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#name()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder name(String value) {
+ this.name = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#params()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder params(Class<?>...value) {
+ this.params = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#properties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder properties(String value) {
+ this.properties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#ro()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder ro(String value) {
+ this.ro = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#type()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder type(Class<?> value) {
+ this.type = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#value()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder value(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Beanp#wo()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder wo(String value) {
+ this.wo = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationImpl implements Beanp {
+
+ private final Class<?> type;
+ private final Class<?>[] params, dictionary;
+ private final String name, value, properties, format, ro, wo;
+
+ Impl(Builder b) {
+ super(b);
+ this.dictionary = copyOf(b.dictionary);
+ this.format = b.format;
+ this.name = b.name;
+ this.params = copyOf(b.params);
+ this.properties = b.properties;
+ this.ro = b.ro;
+ this.type = b.type;
+ this.value = b.value;
+ this.wo = b.wo;
+ postConstruct();
+ }
+
+ @Override /* Beanp */
+ public Class<?>[] dictionary() {
+ return dictionary;
+ }
+
+ @Override /* Beanp */
+ public String format() {
+ return format;
+ }
+
+ @Override /* Beanp */
+ public String name() {
+ return name;
+ }
+
+ @Override /* Beanp */
+ public Class<?>[] params() {
+ return params;
+ }
+
+ @Override /* Beanp */
+ public String properties() {
+ return properties;
+ }
+
+ @Override /* Beanp */
+ public String ro() {
+ return ro;
+ }
+
+ @Override /* Beanp */
+ public Class<?> type() {
+ return type;
+ }
+
+ @Override /* Beanp */
+ public String value() {
+ return value;
+ }
+
+ @Override /* Beanp */
+ public String wo() {
+ return wo;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Beanp} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Beanp> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Beanp> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Beanp> ai, PropertyStoreBuilder psb) {
+ Beanp a = ai.getAnnotation();
+
+ if (isEmpty(a.on()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Beanp @Beanp annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Beanp[] value();
+ }}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpArray.java
deleted file mode 100644
index 0d4fb23..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Beanp @Beanp annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface BeanpArray {
-
- /**
- * The child annotations.
- */
- Beanp[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpBuilder.java
deleted file mode 100644
index 17d73f4..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpBuilder.java
+++ /dev/null
@@ -1,260 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static org.apache.juneau.internal.ArrayUtils.*;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link Beanp} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class BeanpBuilder extends TargetedAnnotationMFBuilder {
-
- /** Default value */
- public static final Beanp DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static BeanpBuilder create() {
- return new BeanpBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static BeanpBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationImpl implements Beanp {
-
- private final Class<?> type;
- private final Class<?>[] params, dictionary;
- private final String name, value, properties, format, ro, wo;
-
- Impl(BeanpBuilder b) {
- super(b);
- this.dictionary = copyOf(b.dictionary);
- this.format = b.format;
- this.name = b.name;
- this.params = copyOf(b.params);
- this.properties = b.properties;
- this.ro = b.ro;
- this.type = b.type;
- this.value = b.value;
- this.wo = b.wo;
- postConstruct();
- }
-
- @Override /* Beanp */
- public Class<?>[] dictionary() {
- return dictionary;
- }
-
- @Override /* Beanp */
- public String format() {
- return format;
- }
-
- @Override /* Beanp */
- public String name() {
- return name;
- }
-
- @Override /* Beanp */
- public Class<?>[] params() {
- return params;
- }
-
- @Override /* Beanp */
- public String properties() {
- return properties;
- }
-
- @Override /* Beanp */
- public String ro() {
- return ro;
- }
-
- @Override /* Beanp */
- public Class<?> type() {
- return type;
- }
-
- @Override /* Beanp */
- public String value() {
- return value;
- }
-
- @Override /* Beanp */
- public String wo() {
- return wo;
- }
- }
-
-
- Class<?> type=Null.class;
- Class<?>[] dictionary=new Class[0], params=new Class[0];
- String format="", name="", properties="", ro="", value="", wo="";
-
- /**
- * Constructor.
- */
- public BeanpBuilder() {
- super(Beanp.class);
- }
-
- /**
- * Instantiates a new {@link Beanp @Beanp} object initialized with this builder.
- *
- * @return A new {@link Beanp @Beanp} object.
- */
- public Beanp build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Beanp#dictionary()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder dictionary(Class<?>...value) {
- this.dictionary = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#format()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder format(String value) {
- this.format = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#name()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder name(String value) {
- this.name = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#params()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder params(Class<?>...value) {
- this.params = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#properties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder properties(String value) {
- this.properties = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#ro()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder ro(String value) {
- this.ro = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#type()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder type(Class<?> value) {
- this.type = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#value()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder value(String value) {
- this.value = value;
- return this;
- }
-
- /**
- * Sets the {@link Beanp#wo()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public BeanpBuilder wo(String value) {
- this.wo = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public BeanpBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public BeanpBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public BeanpBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Example.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Example.java
index e1f3d45..9ebc09f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Example.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Example.java
@@ -60,7 +60,8 @@ import java.lang.annotation.*;
@Target({FIELD,METHOD,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(ExampleArray.class)
+@Repeatable(ExampleAnnotation.Array.class)
+@PropertyStoreApply(ExampleAnnotation.Apply.class)
public @interface Example {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java
new file mode 100644
index 0000000..4776e19
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java
@@ -0,0 +1,208 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Example @Example} annotation.
+ */
+public class ExampleAnnotation {
+
+ /** Default value */
+ public static final Example DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Example copy(Example a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .value(r.resolve(a.value()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Example} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTMFBuilder {
+
+ String value="";
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Example.class);
+ }
+
+ /**
+ * Instantiates a new {@link Example @Example} object initialized with this builder.
+ *
+ * @return A new {@link Example @Example} object.
+ */
+ public Example build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the <c>value</c> property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder value(String value) {
+ this.value = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Example {
+
+ private final String value;
+
+ Impl(Builder b) {
+ super(b);
+ this.value = b.value;
+ postConstruct();
+ }
+
+ @Override /* Example */
+ public String value() {
+ return value;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Example} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public class Apply extends ConfigApply<Example> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Example> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Example> ai, PropertyStoreBuilder psb) {
+ Example a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Example @Example annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Example[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleArray.java
deleted file mode 100644
index 698613f..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Example @Example annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface ExampleArray {
-
- /**
- * The child annotations.
- */
- Example[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleBuilder.java
deleted file mode 100644
index 9f2fdea..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleBuilder.java
+++ /dev/null
@@ -1,140 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link Example} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class ExampleBuilder extends TargetedAnnotationTMFBuilder {
-
- /** Default value */
- public static final Example DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static ExampleBuilder create() {
- return new ExampleBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static ExampleBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static ExampleBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements Example {
-
- private final String value;
-
- Impl(ExampleBuilder b) {
- super(b);
- this.value = b.value;
- postConstruct();
- }
-
- @Override /* Example */
- public String value() {
- return value;
- }
- }
-
-
- String value="";
-
- /**
- * Constructor.
- */
- public ExampleBuilder() {
- super(Example.class);
- }
-
- /**
- * Instantiates a new {@link Example @Example} object initialized with this builder.
- *
- * @return A new {@link Example @Example} object.
- */
- public Example build() {
- return new Impl(this);
- }
-
- /**
- * Sets the <c>value</c> property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public ExampleBuilder value(String value) {
- this.value = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public ExampleBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public ExampleBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public ExampleBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public ExampleBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public ExampleBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Marshalled.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Marshalled.java
index 3efa6b4..d89c876 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Marshalled.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Marshalled.java
@@ -37,7 +37,8 @@ import org.apache.juneau.*;
@Target({METHOD,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(MarshalledArray.class)
+@Repeatable(MarshalledAnnotation.Array.class)
+@PropertyStoreApply(MarshalledAnnotation.Apply.class)
public @interface Marshalled {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAnnotation.java
new file mode 100644
index 0000000..7147613
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAnnotation.java
@@ -0,0 +1,214 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Marshalled @Marshalled} annotation.
+ */
+public class MarshalledAnnotation {
+ /** Default value */
+ public static final Marshalled DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Marshalled copy(Marshalled a, VarResolverSession r) {
+ return
+ create()
+ .example(r.resolve(a.example()))
+ .implClass(a.implClass())
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Marshalled} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTBuilder {
+
+ Class<?> implClass=Null.class;
+ String example="";
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Marshalled.class);
+ }
+
+ /**
+ * Instantiates a new {@link Marshalled @Marshalled} object initialized with this builder.
+ *
+ * @return A new {@link Marshalled @Marshalled} object.
+ */
+ public Marshalled build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Marshalled#example()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder example(String value) {
+ this.example = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#implClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder implClass(Class<?> value) {
+ this.implClass = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Marshalled {
+
+ private final Class<?> implClass;
+ private final String example;
+
+ Impl(Builder b) {
+ super(b);
+ this.example = b.example;
+ this.implClass = b.implClass;
+ postConstruct();
+ }
+
+ @Override /* Marshalled */
+ public String example() {
+ return example;
+ }
+
+ @Override /* Marshalled */
+ public Class<?> implClass() {
+ return implClass;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Marshalled} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Marshalled> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Marshalled> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Marshalled> ai, PropertyStoreBuilder psb) {
+ Marshalled a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Marshalled @Marshalled annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Marshalled[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledArray.java
deleted file mode 100644
index c39d3ca..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Marshalled @Marshalled annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface MarshalledArray {
-
- /**
- * The child annotations.
- */
- Marshalled[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledBuilder.java
deleted file mode 100644
index d6d2516..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledBuilder.java
+++ /dev/null
@@ -1,146 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link Marshalled} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class MarshalledBuilder extends TargetedAnnotationTBuilder {
-
- /** Default value */
- public static final Marshalled DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static MarshalledBuilder create() {
- return new MarshalledBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static MarshalledBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static MarshalledBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements Marshalled {
-
- private final Class<?> implClass;
- private final String example;
-
- Impl(MarshalledBuilder b) {
- super(b);
- this.example = b.example;
- this.implClass = b.implClass;
- postConstruct();
- }
-
- @Override /* Marshalled */
- public String example() {
- return example;
- }
-
- @Override /* Marshalled */
- public Class<?> implClass() {
- return implClass;
- }
- }
-
-
- Class<?> implClass=Null.class;
- String example="";
-
- /**
- * Constructor.
- */
- public MarshalledBuilder() {
- super(Marshalled.class);
- }
-
- /**
- * Instantiates a new {@link Marshalled @Marshalled} object initialized with this builder.
- *
- * @return A new {@link Marshalled @Marshalled} object.
- */
- public Marshalled build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Marshalled#example()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public MarshalledBuilder example(String value) {
- this.example = value;
- return this;
- }
-
- /**
- * Sets the {@link Marshalled#implClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public MarshalledBuilder implClass(Class<?> value) {
- this.implClass = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public MarshalledBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public MarshalledBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public MarshalledBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NameProperty.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NameProperty.java
index 8e51ca0..d55433b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NameProperty.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NameProperty.java
@@ -39,7 +39,8 @@ import java.lang.annotation.*;
@Target({METHOD,FIELD,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(NamePropertyArray.class)
+@Repeatable(NamePropertyAnnotation.Array.class)
+@PropertyStoreApply(NamePropertyAnnotation.Apply.class)
public @interface NameProperty {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java
new file mode 100644
index 0000000..ca8f919
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java
@@ -0,0 +1,163 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link NameProperty @NameProperty} annotation.
+ */
+public class NamePropertyAnnotation {
+
+ /** Default value */
+ public static final NameProperty DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static NameProperty copy(NameProperty a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link NameProperty} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationMFBuilder {
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(NameProperty.class);
+ }
+
+ /**
+ * Instantiates a new {@link NameProperty @NameProperty} object initialized with this builder.
+ *
+ * @return A new {@link NameProperty @NameProperty} object.
+ */
+ public NameProperty build() {
+ return new Impl(this);
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationImpl implements NameProperty {
+
+ Impl(Builder b) {
+ super(b);
+ postConstruct();
+ }
+ }
+
+ /**
+ * Applies targeted {@link NameProperty} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<NameProperty> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<NameProperty> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<NameProperty> ai, PropertyStoreBuilder psb) {
+ NameProperty a = ai.getAnnotation();
+
+ if (isEmpty(a.on()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link NameProperty @NameProperty annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ NameProperty[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyArray.java
deleted file mode 100644
index 662e6dd..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link NameProperty @NameProperty annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface NamePropertyArray {
-
- /**
- * The child annotations.
- */
- NameProperty[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyBuilder.java
deleted file mode 100644
index 59584c6..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyBuilder.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link NameProperty} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class NamePropertyBuilder extends TargetedAnnotationMFBuilder {
-
- /** Default value */
- public static final NameProperty DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static NamePropertyBuilder create() {
- return new NamePropertyBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static NamePropertyBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationImpl implements NameProperty {
-
- Impl(NamePropertyBuilder b) {
- super(b);
- postConstruct();
- }
- }
-
-
- /**
- * Constructor.
- */
- public NamePropertyBuilder() {
- super(NameProperty.class);
- }
-
- /**
- * Instantiates a new {@link NameProperty @NameProperty} object initialized with this builder.
- *
- * @return A new {@link NameProperty @NameProperty} object.
- */
- public NameProperty build() {
- return new Impl(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public NamePropertyBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public NamePropertyBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public NamePropertyBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentProperty.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentProperty.java
index 0cde071..cf16dbf 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentProperty.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentProperty.java
@@ -42,7 +42,8 @@ import java.lang.annotation.*;
@Target({METHOD,FIELD,TYPE})
@Retention(RUNTIME)
@Inherited
-@Repeatable(ParentPropertyArray.class)
+@Repeatable(ParentPropertyAnnotation.Array.class)
+@PropertyStoreApply(ParentPropertyAnnotation.Apply.class)
public @interface ParentProperty {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java
new file mode 100644
index 0000000..1c27675
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java
@@ -0,0 +1,163 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link ParentProperty @ParentProperty} annotation.
+ */
+public class ParentPropertyAnnotation {
+
+ /** Default value */
+ public static final ParentProperty DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static ParentProperty copy(ParentProperty a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link ParentProperty} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationMFBuilder {
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(ParentProperty.class);
+ }
+
+ /**
+ * Instantiates a new {@link ParentProperty @ParentProperty} object initialized with this builder.
+ *
+ * @return A new {@link ParentProperty @ParentProperty} object.
+ */
+ public ParentProperty build() {
+ return new Impl(this);
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationImpl implements ParentProperty {
+
+ Impl(Builder b) {
+ super(b);
+ postConstruct();
+ }
+ }
+
+ /**
+ * Applies targeted {@link ParentProperty} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public class Apply extends ConfigApply<ParentProperty> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<ParentProperty> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<ParentProperty> ai, PropertyStoreBuilder psb) {
+ ParentProperty a = ai.getAnnotation();
+
+ if (isEmpty(a.on()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link ParentProperty @ParentProperty annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ ParentProperty[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyArray.java
deleted file mode 100644
index 5d32d0d..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link ParentProperty @ParentProperty annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface ParentPropertyArray {
-
- /**
- * The child annotations.
- */
- ParentProperty[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyBuilder.java
deleted file mode 100644
index 22825d8..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyBuilder.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link ParentProperty} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class ParentPropertyBuilder extends TargetedAnnotationMFBuilder {
-
- /** Default value */
- public static final ParentProperty DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static ParentPropertyBuilder create() {
- return new ParentPropertyBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static ParentPropertyBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationImpl implements ParentProperty {
-
- Impl(ParentPropertyBuilder b) {
- super(b);
- postConstruct();
- }
- }
-
- /**
- * Constructor.
- */
- public ParentPropertyBuilder() {
- super(ParentProperty.class);
- }
-
- /**
- * Instantiates a new {@link ParentProperty @ParentProperty} object initialized with this builder.
- *
- * @return A new {@link ParentProperty @ParentProperty} object.
- */
- public ParentProperty build() {
- return new Impl(this);
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public ParentPropertyBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public ParentPropertyBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationMFBuilder */
- public ParentPropertyBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
index f2b2cf5..9d992be 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
@@ -38,7 +38,8 @@ import org.apache.juneau.transform.*;
@Target({TYPE,ANNOTATION_TYPE,FIELD,METHOD})
@Retention(RUNTIME)
@Inherited
-@Repeatable(SwapArray.class)
+@Repeatable(SwapAnnotation.Array.class)
+@PropertyStoreApply(SwapAnnotation.Apply.class)
public @interface Swap {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java
new file mode 100644
index 0000000..68f2d17
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java
@@ -0,0 +1,267 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+import static org.apache.juneau.internal.ArrayUtils.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Swap @Swap} annotation.
+ */
+public class SwapAnnotation {
+
+ /** Default value */
+ public static final Swap DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Swap copy(Swap a, VarResolverSession r) {
+ return
+ create()
+ .impl(a.impl())
+ .mediaTypes(r.resolve(a.mediaTypes()))
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .template(r.resolve(a.template()))
+ .value(a.value())
+ .build();
+ }
+
+ /**
+ * Builder class for the {@link Swap} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTMFBuilder {
+
+ Class<?> impl=Null.class, value=Null.class;
+ String template="";
+ String[] mediaTypes={};
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Swap.class);
+ }
+
+ /**
+ * Instantiates a new {@link Swap @Swap} object initialized with this builder.
+ *
+ * @return A new {@link Swap @Swap} object.
+ */
+ public Swap build() {
+ return new Impl(this);
+ }
+
+ /**
+ * Sets the {@link Swap#impl()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder impl(Class<?> value) {
+ this.impl = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Swap#mediaTypes()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder mediaTypes(String...value) {
+ this.mediaTypes = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Swap#template()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder template(String value) {
+ this.template = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Swap#value()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object (for method chaining).
+ */
+ public Builder value(Class<?> value) {
+ this.value = value;
+ return this;
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Swap {
+
+ private final Class<?> impl, value;
+ private final String template;
+ private final String[] mediaTypes;
+
+ Impl(Builder b) {
+ super(b);
+ this.impl = b.impl;
+ this.mediaTypes = copyOf(b.mediaTypes);
+ this.template = b.template;
+ this.value = b.value;
+ postConstruct();
+ }
+
+ @Override /* Swap */
+ public Class<?> impl() {
+ return impl;
+ }
+
+ @Override /* Swap */
+ public String[] mediaTypes() {
+ return mediaTypes;
+ }
+
+ @Override /* Swap */
+ public String template() {
+ return template;
+ }
+
+ @Override /* Swap */
+ public Class<?> value() {
+ return value;
+ }
+ }
+
+ /**
+ * Applies targeted {@link Swap} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public class Apply extends ConfigApply<Swap> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Swap> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Swap> ai, PropertyStoreBuilder psb) {
+ Swap a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Swap @Swap annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Swap[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapArray.java
deleted file mode 100644
index c1f020b..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Swap @Swap annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface SwapArray {
-
- /**
- * The child annotations.
- */
- Swap[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapBuilder.java
deleted file mode 100644
index d47e8ae..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapBuilder.java
+++ /dev/null
@@ -1,197 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static org.apache.juneau.internal.ArrayUtils.*;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-
-/**
- * Builder class for the {@link Swap} annotation.
- *
- * <ul class='seealso'>
- * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
- * </ul>
- */
-public class SwapBuilder extends TargetedAnnotationTMFBuilder {
-
- /** Default value */
- public static final Swap DEFAULT = create().build();
-
- /**
- * Instantiates a new builder for this class.
- *
- * @return A new builder object.
- */
- public static SwapBuilder create() {
- return new SwapBuilder();
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static SwapBuilder create(Class<?>...on) {
- return create().on(on);
- }
-
- /**
- * Instantiates a new builder for this class.
- *
- * @param on The targets this annotation applies to.
- * @return A new builder object.
- */
- public static SwapBuilder create(String...on) {
- return create().on(on);
- }
-
- private static class Impl extends TargetedAnnotationTImpl implements Swap {
-
- private final Class<?> impl, value;
- private final String template;
- private final String[] mediaTypes;
-
- Impl(SwapBuilder b) {
- super(b);
- this.impl = b.impl;
- this.mediaTypes = copyOf(b.mediaTypes);
- this.template = b.template;
- this.value = b.value;
- postConstruct();
- }
-
- @Override /* Swap */
- public Class<?> impl() {
- return impl;
- }
-
- @Override /* Swap */
- public String[] mediaTypes() {
- return mediaTypes;
- }
-
- @Override /* Swap */
- public String template() {
- return template;
- }
-
- @Override /* Swap */
- public Class<?> value() {
- return value;
- }
- }
-
-
- Class<?> impl=Null.class, value=Null.class;
- String template="";
- String[] mediaTypes={};
-
- /**
- * Constructor.
- */
- public SwapBuilder() {
- super(Swap.class);
- }
-
- /**
- * Instantiates a new {@link Swap @Swap} object initialized with this builder.
- *
- * @return A new {@link Swap @Swap} object.
- */
- public Swap build() {
- return new Impl(this);
- }
-
- /**
- * Sets the {@link Swap#impl()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public SwapBuilder impl(Class<?> value) {
- this.impl = value;
- return this;
- }
-
- /**
- * Sets the {@link Swap#mediaTypes()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public SwapBuilder mediaTypes(String...value) {
- this.mediaTypes = value;
- return this;
- }
-
- /**
- * Sets the {@link Swap#template()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public SwapBuilder template(String value) {
- this.template = value;
- return this;
- }
-
- /**
- * Sets the {@link Swap#value()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object (for method chaining).
- */
- public SwapBuilder value(Class<?> value) {
- this.value = value;
- return this;
- }
-
- // <FluentSetters>
-
- @Override /* GENERATED - TargetedAnnotationBuilder */
- public SwapBuilder on(String...values) {
- super.on(values);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public SwapBuilder on(java.lang.Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTBuilder */
- public SwapBuilder onClass(java.lang.Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public SwapBuilder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* GENERATED - TargetedAnnotationTMFBuilder */
- public SwapBuilder on(Method...value) {
- super.on(value);
- return this;
- }
-
- // </FluentSetters>
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
index 733a83a..2222456 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Uri.java
@@ -39,7 +39,8 @@ import java.lang.annotation.*;
@Target({TYPE,FIELD,METHOD})
@Retention(RUNTIME)
@Inherited
-@Repeatable(UriArray.class)
+@Repeatable(UriAnnotation.Array.class)
+@PropertyStoreApply(UriAnnotation.Apply.class)
public @interface Uri {
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
new file mode 100644
index 0000000..e1836e5
--- /dev/null
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
@@ -0,0 +1,186 @@
+// ***************************************************************************************************************************
+// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
+// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
+// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
+// * with the License. You may obtain a copy of the License at *
+// * *
+// * http://www.apache.org/licenses/LICENSE-2.0 *
+// * *
+// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
+// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
+// * specific language governing permissions and limitations under the License. *
+// ***************************************************************************************************************************
+package org.apache.juneau.annotation;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static org.apache.juneau.BeanContext.*;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+
+import org.apache.juneau.*;
+import org.apache.juneau.reflect.*;
+import org.apache.juneau.svl.*;
+
+/**
+ * Utility classes and methods for the {@link Uri @Uri} annotation.
+ */
+public class UriAnnotation {
+
+ /** Default value */
+ public static final Uri DEFAULT = create().build();
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @return A new builder object.
+ */
+ public static Builder create() {
+ return new Builder();
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(Class<?>...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Instantiates a new builder for this class.
+ *
+ * @param on The targets this annotation applies to.
+ * @return A new builder object.
+ */
+ public static Builder create(String...on) {
+ return create().on(on);
+ }
+
+ /**
+ * Builder class for the {@link Uri} annotation.
+ *
+ * <ul class='seealso'>
+ * <li class='jm'>{@link BeanContextBuilder#annotations(Annotation...)}
+ * </ul>
+ */
+ public static class Builder extends TargetedAnnotationTMFBuilder {
+
+ /**
+ * Constructor.
+ */
+ public Builder() {
+ super(Uri.class);
+ }
+
+ /**
+ * Instantiates a new {@link Uri @Uri} object initialized with this builder.
+ *
+ * @return A new {@link Uri @Uri} object.
+ */
+ public Uri build() {
+ return new Impl(this);
+ }
+
+ // <FluentSetters>
+
+ @Override /* GENERATED - TargetedAnnotationBuilder */
+ public Builder on(String...values) {
+ super.on(values);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder on(java.lang.Class<?>...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTBuilder */
+ public Builder onClass(java.lang.Class<?>...value) {
+ super.onClass(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* GENERATED - TargetedAnnotationTMFBuilder */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ // </FluentSetters>
+ }
+
+ /**
+ * Creates a copy of the specified annotation.
+ *
+ * @param a The annotation to copy.s
+ * @param r The var resolver for resolving any variables.
+ * @return A copy of the specified annotation.
+ */
+ public static Uri copy(Uri a, VarResolverSession r) {
+ return
+ create()
+ .on(r.resolve(a.on()))
+ .onClass(a.onClass())
+ .build();
+ }
+
+ private static class Impl extends TargetedAnnotationTImpl implements Uri {
+
+ Impl(Builder b) {
+ super(b);
+ postConstruct();
+ }
+ }
+
+ /**
+ * Applies targeted {@link Uri} annotations to a {@link PropertyStoreBuilder}.
+ */
+ public static class Apply extends ConfigApply<Uri> {
+
+ /**
+ * Constructor.
+ *
+ * @param c The annotation class.
+ * @param r The resolver for resolving values in annotations.
+ */
+ public Apply(Class<Uri> c, VarResolverSession r) {
+ super(c, r);
+ }
+
+ @Override
+ public void apply(AnnotationInfo<Uri> ai, PropertyStoreBuilder psb) {
+ Uri a = ai.getAnnotation();
+
+ if (isEmpty(a.on()) && isEmpty(a.onClass()))
+ return;
+
+ psb.prependTo(BEAN_annotations, copy(a, getVarResolver()));
+ }
+ }
+
+ /**
+ * A collection of {@link Uri @Uri annotations}.
+ */
+ @Documented
+ @Target({METHOD,TYPE})
+ @Retention(RUNTIME)
+ @Inherited
+ public static @interface Array {
+
+ /**
+ * The child annotations.
+ */
+ Uri[] value();
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriArray.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriArray.java
deleted file mode 100644
index f192221..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriArray.java
+++ /dev/null
@@ -1,33 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-
-/**
- * A collection of {@link Uri @Uri annotations}.
- */
-@Documented
-@Target({METHOD,TYPE})
-@Retention(RUNTIME)
-@Inherited
-public @interface UriArray {
-
- /**
- * The child annotations.
- */
- Uri[] value();
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriBuilder.java
deleted file mode 100644
index d54972e..0000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriBuilder.java
+++ /dev/null
@@ -1,119 +0,0 @@
-// ***************************************************************************************************************************
-// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file *
-// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file *
-// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance *
-// * with the License. You may obtain a copy of the License at *
-// * *
-// * http://www.apache.org/licenses/LICENSE-2.0 *
-// * *
-// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an *
-// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the *
-// * specific language governing permissions and limitations under the License. *
-// ***************************************************************************************************************************
-package org.apache.juneau.annotation;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
... 34659 lines suppressed ...