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 2026/05/11 22:00:13 UTC
(juneau) 01/05: refactor(marshall): merge @Bean/@Marshalled annotation surfaces into unified @Marshalled family
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
commit 71c08ff1f9b7bacad1287cbc8bed7ba25f9f5f18
Author: James Bognar <ja...@jamesbog-ltmjqf2.internal.salesforce.com>
AuthorDate: Mon May 11 16:55:11 2026 -0400
refactor(marshall): merge @Bean/@Marshalled annotation surfaces into unified @Marshalled family
Co-authored-by: Cursor <cu...@cursor.com>
---
.../java/org/apache/juneau/bean/atom/Category.java | 2 +-
.../java/org/apache/juneau/bean/atom/Entry.java | 2 +-
.../java/org/apache/juneau/bean/atom/Feed.java | 2 +-
.../org/apache/juneau/bean/atom/Generator.java | 2 +-
.../java/org/apache/juneau/bean/atom/Icon.java | 2 +-
.../main/java/org/apache/juneau/bean/atom/Id.java | 2 +-
.../java/org/apache/juneau/bean/atom/Link.java | 2 +-
.../java/org/apache/juneau/bean/atom/Logo.java | 2 +-
.../java/org/apache/juneau/bean/LinkString.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/A.java | 2 +-
.../java/org/apache/juneau/bean/html5/Abbr.java | 2 +-
.../java/org/apache/juneau/bean/html5/Address.java | 2 +-
.../java/org/apache/juneau/bean/html5/Area.java | 2 +-
.../java/org/apache/juneau/bean/html5/Article.java | 2 +-
.../java/org/apache/juneau/bean/html5/Aside.java | 2 +-
.../java/org/apache/juneau/bean/html5/Audio.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/B.java | 2 +-
.../java/org/apache/juneau/bean/html5/Base.java | 2 +-
.../java/org/apache/juneau/bean/html5/Bdi.java | 2 +-
.../java/org/apache/juneau/bean/html5/Bdo.java | 2 +-
.../org/apache/juneau/bean/html5/Blockquote.java | 2 +-
.../java/org/apache/juneau/bean/html5/Body.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Br.java | 2 +-
.../java/org/apache/juneau/bean/html5/Button.java | 2 +-
.../java/org/apache/juneau/bean/html5/Canvas.java | 2 +-
.../java/org/apache/juneau/bean/html5/Caption.java | 2 +-
.../java/org/apache/juneau/bean/html5/Cite.java | 2 +-
.../java/org/apache/juneau/bean/html5/Code.java | 2 +-
.../java/org/apache/juneau/bean/html5/Col.java | 2 +-
.../org/apache/juneau/bean/html5/Colgroup.java | 2 +-
.../java/org/apache/juneau/bean/html5/Data.java | 2 +-
.../org/apache/juneau/bean/html5/Datalist.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Dd.java | 2 +-
.../java/org/apache/juneau/bean/html5/Del.java | 2 +-
.../java/org/apache/juneau/bean/html5/Dfn.java | 2 +-
.../java/org/apache/juneau/bean/html5/Div.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Dl.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Dt.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Em.java | 2 +-
.../java/org/apache/juneau/bean/html5/Embed.java | 2 +-
.../org/apache/juneau/bean/html5/Fieldset.java | 2 +-
.../org/apache/juneau/bean/html5/Figcaption.java | 2 +-
.../java/org/apache/juneau/bean/html5/Figure.java | 2 +-
.../java/org/apache/juneau/bean/html5/Footer.java | 2 +-
.../java/org/apache/juneau/bean/html5/Form.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H1.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H2.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H3.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H4.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H5.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/H6.java | 2 +-
.../java/org/apache/juneau/bean/html5/Head.java | 2 +-
.../java/org/apache/juneau/bean/html5/Header.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Hr.java | 2 +-
.../java/org/apache/juneau/bean/html5/Html.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/I.java | 2 +-
.../java/org/apache/juneau/bean/html5/Iframe.java | 2 +-
.../java/org/apache/juneau/bean/html5/Img.java | 2 +-
.../java/org/apache/juneau/bean/html5/Input.java | 2 +-
.../java/org/apache/juneau/bean/html5/Ins.java | 2 +-
.../java/org/apache/juneau/bean/html5/Kbd.java | 2 +-
.../java/org/apache/juneau/bean/html5/Keygen.java | 2 +-
.../java/org/apache/juneau/bean/html5/Label.java | 2 +-
.../java/org/apache/juneau/bean/html5/Legend.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Li.java | 2 +-
.../java/org/apache/juneau/bean/html5/Link.java | 2 +-
.../java/org/apache/juneau/bean/html5/Main.java | 2 +-
.../java/org/apache/juneau/bean/html5/Map.java | 2 +-
.../java/org/apache/juneau/bean/html5/Mark.java | 2 +-
.../java/org/apache/juneau/bean/html5/Meta.java | 2 +-
.../java/org/apache/juneau/bean/html5/Meter.java | 2 +-
.../java/org/apache/juneau/bean/html5/Nav.java | 2 +-
.../org/apache/juneau/bean/html5/Noscript.java | 2 +-
.../java/org/apache/juneau/bean/html5/Object_.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Ol.java | 2 +-
.../org/apache/juneau/bean/html5/Optgroup.java | 2 +-
.../java/org/apache/juneau/bean/html5/Option.java | 2 +-
.../java/org/apache/juneau/bean/html5/Output.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/P.java | 2 +-
.../java/org/apache/juneau/bean/html5/Param.java | 2 +-
.../java/org/apache/juneau/bean/html5/Pre.java | 2 +-
.../org/apache/juneau/bean/html5/Progress.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Q.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Rb.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Rp.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Rt.java | 2 +-
.../java/org/apache/juneau/bean/html5/Rtc.java | 2 +-
.../java/org/apache/juneau/bean/html5/Ruby.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/S.java | 2 +-
.../java/org/apache/juneau/bean/html5/Samp.java | 2 +-
.../java/org/apache/juneau/bean/html5/Script.java | 2 +-
.../java/org/apache/juneau/bean/html5/Section.java | 2 +-
.../java/org/apache/juneau/bean/html5/Select.java | 2 +-
.../java/org/apache/juneau/bean/html5/Small.java | 2 +-
.../java/org/apache/juneau/bean/html5/Source.java | 2 +-
.../java/org/apache/juneau/bean/html5/Span.java | 2 +-
.../java/org/apache/juneau/bean/html5/Strong.java | 2 +-
.../java/org/apache/juneau/bean/html5/Style.java | 2 +-
.../java/org/apache/juneau/bean/html5/Sub.java | 2 +-
.../java/org/apache/juneau/bean/html5/Sup.java | 2 +-
.../java/org/apache/juneau/bean/html5/Table.java | 2 +-
.../java/org/apache/juneau/bean/html5/Tbody.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Td.java | 2 +-
.../org/apache/juneau/bean/html5/Template.java | 2 +-
.../org/apache/juneau/bean/html5/Textarea.java | 2 +-
.../java/org/apache/juneau/bean/html5/Tfoot.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Th.java | 2 +-
.../java/org/apache/juneau/bean/html5/Thead.java | 2 +-
.../java/org/apache/juneau/bean/html5/Time.java | 2 +-
.../java/org/apache/juneau/bean/html5/Title.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Tr.java | 2 +-
.../java/org/apache/juneau/bean/html5/Track.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/U.java | 2 +-
.../main/java/org/apache/juneau/bean/html5/Ul.java | 2 +-
.../java/org/apache/juneau/bean/html5/Var.java | 2 +-
.../java/org/apache/juneau/bean/html5/Video.java | 2 +-
.../java/org/apache/juneau/bean/html5/Wbr.java | 2 +-
.../apache/juneau/bean/jsonschema/JsonSchema.java | 2 +-
.../juneau/bean/mcp/BlobResourceContents.java | 2 +-
.../apache/juneau/bean/mcp/CallToolRequest.java | 2 +-
.../org/apache/juneau/bean/mcp/CallToolResult.java | 2 +-
.../apache/juneau/bean/mcp/ClientCapabilities.java | 2 +-
.../java/org/apache/juneau/bean/mcp/Content.java | 2 +-
.../juneau/bean/mcp/EmbeddedResourceContent.java | 2 +-
.../apache/juneau/bean/mcp/GetPromptRequest.java | 2 +-
.../apache/juneau/bean/mcp/GetPromptResult.java | 2 +-
.../org/apache/juneau/bean/mcp/ImageContent.java | 2 +-
.../org/apache/juneau/bean/mcp/Implementation.java | 2 +-
.../apache/juneau/bean/mcp/InitializeRequest.java | 2 +-
.../apache/juneau/bean/mcp/InitializeResult.java | 2 +-
.../org/apache/juneau/bean/mcp/JsonRpcError.java | 2 +-
.../org/apache/juneau/bean/mcp/JsonRpcRequest.java | 2 +-
.../apache/juneau/bean/mcp/JsonRpcResponse.java | 2 +-
.../org/apache/juneau/bean/mcp/JsonSchema.java | 2 +-
.../apache/juneau/bean/mcp/ListPromptsResult.java | 2 +-
.../juneau/bean/mcp/ListResourcesResult.java | 2 +-
.../apache/juneau/bean/mcp/ListToolsResult.java | 2 +-
.../apache/juneau/bean/mcp/LoggingCapability.java | 2 +-
.../org/apache/juneau/bean/mcp/McpException.java | 2 +-
.../java/org/apache/juneau/bean/mcp/Prompt.java | 2 +-
.../org/apache/juneau/bean/mcp/PromptArgument.java | 2 +-
.../apache/juneau/bean/mcp/PromptCapability.java | 2 +-
.../org/apache/juneau/bean/mcp/PromptMessage.java | 2 +-
.../juneau/bean/mcp/ReadResourceRequest.java | 2 +-
.../apache/juneau/bean/mcp/ReadResourceResult.java | 2 +-
.../java/org/apache/juneau/bean/mcp/Resource.java | 2 +-
.../apache/juneau/bean/mcp/ResourceCapability.java | 2 +-
.../apache/juneau/bean/mcp/ResourceContents.java | 2 +-
.../apache/juneau/bean/mcp/RootsCapability.java | 2 +-
.../apache/juneau/bean/mcp/ServerCapabilities.java | 2 +-
.../org/apache/juneau/bean/mcp/TextContent.java | 2 +-
.../juneau/bean/mcp/TextResourceContents.java | 2 +-
.../main/java/org/apache/juneau/bean/mcp/Tool.java | 2 +-
.../org/apache/juneau/bean/mcp/ToolCapability.java | 2 +-
.../org/apache/juneau/bean/mcp/package-info.java | 2 +-
.../juneau/bean/openapi3/OpenApiElement.java | 2 +-
.../commons/annotation/AnnotationObject.java | 8 +-
.../annotation/AppliedAnnotationObject.java | 4 +-
.../annotation/AppliedOnClassAnnotationObject.java | 6 +-
.../juneau/commons/function/BeanChannel.java | 2 +-
.../juneau/commons/function/BeanConsumer.java | 2 +-
.../juneau/commons/function/BeanFactory.java | 8 +-
.../juneau/commons/function/BeanSupplier.java | 2 +-
.../juneau/commons/function/package-info.java | 16 +-
.../juneau/commons/reflect/AnnotationInfo.java | 2 +-
.../juneau/commons/reflect/AnnotationProvider.java | 20 +-
.../apache/juneau/commons/reflect/ClassInfo.java | 4 +-
.../juneau/commons/reflect/ExecutableInfo.java | 4 +-
.../apache/juneau/commons/reflect/FieldInfo.java | 4 +-
.../apache/juneau/commons/reflect/MethodInfo.java | 8 +-
.../juneau/commons/reflect/ParameterInfo.java | 4 +-
.../main/java/org/apache/juneau/BeanContext.java | 130 +--
.../java/org/apache/juneau/BeanContextable.java | 72 +-
.../java/org/apache/juneau/BeanDictionaryList.java | 8 +-
.../java/org/apache/juneau/BeanDictionaryMap.java | 4 +-
.../main/java/org/apache/juneau/BeanFilter.java | 1007 --------------------
.../src/main/java/org/apache/juneau/BeanMap.java | 4 +-
.../src/main/java/org/apache/juneau/BeanMeta.java | 88 +-
.../java/org/apache/juneau/BeanMetaFiltered.java | 2 +-
.../main/java/org/apache/juneau/BeanRegistry.java | 8 +-
.../src/main/java/org/apache/juneau/ClassMeta.java | 27 +-
.../src/main/java/org/apache/juneau/Context.java | 12 +-
.../java/org/apache/juneau/MarshalledFilter.java | 654 ++++++++++++-
.../main/java/org/apache/juneau/PropertyNamer.java | 2 +-
.../main/java/org/apache/juneau/UriContext.java | 2 +-
.../java/org/apache/juneau/annotation/Bean.java | 539 -----------
.../apache/juneau/annotation/BeanAnnotation.java | 492 ----------
.../org/apache/juneau/annotation/BeanApply.java | 99 --
.../juneau/annotation/BeanApplyAnnotation.java | 231 -----
.../org/apache/juneau/annotation/BeanConfig.java | 10 +-
.../juneau/annotation/BeanConfigAnnotation.java | 2 +-
.../java/org/apache/juneau/annotation/Beanc.java | 2 +-
.../java/org/apache/juneau/annotation/Beanp.java | 2 +-
.../org/apache/juneau/annotation/Marshalled.java | 406 +++++++-
.../juneau/annotation/MarshalledAnnotation.java | 349 +++++++
.../annotation/MarshalledApplyAnnotation.java | 27 +-
.../org/apache/juneau/parser/ParserSession.java | 2 +-
.../org/apache/juneau/serializer/Serializer.java | 6 +-
.../serializer/annotation/SerializerConfig.java | 2 +-
.../org/apache/juneau/swap/BeanInterceptor.java | 4 +-
.../main/java/org/apache/juneau/xml/Namespace.java | 2 +-
.../juneau/examples/rest/RequestEchoResource.java | 6 +-
.../juneau/examples/rest/UtilityBeansResource.java | 2 +-
.../microservice/resources/DirectoryResource.java | 2 +-
.../microservice/resources/LogsResource.java | 2 +-
.../org/apache/juneau/rest/client/RestClient.java | 6 +-
.../org/apache/juneau/rest/client/RestRequest.java | 2 +-
.../apache/juneau/rest/beans/BeanDescription.java | 4 +-
.../juneau/rest/beans/ResourceDescription.java | 2 +-
.../apache/juneau/rest/stats/RestContextStats.java | 2 +-
.../java/org/apache/juneau/Annotations_Test.java | 8 +-
.../java/org/apache/juneau/BeanConfig_Test.java | 8 +-
.../java/org/apache/juneau/BeanMapErrors_Test.java | 16 +-
.../test/java/org/apache/juneau/BeanMap_Test.java | 32 +-
.../java/org/apache/juneau/BeanStreaming_Test.java | 2 +-
.../apache/juneau/DynaBean_ComboRoundTripTest.java | 12 +-
...Filter_Test.java => MarshalledFilter_Test.java} | 26 +-
.../juneau/ReadWriteOnlyProperties_Test.java | 22 +-
.../SerializerProperties_ComboRoundTripTest.java | 6 +-
.../juneau/a/rttests/Generics_RoundTripTest.java | 2 +-
.../juneau/a/rttests/Records_RoundTripTest.java | 10 +-
.../a/rttests/RoundTripAddClassAttrs_Test.java | 12 +-
.../juneau/a/rttests/RoundTripBeanMaps_Test.java | 60 +-
.../a/rttests/RoundTripBeansWithBuilders_Test.java | 14 +-
.../a/rttests/RoundTripTransformBeans_Test.java | 4 +-
.../juneau/annotation/BeanAnnotation_Test.java | 164 ----
.../annotation/BeanConfigAnnotation_Test.java | 10 +-
.../annotation/MarshalledAnnotation_Test.java | 92 +-
.../{Bean_Test.java => Marshalled_Test.java} | 62 +-
.../html5/Html5Template_ComboRoundTripTest.java | 2 +-
.../java/org/apache/juneau/csv/CsvParser_Test.java | 2 +-
.../test/java/org/apache/juneau/csv/Csv_Test.java | 6 +-
.../org/apache/juneau/html/BasicHtml_Test.java | 22 +-
.../org/apache/juneau/html/CommonParser_Test.java | 2 +-
.../juneau/html/HtmlSchemaSerializer_Test.java | 4 +-
.../java/org/apache/juneau/html/Html_Test.java | 4 +-
.../org/apache/juneau/ini/IniRoundTrip_Test.java | 6 +-
.../org/apache/juneau/jena/RdfParser_Test.java | 2 +-
.../org/apache/juneau/jena/RdfSerializer_Test.java | 2 +-
.../org/apache/juneau/json/CommonParser_Test.java | 2 +-
.../org/apache/juneau/json5/CommonParser_Test.java | 2 +-
.../org/apache/juneau/jsonl/JsonlParser_Test.java | 2 +-
.../apache/juneau/jsonl/JsonlRoundTrip_Test.java | 6 +-
.../java/org/apache/juneau/jsonl/Jsonl_Test.java | 2 +-
.../juneau/jsonschema/JsonSchemaGeneratorTest.java | 24 +-
.../juneau/markdown/MarkdownParser_Test.java | 2 +-
.../apache/juneau/objecttools/ObjectRest_Test.java | 4 +-
.../java/org/apache/juneau/rest/Swagger_Test.java | 4 +-
.../juneau/rest/annotation/Content_Test.java | 6 +-
.../rest/annotation/RestOp_BeanConfig_Test.java | 38 +-
.../client/RestClient_Config_BeanContext_Test.java | 4 +-
.../client/RestClient_Config_Context_Test.java | 4 +-
.../client/RestClient_Config_Serializer_Test.java | 2 +-
.../java/org/apache/juneau/serializer/TestURI.java | 2 +-
.../org/apache/juneau/serializer/TestURIc.java | 2 +-
.../org/apache/juneau/testutils/pojos/TestURI.java | 2 +-
.../apache/juneau/testutils/pojos/TypedBean.java | 2 +-
.../juneau/testutils/pojos/TypedBeanImpl.java | 2 +-
.../org/apache/juneau/testutils/pojos/XBeans.java | 6 +-
.../BeanDictionary_ComboRoundTripTest.java | 8 +-
...Filter_Test.java => MarshalledFilter_Test.java} | 18 +-
.../apache/juneau/uon/CommonParser_UonTest.java | 2 +-
.../urlencoding/CommonParser_UrlEncodingTest.java | 2 +-
.../java/org/apache/juneau/urlencoding/DTOs.java | 6 +-
.../java/org/apache/juneau/urlencoding/DTOs2.java | 6 +-
.../urlencoding/UrlEncodingSerializer_Test.java | 2 +-
.../java/org/apache/juneau/xml/BasicXml_Test.java | 32 +-
.../java/org/apache/juneau/xml/CommonXml_Test.java | 4 +-
.../org/apache/juneau/xml/XmlCollapsed_Test.java | 6 +-
.../org/apache/juneau/xml/XmlContent_Test.java | 4 +-
.../apache/juneau/xml/XmlIgnoreComments_Test.java | 32 +-
.../test/java/org/apache/juneau/xml/Xml_Test.java | 28 +-
.../test/java/org/apache/juneau/xml/xml1a/T1.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1a/T2.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1b/T3.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1b/T4.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1b/T5.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1b/T6.java | 2 +-
.../test/java/org/apache/juneau/xml/xml1b/T7.java | 2 +-
279 files changed, 2223 insertions(+), 3302 deletions(-)
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
index f00819c025..da9cadd1ba 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Category.java
@@ -77,7 +77,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "category")
+@Marshalled(typeName = "category")
public class Category extends Common {
private String term;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
index da486957cf..bd8c5cc484 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Entry.java
@@ -109,7 +109,7 @@ import org.apache.juneau.commons.time.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "entry")
+@Marshalled(typeName = "entry")
public class Entry extends CommonEntry {
private Content content;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
index e995f37c59..d219e46dee 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Feed.java
@@ -109,7 +109,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "feed")
+@Marshalled(typeName = "feed")
public class Feed extends CommonEntry {
// @formatter:off
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
index 1609c7ed4a..872b15fff7 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Generator.java
@@ -69,7 +69,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "generator")
+@Marshalled(typeName = "generator")
public class Generator extends Common {
private URI uri;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
index 2e59b980c9..6a848bcedb 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Icon.java
@@ -67,7 +67,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "icon")
+@Marshalled(typeName = "icon")
public class Icon extends Common {
private URI uri;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
index d14259827e..7020c18257 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Id.java
@@ -76,7 +76,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://www.ietf.org/rfc/rfc4151.txt">RFC 4151 - Tag URI Scheme</a>
* </ul>
*/
-@Bean(typeName = "id")
+@Marshalled(typeName = "id")
public class Id extends Common {
private String text;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
index 413b351b72..8e5f7686f6 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Link.java
@@ -80,7 +80,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://www.iana.org/assignments/link-relations/link-relations.xhtml">IANA Link Relations</a>
* </ul>
*/
-@Bean(typeName = "link")
+@Marshalled(typeName = "link")
public class Link extends Common {
private String href;
diff --git a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
index 80b941733b..a9c674a0de 100644
--- a/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
+++ b/juneau-bean/juneau-bean-atom/src/main/java/org/apache/juneau/bean/atom/Logo.java
@@ -67,7 +67,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='extlink'><a class="doclink" href="https://tools.ietf.org/html/rfc4287">RFC 4287 - The Atom Syndication Format</a>
* </ul>
*/
-@Bean(typeName = "logo")
+@Marshalled(typeName = "logo")
public class Logo extends Common {
private URI uri;
diff --git a/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java b/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
index 052c74eb16..cd63728d6e 100644
--- a/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
+++ b/juneau-bean/juneau-bean-common/src/main/java/org/apache/juneau/bean/LinkString.java
@@ -44,7 +44,7 @@ import org.apache.juneau.serializer.*;
*
*/
@HtmlLink
-@Bean(findFluentSetters = true)
+@Marshalled(findFluentSetters = true)
public class LinkString implements Comparable<LinkString> {
private String name;
private java.net.URI uri;
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
index 21f6a9d212..af60901eb0 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/A.java
@@ -59,7 +59,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "a")
+@Marshalled(typeName = "a")
public class A extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Abbr.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Abbr.java
index 0a5e02efe3..d0a49f5f68 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Abbr.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Abbr.java
@@ -74,7 +74,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "abbr")
+@Marshalled(typeName = "abbr")
public class Abbr extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Address.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Address.java
index 75f44944dc..66f59740cd 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Address.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Address.java
@@ -95,7 +95,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "address")
+@Marshalled(typeName = "address")
public class Address extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
index ebc217e362..37f16dc7c4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Area.java
@@ -58,7 +58,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "area")
+@Marshalled(typeName = "area")
public class Area extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
index 7e46960c70..26f91e4b01 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Article.java
@@ -120,7 +120,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "article")
+@Marshalled(typeName = "article")
public class Article extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Aside.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Aside.java
index 24d0dcb53b..4fcbb81f43 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Aside.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Aside.java
@@ -102,7 +102,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "aside")
+@Marshalled(typeName = "aside")
public class Aside extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
index 3b4dd61c16..0bcf56e5f2 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Audio.java
@@ -61,7 +61,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "audio")
+@Marshalled(typeName = "audio")
public class Audio extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/B.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/B.java
index 4ddc80be39..be555d08ea 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/B.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/B.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "b")
+@Marshalled(typeName = "b")
public class B extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
index 2f72287a14..32770ec8f4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Base.java
@@ -56,7 +56,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "base")
+@Marshalled(typeName = "base")
public class Base extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdi.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdi.java
index cae9d5b789..dfe28e3153 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdi.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdi.java
@@ -73,7 +73,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "bdi")
+@Marshalled(typeName = "bdi")
public class Bdi extends HtmlElementText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdo.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdo.java
index 30b31beebc..d4f87ad2c4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdo.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Bdo.java
@@ -71,7 +71,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "bdo")
+@Marshalled(typeName = "bdo")
public class Bdo extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
index 5c180d71f0..c32ebfded2 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Blockquote.java
@@ -61,7 +61,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "blockquote")
+@Marshalled(typeName = "blockquote")
public class Blockquote extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
index fb15b590cb..78fab9b604 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Body.java
@@ -66,7 +66,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "body")
+@Marshalled(typeName = "body")
public class Body extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Br.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Br.java
index 00f741533d..5bf8d3aef8 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Br.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Br.java
@@ -99,7 +99,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "br")
+@Marshalled(typeName = "br")
public class Br extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
index a6a99324ab..88448e7de9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Button.java
@@ -74,7 +74,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "button")
+@Marshalled(typeName = "button")
public class Button extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
index 7081b58ab6..e28039578b 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Canvas.java
@@ -84,7 +84,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "canvas")
+@Marshalled(typeName = "canvas")
public class Canvas extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Caption.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Caption.java
index ab68f4d900..f9db1131eb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Caption.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Caption.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "caption")
+@Marshalled(typeName = "caption")
public class Caption extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Cite.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Cite.java
index 23690a9839..b72f91e668 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Cite.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Cite.java
@@ -89,7 +89,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "cite")
+@Marshalled(typeName = "cite")
public class Cite extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Code.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Code.java
index 9b60d34a06..92707ee396 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Code.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Code.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "code")
+@Marshalled(typeName = "code")
public class Code extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
index 14cddbf77c..91f8058c88 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Col.java
@@ -79,7 +79,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "col")
+@Marshalled(typeName = "col")
public class Col extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
index 303f6dd24b..7c964a4033 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Colgroup.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "colgroup")
+@Marshalled(typeName = "colgroup")
public class Colgroup extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
index db6cbf5722..49b8be8574 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Data.java
@@ -83,7 +83,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "data")
+@Marshalled(typeName = "data")
public class Data extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Datalist.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Datalist.java
index 267d914364..5fd7f86a08 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Datalist.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Datalist.java
@@ -97,7 +97,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "datalist")
+@Marshalled(typeName = "datalist")
public class Datalist extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dd.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dd.java
index f2ca143683..c6d033f0f3 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dd.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dd.java
@@ -88,7 +88,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "dd")
+@Marshalled(typeName = "dd")
public class Dd extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
index 1b1412b5b8..a568db610b 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Del.java
@@ -63,7 +63,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "del")
+@Marshalled(typeName = "del")
public class Del extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dfn.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dfn.java
index d9a3435b44..e7101d0179 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dfn.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dfn.java
@@ -80,7 +80,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "dfn")
+@Marshalled(typeName = "dfn")
public class Dfn extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Div.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Div.java
index 08efe1f6fc..4c1fceb111 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Div.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Div.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "div")
+@Marshalled(typeName = "div")
public class Div extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dl.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dl.java
index a6f57015a9..25bb81a118 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dl.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dl.java
@@ -108,7 +108,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "dl")
+@Marshalled(typeName = "dl")
public class Dl extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dt.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dt.java
index 10652c0c13..8fc7adcf81 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dt.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Dt.java
@@ -82,7 +82,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "dt")
+@Marshalled(typeName = "dt")
public class Dt extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Em.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Em.java
index bedf99dded..a2050b9e32 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Em.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Em.java
@@ -85,7 +85,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "em")
+@Marshalled(typeName = "em")
public class Em extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
index c4e86a36f5..72590ba508 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Embed.java
@@ -71,7 +71,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "embed")
+@Marshalled(typeName = "embed")
public class Embed extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
index 640c6019d7..fc60751e45 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Fieldset.java
@@ -67,7 +67,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "fieldset")
+@Marshalled(typeName = "fieldset")
public class Fieldset extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figcaption.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figcaption.java
index 50d129fcab..74b6751360 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figcaption.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figcaption.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "figcaption")
+@Marshalled(typeName = "figcaption")
public class Figcaption extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figure.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figure.java
index 16ca83b9e8..e986d5d9eb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figure.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Figure.java
@@ -103,7 +103,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "figure")
+@Marshalled(typeName = "figure")
public class Figure extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Footer.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Footer.java
index 0af6c564f5..24c766586a 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Footer.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Footer.java
@@ -102,7 +102,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "footer")
+@Marshalled(typeName = "footer")
public class Footer extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
index 04f11b6fa4..475ddf369e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Form.java
@@ -80,7 +80,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "form")
+@Marshalled(typeName = "form")
public class Form extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H1.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H1.java
index 23116c22c8..a244b57dfe 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H1.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H1.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h1")
+@Marshalled(typeName = "h1")
public class H1 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H2.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H2.java
index b5da61b223..28a41f4beb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H2.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H2.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h2")
+@Marshalled(typeName = "h2")
public class H2 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H3.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H3.java
index 0b4976ef34..4e7be8fb80 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H3.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H3.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h3")
+@Marshalled(typeName = "h3")
public class H3 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H4.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H4.java
index 3958c773e2..632d0ea65d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H4.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H4.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h4")
+@Marshalled(typeName = "h4")
public class H4 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H5.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H5.java
index 4c5b3ee5f9..9689895e3d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H5.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H5.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h5")
+@Marshalled(typeName = "h5")
public class H5 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H6.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H6.java
index b24511b145..a1b04647f1 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H6.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/H6.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "h6")
+@Marshalled(typeName = "h6")
public class H6 extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Head.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Head.java
index e5719f515b..a97c03448f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Head.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Head.java
@@ -105,7 +105,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "head")
+@Marshalled(typeName = "head")
public class Head extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Header.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Header.java
index 28b86fb90e..5abe5cc3dd 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Header.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Header.java
@@ -109,7 +109,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "header")
+@Marshalled(typeName = "header")
public class Header extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Hr.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Hr.java
index 8ca3d5d474..fbdadfb7df 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Hr.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Hr.java
@@ -79,7 +79,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "hr")
+@Marshalled(typeName = "hr")
public class Hr extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
index f0666da7e5..1d971aa1cc 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Html.java
@@ -72,7 +72,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "html")
+@Marshalled(typeName = "html")
public class Html extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/I.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/I.java
index 522f33ccd0..5e984cd0be 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/I.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/I.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "i")
+@Marshalled(typeName = "i")
public class I extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
index 872964ec0c..9662d5ad78 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Iframe.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "iframe")
+@Marshalled(typeName = "iframe")
public class Iframe extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
index b329a48ee4..937e2a961a 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Img.java
@@ -76,7 +76,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "img")
+@Marshalled(typeName = "img")
public class Img extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
index 83214f99d1..828c8695ce 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Input.java
@@ -80,7 +80,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "input")
+@Marshalled(typeName = "input")
public class Input extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
index dd8931dd53..5eb3fb613c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ins.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "ins")
+@Marshalled(typeName = "ins")
public class Ins extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Kbd.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Kbd.java
index 4db29f80d8..6f17f51b5e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Kbd.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Kbd.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "kbd")
+@Marshalled(typeName = "kbd")
public class Kbd extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
index 70ce6d5483..72bb983e3e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Keygen.java
@@ -69,7 +69,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "keygen")
+@Marshalled(typeName = "keygen")
public class Keygen extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
index 297ec925fc..d2317fe8d9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Label.java
@@ -56,7 +56,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "label")
+@Marshalled(typeName = "label")
public class Label extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
index 60effdea7a..0b6676f04c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Legend.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "legend")
+@Marshalled(typeName = "legend")
public class Legend extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
index 7cb2bb7fb1..e74070565e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Li.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "li")
+@Marshalled(typeName = "li")
public class Li extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
index c8def24081..c06e09e370 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Link.java
@@ -89,7 +89,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "link")
+@Marshalled(typeName = "link")
public class Link extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Main.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Main.java
index 2095103f5b..1364bad414 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Main.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Main.java
@@ -104,7 +104,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "main")
+@Marshalled(typeName = "main")
public class Main extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
index 85c77008db..328708ae59 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Map.java
@@ -60,7 +60,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "map")
+@Marshalled(typeName = "map")
public class Map extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
index 13f6609d0a..11a625d2b9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Mark.java
@@ -76,7 +76,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "mark")
+@Marshalled(typeName = "mark")
public class Mark extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
index 028c93378b..c45f6373de 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meta.java
@@ -67,7 +67,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "meta")
+@Marshalled(typeName = "meta")
public class Meta extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
index b956aebfe2..8e06336b3f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Meter.java
@@ -91,7 +91,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "meter")
+@Marshalled(typeName = "meter")
public class Meter extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Nav.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Nav.java
index 415c01b289..c29be82e91 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Nav.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Nav.java
@@ -112,7 +112,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "nav")
+@Marshalled(typeName = "nav")
public class Nav extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
index 91f1a9db81..b6ccacabe9 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Noscript.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "noscript")
+@Marshalled(typeName = "noscript")
public class Noscript extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
index 03fac68588..46fad337ca 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Object_.java
@@ -97,7 +97,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "object")
+@Marshalled(typeName = "object")
@SuppressWarnings({
"java:S100", // Class name uses underscore suffix to avoid conflict with java.lang.Object
"java:S101" // Class name uses underscore suffix to avoid conflict with java.lang.Object
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
index e2ce32d07c..58ca89c763 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ol.java
@@ -82,7 +82,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "ol")
+@Marshalled(typeName = "ol")
public class Ol extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
index c382effc4a..43f78431cd 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Optgroup.java
@@ -74,7 +74,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "optgroup")
+@Marshalled(typeName = "optgroup")
public class Optgroup extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
index 7f504fbf91..4acad44b42 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Option.java
@@ -69,7 +69,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "option")
+@Marshalled(typeName = "option")
public class Option extends HtmlElementText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
index 48ed1fa3ba..21f013053c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Output.java
@@ -71,7 +71,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "output")
+@Marshalled(typeName = "output")
public class Output extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/P.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/P.java
index e85e6d1f46..82772aebfc 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/P.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/P.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "p")
+@Marshalled(typeName = "p")
public class P extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
index 01dff3675d..ced21650da 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Param.java
@@ -69,7 +69,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "param")
+@Marshalled(typeName = "param")
public class Param extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
index e489186a76..1f0b7730ea 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Pre.java
@@ -100,7 +100,7 @@ import org.apache.juneau.xml.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "pre")
+@Marshalled(typeName = "pre")
public class Pre extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
index 7f6d957794..43d8bfba15 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Progress.java
@@ -83,7 +83,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "progress")
+@Marshalled(typeName = "progress")
public class Progress extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
index fd6311e074..3590446fec 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Q.java
@@ -66,7 +66,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "q")
+@Marshalled(typeName = "q")
public class Q extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
index 935bd92251..adcf5a0c5e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rb.java
@@ -76,7 +76,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "rb")
+@Marshalled(typeName = "rb")
public class Rb extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
index 2277282fc8..f65b541464 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rp.java
@@ -75,7 +75,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "rp")
+@Marshalled(typeName = "rp")
public class Rp extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
index 8be2c48f24..90066d8d20 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rt.java
@@ -76,7 +76,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "rt")
+@Marshalled(typeName = "rt")
public class Rt extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
index 3234355134..e8899f06c4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Rtc.java
@@ -91,7 +91,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "rtc")
+@Marshalled(typeName = "rtc")
public class Rtc extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
index 29eeeda431..b071d1dbd1 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ruby.java
@@ -91,7 +91,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "ruby")
+@Marshalled(typeName = "ruby")
public class Ruby extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
index 0b971352d1..600266252e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/S.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "s")
+@Marshalled(typeName = "s")
public class S extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
index 8b9cfc76cb..96818eeeeb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Samp.java
@@ -78,7 +78,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "samp")
+@Marshalled(typeName = "samp")
public class Samp extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
index c8c0010d87..2c897b97ee 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Script.java
@@ -78,7 +78,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "script")
+@Marshalled(typeName = "script")
public class Script extends HtmlElementRawText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Section.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Section.java
index 89f88a8580..ecb6f0f61f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Section.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Section.java
@@ -92,7 +92,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "section")
+@Marshalled(typeName = "section")
public class Section extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
index 7a3da2649e..282cbfb9ef 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Select.java
@@ -85,7 +85,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "select")
+@Marshalled(typeName = "select")
public class Select extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
index 0f9fd268ff..5cf0495b50 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Small.java
@@ -54,7 +54,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "small")
+@Marshalled(typeName = "small")
public class Small extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
index 0ce3646dc4..1c1c444afb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Source.java
@@ -80,7 +80,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "source")
+@Marshalled(typeName = "source")
public class Source extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
index ab14758cf7..9bf8097316 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Span.java
@@ -64,7 +64,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "span")
+@Marshalled(typeName = "span")
public class Span extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
index 17bb0a8f07..308b00931e 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Strong.java
@@ -53,7 +53,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "strong")
+@Marshalled(typeName = "strong")
public class Strong extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
index 636170674b..d359e8e81c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Style.java
@@ -77,7 +77,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "style")
+@Marshalled(typeName = "style")
public class Style extends HtmlElementRawText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
index 68abbea126..97e2a98740 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sub.java
@@ -60,7 +60,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "sub")
+@Marshalled(typeName = "sub")
public class Sub extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
index 22186e8968..86559f40e7 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Sup.java
@@ -60,7 +60,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "sup")
+@Marshalled(typeName = "sup")
public class Sup extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
index 7287d7e532..bb46056feb 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Table.java
@@ -102,7 +102,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "table")
+@Marshalled(typeName = "table")
public class Table extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
index 3c0a681e7d..c3df93e99c 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tbody.java
@@ -87,7 +87,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "tbody")
+@Marshalled(typeName = "tbody")
public class Tbody extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
index 141fed9ad3..2cd3cc32f2 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Td.java
@@ -63,7 +63,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "td")
+@Marshalled(typeName = "td")
public class Td extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
index 71f3b1fb2c..485dcab9a7 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Template.java
@@ -121,7 +121,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "template")
+@Marshalled(typeName = "template")
public class Template extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
index f055031838..464d1ea3bf 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Textarea.java
@@ -83,7 +83,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "textarea")
+@Marshalled(typeName = "textarea")
public class Textarea extends HtmlElementRawText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
index 4629dd314f..573023ed21 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tfoot.java
@@ -83,7 +83,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "tfoot")
+@Marshalled(typeName = "tfoot")
public class Tfoot extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
index 477c157638..018f920c28 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Th.java
@@ -68,7 +68,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "th")
+@Marshalled(typeName = "th")
public class Th extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
index 7ea320fc6e..8e0d2e7f51 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Thead.java
@@ -94,7 +94,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "thead")
+@Marshalled(typeName = "thead")
public class Thead extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
index d9c9766d93..91964caaba 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Time.java
@@ -73,7 +73,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "time")
+@Marshalled(typeName = "time")
public class Time extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
index 4171629ca5..20ad39343f 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Title.java
@@ -56,7 +56,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "title")
+@Marshalled(typeName = "title")
public class Title extends HtmlElementRawText {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
index 1297f024f6..a682a07914 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Tr.java
@@ -91,7 +91,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "tr")
+@Marshalled(typeName = "tr")
public class Tr extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
index b0010b3c56..a19821b219 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Track.java
@@ -86,7 +86,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "track")
+@Marshalled(typeName = "track")
public class Track extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
index 11fbfa09f8..c4f0658ec1 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/U.java
@@ -90,7 +90,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "u")
+@Marshalled(typeName = "u")
public class U extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
index e9e22a614f..10f66cfb61 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Ul.java
@@ -99,7 +99,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "ul")
+@Marshalled(typeName = "ul")
public class Ul extends HtmlElementContainer {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
index f1b594707f..f8858831aa 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Var.java
@@ -90,7 +90,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "var")
+@Marshalled(typeName = "var")
public class Var extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
index b15fcfd9e1..741890ed41 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Video.java
@@ -94,7 +94,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "video")
+@Marshalled(typeName = "video")
public class Video extends HtmlElementMixed {
/**
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Wbr.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Wbr.java
index ad692c4369..d3765937a1 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Wbr.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/Wbr.java
@@ -89,7 +89,7 @@ import org.apache.juneau.annotation.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a>
* </ul>
*/
-@Bean(typeName = "wbr")
+@Marshalled(typeName = "wbr")
public class Wbr extends HtmlElementVoid {
/**
diff --git a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
index 6d76aa9d1e..56f0a89657 100644
--- a/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
+++ b/juneau-bean/juneau-bean-jsonschema/src/main/java/org/apache/juneau/bean/jsonschema/JsonSchema.java
@@ -196,7 +196,7 @@ import org.apache.juneau.swap.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanJsonSchema">juneau-bean-jsonschema</a>
* </ul>
*/
-@Bean(typeName = "schema")
+@Marshalled(typeName = "schema")
@SuppressWarnings({
"java:S116" // Field names follow OpenAPI/JSON Schema spec
})
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
index d02bb5e527..ebb82d7a87 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/BlobResourceContents.java
@@ -24,7 +24,7 @@ import org.apache.juneau.annotation.*;
* <p>
* Discriminator {@code type} value is {@code resourceBlob} (distinct from generic {@code blob} tokens elsewhere).
*/
-@Bean(typeName = "resourceBlob")
+@Marshalled(typeName = "resourceBlob")
public class BlobResourceContents implements ResourceContents {
private String uri;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
index 7d4e7f263a..015758e52c 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolRequest.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Parameters for {@value org.apache.juneau.bean.mcp.McpMethods#TOOLS_CALL}.
*/
-@Bean
+@Marshalled
public class CallToolRequest {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
index 1bc2792043..1b7a2d251c 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/CallToolResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#TOOLS_CALL}.
*/
-@Bean
+@Marshalled
public class CallToolResult {
private List<Content> content;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
index 434e9fd11b..f632638c11 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ClientCapabilities.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP client capability advertisement in {@link InitializeRequest}.
*/
-@Bean
+@Marshalled
public class ClientCapabilities {
private RootsCapability roots;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Content.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Content.java
index f3930eb9f0..70ac1ff49e 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Content.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Content.java
@@ -24,7 +24,7 @@ import org.apache.juneau.annotation.*;
* <p>
* Wire objects carry a {@code type} discriminator with values {@code text}, {@code image}, or {@code resource}.
*/
-@Bean(
+@Marshalled(
typePropertyName = "type",
dictionary = { TextContent.class, ImageContent.class, EmbeddedResourceContent.class }
)
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
index 51dfafced8..77e8fd7e99 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/EmbeddedResourceContent.java
@@ -25,7 +25,7 @@ import org.apache.juneau.annotation.*;
* The nested {@link #getResource() resource} value uses the same {@code text} / {@code blob} shapes as
* {@link ReadResourceResult} entries, carried as {@link ResourceContents} implementations.
*/
-@Bean(typeName = "resource")
+@Marshalled(typeName = "resource")
public class EmbeddedResourceContent implements Content {
private ResourceContents resource;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
index 7500a78208..4f77f41e3b 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptRequest.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Parameters for {@value org.apache.juneau.bean.mcp.McpMethods#PROMPTS_GET}.
*/
-@Bean
+@Marshalled
public class GetPromptRequest {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
index 6906f2e728..86f2f4faa6 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/GetPromptResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#PROMPTS_GET}.
*/
-@Bean
+@Marshalled
public class GetPromptResult {
private String description;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
index fbab797e67..adab98a294 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ImageContent.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP {@code image} content block (base64 data).
*/
-@Bean(typeName = "image")
+@Marshalled(typeName = "image")
public class ImageContent implements Content {
private String data;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
index aae598ee7d..2de910c29d 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Implementation.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP {@code Implementation} object ({@code name} / {@code version}).
*/
-@Bean
+@Marshalled
public class Implementation {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
index 5bee4c6043..c7df71ea24 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeRequest.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP {@code initialize} request parameters.
*/
-@Bean
+@Marshalled
public class InitializeRequest {
private String protocolVersion;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
index 367ab00341..dff4bb5066 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/InitializeResult.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP {@code initialize} result payload.
*/
-@Bean
+@Marshalled
public class InitializeResult {
private String protocolVersion;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
index 7de738e6bc..8cb4d1d133 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcError.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* JSON-RPC 2.0 error object.
*/
-@Bean
+@Marshalled
public class JsonRpcError {
private int code;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
index f20b02c5d8..43219d12bb 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcRequest.java
@@ -24,7 +24,7 @@ import org.apache.juneau.annotation.*;
* <p>
* The {@code id} field may be a {@link String}, integral {@link Number}, or {@code null} (notification).
*/
-@Bean
+@Marshalled
public class JsonRpcRequest {
private String jsonrpc;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
index e29272d54f..ad82d62407 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonRpcResponse.java
@@ -24,7 +24,7 @@ import org.apache.juneau.annotation.*;
* <p>
* Exactly one of {@code result} or {@code error} should be present for a valid response.
*/
-@Bean
+@Marshalled
public class JsonRpcResponse {
private String jsonrpc;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
index 5548b4f6a2..606c136d13 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/JsonSchema.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* JSON Schema subset used by MCP tool {@code inputSchema} objects.
*/
-@Bean
+@Marshalled
public class JsonSchema {
private String type;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
index 008fbfce7f..4919feaa8e 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListPromptsResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#PROMPTS_LIST}.
*/
-@Bean
+@Marshalled
public class ListPromptsResult {
private List<Prompt> prompts;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
index d3ddcb9cd1..2702b1cde5 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListResourcesResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#RESOURCES_LIST}.
*/
-@Bean
+@Marshalled
public class ListResourcesResult {
private List<Resource> resources;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
index 3a997fa4dc..9a3a819ca0 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ListToolsResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#TOOLS_LIST}.
*/
-@Bean
+@Marshalled
public class ListToolsResult {
private List<Tool> tools;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
index 23b5ce5e0d..8c8d6d760a 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/LoggingCapability.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Server logging capability marker (structure may grow with the spec).
*/
-@Bean
+@Marshalled
public class LoggingCapability {
private String level;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
index f185ff33cb..5e1841b4a6 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/McpException.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Runtime exception carrying JSON-RPC error fields for mapping to {@link JsonRpcError}.
*/
-@Bean
+@Marshalled
public class McpException extends RuntimeException {
private static final long serialVersionUID = 1L;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
index 379a423ae5..38253732c5 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Prompt.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP prompt descriptor ({@code prompts/list} entry).
*/
-@Bean
+@Marshalled
public class Prompt {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
index f356482f70..bdf268e5a7 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptArgument.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Declared argument for an MCP prompt.
*/
-@Bean
+@Marshalled
public class PromptArgument {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
index d1685ce866..9ef8cc9513 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptCapability.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Server capability flags for prompts.
*/
-@Bean
+@Marshalled
public class PromptCapability {
private Boolean listChanged;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
index 6eee8b8031..22122739fd 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/PromptMessage.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Single message line inside {@link GetPromptResult}.
*/
-@Bean
+@Marshalled
public class PromptMessage {
private Role role;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
index 69fbe6ca05..5927f780ca 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceRequest.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Parameters for {@value org.apache.juneau.bean.mcp.McpMethods#RESOURCES_READ}.
*/
-@Bean
+@Marshalled
public class ReadResourceRequest {
private String uri;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
index 4e31574f22..288776c216 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ReadResourceResult.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* Result payload for {@value org.apache.juneau.bean.mcp.McpMethods#RESOURCES_READ}.
*/
-@Bean
+@Marshalled
public class ReadResourceResult {
private List<ResourceContents> contents;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
index ce36812f52..7a2280bb9a 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Resource.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP resource descriptor ({@code resources/list} entry).
*/
-@Bean
+@Marshalled
public class Resource {
private String uri;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
index bf8e89eea8..37253343f3 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceCapability.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Server capability flags for resources.
*/
-@Bean
+@Marshalled
public class ResourceCapability {
private Boolean listChanged;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceContents.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceContents.java
index 6eea4193fa..164afcfa8c 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceContents.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ResourceContents.java
@@ -26,7 +26,7 @@ import org.apache.juneau.annotation.*;
* For Juneau dictionary parsing, include {@code type} with values {@code resourceText} or {@code resourceBlob}
* when serializing mixed arrays; a transport layer may inject {@code type} when bridging from minimal wire forms.
*/
-@Bean(
+@Marshalled(
typePropertyName = "type",
dictionary = { TextResourceContents.class, BlobResourceContents.class }
)
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
index 7fb659074a..0421461379 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/RootsCapability.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Client roots capability.
*/
-@Bean
+@Marshalled
public class RootsCapability {
private Boolean listChanged;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
index 958af20dfd..75a8cd0e42 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ServerCapabilities.java
@@ -23,7 +23,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP server capability advertisement in {@link InitializeResult}.
*/
-@Bean
+@Marshalled
public class ServerCapabilities {
private ToolCapability tools;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
index 27980b81cf..d1009204ed 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextContent.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP {@code text} content block.
*/
-@Bean(typeName = "text")
+@Marshalled(typeName = "text")
public class TextContent implements Content {
private String text;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
index b453ad9379..a30b6c3656 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/TextResourceContents.java
@@ -25,7 +25,7 @@ import org.apache.juneau.annotation.*;
* Discriminator {@code type} value is {@code resourceText} to avoid colliding with {@link TextContent}'s MCP
* wire value {@code text} in the same JSON-RPC payload.
*/
-@Bean(typeName = "resourceText")
+@Marshalled(typeName = "resourceText")
public class TextResourceContents implements ResourceContents {
private String uri;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
index 740189fe1b..22255cec77 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/Tool.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* MCP tool descriptor ({@code tools/list} entry).
*/
-@Bean
+@Marshalled
public class Tool {
private String name;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
index 48cf6ec825..b022bd2cda 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/ToolCapability.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
/**
* Server capability flags for tools.
*/
-@Bean
+@Marshalled
public class ToolCapability {
private Boolean listChanged;
diff --git a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/package-info.java b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/package-info.java
index 9dfb37789d..f85be931ee 100644
--- a/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/package-info.java
+++ b/juneau-bean/juneau-bean-mcp/src/main/java/org/apache/juneau/bean/mcp/package-info.java
@@ -16,6 +16,6 @@
*/
/**
- * Juneau {@link org.apache.juneau.annotation.Bean @Bean} types for the Model Context Protocol (MCP) wire format.
+ * Juneau {@link org.apache.juneau.annotation.Bean @Marshalled} types for the Model Context Protocol (MCP) wire format.
*/
package org.apache.juneau.bean.mcp;
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
index 30f0e4f04e..5949406eaa 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/OpenApiElement.java
@@ -31,7 +31,7 @@ import org.apache.juneau.json.*;
/**
* Root class for all Swagger beans.
*/
-@Bean
+@Marshalled
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AnnotationObject.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AnnotationObject.java
index 2f3b6730f3..acfe8011a7 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AnnotationObject.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AnnotationObject.java
@@ -39,14 +39,14 @@ import org.apache.juneau.commons.utils.*;
* <p>
* Java annotations are typically declared statically on classes, methods, fields, etc. at compile-time:
* <p class='bjava'>
- * <ja>@Bean</ja>(sort=<jk>true</jk>)
+ * <ja>@Marshalled</ja>(sort=<jk>true</jk>)
* <jk>public class</jk> MyClass {...}
* </p>
*
* <p>
* This class allows you to create those same annotations programmatically:
* <p class='bjava'>
- * Bean <jv>annotation</jv> = BeanAnnotation
+ * Bean <jv>annotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .sort(<jk>true</jk>)
* .build();
@@ -60,11 +60,11 @@ import org.apache.juneau.commons.utils.*;
*
* <p class='bjava'>
* <jc>// These two annotations are equal:</jc>
- * <ja>@Bean</ja>(sort=<jk>true</jk>)
+ * <ja>@Marshalled</ja>(sort=<jk>true</jk>)
* <jk>class</jk> MyClass {}
*
* Bean <jv>declared</jv> = MyClass.<jk>class</jk>.getAnnotation(Bean.<jk>class</jk>);
- * Bean <jv>programmatic</jv> = BeanAnnotation.<jsm>create</jsm>().sort(<jk>true</jk>).build();
+ * Bean <jv>programmatic</jv> = MarshalledAnnotation.<jsm>create</jsm>().sort(<jk>true</jk>).build();
*
* <jsm>assertEquals</jsm>(<jv>declared</jv>, <jv>programmatic</jv>); <jc>// true</jc>
* <jsm>assertEquals</jsm>(<jv>declared</jv>.hashCode(), <jv>programmatic</jv>.hashCode()); <jc>// true</jc>
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedAnnotationObject.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedAnnotationObject.java
index 1f6aeb7f49..906fb90fab 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedAnnotationObject.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedAnnotationObject.java
@@ -94,13 +94,13 @@ import org.apache.juneau.commons.reflect.*;
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Create a Bean annotation that applies to MyClass</jc>
- * BeanAnnotation <jv>annotation</jv> = BeanAnnotation
+ * MarshalledAnnotation <jv>annotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>(MyClass.<jk>class</jk>)
* .sort(<jk>true</jk>)
* .build();
*
* <jc>// Or target by string name</jc>
- * BeanAnnotation <jv>annotation2</jv> = BeanAnnotation
+ * MarshalledAnnotation <jv>annotation2</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .on(<js>"com.example.MyClass"</js>)
* .sort(<jk>true</jk>)
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedOnClassAnnotationObject.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedOnClassAnnotationObject.java
index 37de1862a1..a7d37e35fc 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedOnClassAnnotationObject.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/AppliedOnClassAnnotationObject.java
@@ -47,21 +47,21 @@ import static org.apache.juneau.commons.utils.CollectionUtils.*;
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Using onClass() for type-safe targeting</jc>
- * BeanAnnotation <jv>annotation</jv> = BeanAnnotation
+ * MarshalledAnnotation <jv>annotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .onClass(MyClass.<jk>class</jk>, MyOtherClass.<jk>class</jk>)
* .sort(<jk>true</jk>)
* .build();
*
* <jc>// Using on() for string-based targeting</jc>
- * BeanAnnotation <jv>annotation2</jv> = BeanAnnotation
+ * MarshalledAnnotation <jv>annotation2</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .on(<js>"com.example.MyClass"</js>, <js>"com.example.MyOtherClass"</js>)
* .sort(<jk>true</jk>)
* .build();
*
* <jc>// Can use both together</jc>
- * BeanAnnotation <jv>annotation3</jv> = BeanAnnotation
+ * MarshalledAnnotation <jv>annotation3</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .on(<js>"com.example.MyClass"</js>) <jc>// String-based</jc>
* .onClass(MyOtherClass.<jk>class</jk>) <jc>// Type-safe</jc>
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanChannel.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanChannel.java
index 20583b56a7..aa85ac0a5a 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanChannel.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanChannel.java
@@ -52,7 +52,7 @@ package org.apache.juneau.commons.function;
*
* <h5 class='section'>Example (DB-backed round-trip channel):</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>(factory=ItemChannelFactory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=ItemChannelFactory.<jk>class</jk>)
* <jk>public class</jk> ItemChannel <jk>implements</jk> BeanChannel<Item> {
* <jk>private</jk> Connection <jv>conn</jv>;
* <jk>private boolean</jk> <jv>writeMode</jv>;
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanConsumer.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanConsumer.java
index 4b44b17ca4..97a4f87431 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanConsumer.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanConsumer.java
@@ -49,7 +49,7 @@ package org.apache.juneau.commons.function;
*
* <h5 class='section'>Example (DB-backed consumer with batch commits):</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>(factory=ItemConsumerFactory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=ItemConsumerFactory.<jk>class</jk>)
* <jk>public class</jk> ItemConsumer <jk>implements</jk> BeanConsumer<Item> {
* <jk>private</jk> Connection <jv>conn</jv>;
* <jk>private</jk> PreparedStatement <jv>stmt</jv>;
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanFactory.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanFactory.java
index 03e8c3279b..5d74b76ae0 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanFactory.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanFactory.java
@@ -17,7 +17,7 @@
package org.apache.juneau.commons.function;
/**
- * A universal factory interface used with <ja>@Bean</ja><c>(factory=X.class)</c> for any bean type the
+ * A universal factory interface used with <ja>@Marshalled</ja><c>(factory=X.class)</c> for any bean type the
* framework needs to instantiate.
*
* <p>
@@ -26,7 +26,7 @@ package org.apache.juneau.commons.function;
* and any ordinary bean class parsed from JSON/XML/etc.
*
* <p>
- * When a class annotated with <ja>@Bean</ja><c>(factory=MyFactory.class)</c> needs to be instantiated,
+ * When a class annotated with <ja>@Marshalled</ja><c>(factory=MyFactory.class)</c> needs to be instantiated,
* the framework resolves the factory as follows:
* <ol>
* <li>Look up the factory class in the {@code BeanStore} (e.g. Spring {@code ApplicationContext})
@@ -49,7 +49,7 @@ package org.apache.juneau.commons.function;
* }
*
* <jc>// The target class declares which factory creates it</jc>
- * <ja>@Bean</ja>(factory=ItemChannelFactory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=ItemChannelFactory.<jk>class</jk>)
* <jk>public class</jk> ItemChannel <jk>implements</jk> BeanChannel<Item> { ... }
* </p>
*
@@ -74,7 +74,7 @@ public interface BeanFactory<T> {
T create() throws Exception;
/**
- * Sentinel class used as the default value for {@code @Bean(factory=...)} and
+ * Sentinel class used as the default value for {@code @Marshalled(factory=...)} and
* {@code @Beanp(factory=...)} when no factory is specified.
*/
@SuppressWarnings({
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanSupplier.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanSupplier.java
index 4526dd9813..cb0aa484f5 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanSupplier.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/BeanSupplier.java
@@ -44,7 +44,7 @@ package org.apache.juneau.commons.function;
*
* <h5 class='section'>Example (DB-backed supplier via JDBC cursor):</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>(factory=ItemSupplierFactory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=ItemSupplierFactory.<jk>class</jk>)
* <jk>public class</jk> ItemSupplier <jk>implements</jk> BeanSupplier<Item> {
* <jk>private</jk> Connection <jv>conn</jv>;
* <jk>private</jk> ResultSet <jv>rs</jv>;
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/package-info.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/package-info.java
index d4b239e0af..7e8db1149c 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/package-info.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/package-info.java
@@ -76,7 +76,7 @@
* <p class='bjava'>
* <jk>package</jk> com.example;
*
- * <ja>@Bean</ja>(factory=EmployeeSupplier.Factory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=EmployeeSupplier.Factory.<jk>class</jk>)
* <jk>public class</jk> EmployeeSupplier <jk>implements</jk> BeanSupplier<Employee> {
*
* <jk>private final</jk> DataSource <jv>ds</jv>;
@@ -165,7 +165,7 @@
*
* <h5 class='figure'>BeanConsumer with batch commits</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>(factory=EmployeeConsumer.Factory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=EmployeeConsumer.Factory.<jk>class</jk>)
* <jk>public class</jk> EmployeeConsumer <jk>implements</jk> BeanConsumer<Employee> {
*
* <jk>private static final int</jk> <jsf>BATCH_SIZE</jsf> = 500;
@@ -300,7 +300,7 @@
*
* <h5 class='figure'>Database-backed channel</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>(factory=EmployeeChannel.Factory.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(factory=EmployeeChannel.Factory.<jk>class</jk>)
* <jk>public class</jk> EmployeeChannel <jk>implements</jk> BeanChannel<Employee> {
*
* <jk>private final</jk> DataSource <jv>ds</jv>;
@@ -390,17 +390,17 @@
* <ja>@Configuration</ja>
* <jk>public class</jk> JuneauStreamingConfig {
*
- * <ja>@Bean</ja>
+ * <ja>@Marshalled</ja>
* <jk>public</jk> EmployeeSupplier.Factory employeeSupplierFactory(DataSource <jv>ds</jv>) {
* <jk>return new</jk> EmployeeSupplier.Factory(<jv>ds</jv>);
* }
*
- * <ja>@Bean</ja>
+ * <ja>@Marshalled</ja>
* <jk>public</jk> EmployeeConsumer.Factory employeeConsumerFactory(DataSource <jv>ds</jv>) {
* <jk>return new</jk> EmployeeConsumer.Factory(<jv>ds</jv>);
* }
*
- * <ja>@Bean</ja>
+ * <ja>@Marshalled</ja>
* <jk>public</jk> EmployeeChannel.Factory employeeChannelFactory(DataSource <jv>ds</jv>) {
* <jk>return new</jk> EmployeeChannel.Factory(<jv>ds</jv>);
* }
@@ -425,7 +425,7 @@
*
* <p>
* With this wiring in place, any class annotated with
- * {@code @Bean(factory=EmployeeSupplier.Factory.class)} is automatically instantiated by
+ * {@code @Marshalled(factory=EmployeeSupplier.Factory.class)} is automatically instantiated by
* retrieving the factory from the Spring {@code ApplicationContext} and calling
* {@link org.apache.juneau.commons.function.BeanFactory#create()}. No manual construction or
* injection is needed in individual REST methods.
@@ -443,7 +443,7 @@
* <th>Purpose</th>
* </tr>
* <tr>
- * <td>{@code @Bean(factory=X.class)}</td>
+ * <td>{@code @Marshalled(factory=X.class)}</td>
* <td>Class</td>
* <td>Specifies the {@link org.apache.juneau.commons.function.BeanFactory} class used to instantiate this type during parsing. The factory is resolved from the {@code BeanStore}.</td>
* </tr>
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
index be9bb3c155..58299aedd2 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationInfo.java
@@ -783,7 +783,7 @@ public class AnnotationInfo<T extends Annotation> {
*
* <h5 class='section'>Examples:</h5>
* <ul>
- * <li>{@code @Bean(on=MyClass)} - Annotation on a class
+ * <li>{@code @Marshalled(on=MyClass)} - Annotation on a class
* <li>{@code @Inject(on=MyClass.myField)} - Annotation on a field
* <li>{@code @PackageAnnotation(on=my.package)} - Annotation on a package
* </ul>
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationProvider.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationProvider.java
index 5a10f5c726..bdba29bcb6 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationProvider.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/AnnotationProvider.java
@@ -106,7 +106,7 @@ import org.apache.juneau.commons.lang.*;
* <p>
* <b>How Runtime Annotations Work:</b>
* <ul>
- * <li>Runtime annotations are Java objects that implement annotation interfaces (e.g., {@code @Bean})
+ * <li>Runtime annotations are Java objects that implement annotation interfaces (e.g., {@code @Marshalled})
* <li>They use special methods like {@code on()} or {@code onClass()} to specify their targets
* <li>They always take precedence over declared annotations at the same level
* <li>They are particularly useful for applying annotations to classes you don't control
@@ -114,7 +114,7 @@ import org.apache.juneau.commons.lang.*;
*
* <p class='bjava'>
* <jc>// Example: Creating a runtime annotation</jc>
- * Bean <jv>runtimeAnnotation</jv> = BeanAnnotation
+ * Bean <jv>runtimeAnnotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .onClass(MyClass.<jk>class</jk>) <jc>// Target class</jc>
* .typeName(<js>"MyType"</js>) <jc>// Annotation property</jc>
@@ -126,7 +126,7 @@ import org.apache.juneau.commons.lang.*;
* .addRuntimeAnnotations(<jv>runtimeAnnotation</jv>)
* .build();
*
- * <jc>// Now MyClass will be found with @Bean annotation</jc>
+ * <jc>// Now MyClass will be found with @Marshalled annotation</jc>
* Stream<AnnotationInfo<Bean>> <jv>annotations</jv> = <jv>provider</jv>.find(Bean.<jk>class</jk>, MyClass.<jk>class</jk>);
* </p>
*
@@ -139,7 +139,7 @@ import org.apache.juneau.commons.lang.*;
*
* <p>
* Runtime annotations are evaluated before declared annotations at each level, giving them higher priority.
- * For example, a runtime {@code @Bean} annotation on a class will be found before any {@code @Bean} annotation
+ * For example, a runtime {@code @Marshalled} annotation on a class will be found before any {@code @Marshalled} annotation
* declared directly on that class.
*
* <h5 class='section'>Comparison with ElementInfo Methods:</h5>
@@ -231,7 +231,7 @@ public class AnnotationProvider {
*
* <p class='bjava'>
* <jc>// Example: Add multiple runtime annotations using varargs</jc>
- * Bean <jv>beanAnnotation</jv> = BeanAnnotation
+ * Bean <jv>beanAnnotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .onClass(MyClass.<jk>class</jk>)
* .typeName(<js>"MyType"</js>)
@@ -262,13 +262,13 @@ public class AnnotationProvider {
* Adds runtime annotations to be applied to classes, methods, fields, and constructors.
*
* <p>
- * Runtime annotations are concrete Java objects that implement annotation interfaces (e.g., {@code @Bean}).
+ * Runtime annotations are concrete Java objects that implement annotation interfaces (e.g., {@code @Marshalled}).
* They allow you to dynamically apply annotations to code elements at runtime without modifying source code.
*
* <p>
* <b>How It Works:</b>
* <ol>
- * <li>Create annotation objects using builder classes (e.g., {@code BeanAnnotation.create()})
+ * <li>Create annotation objects using builder classes (e.g., {@code MarshalledAnnotation.create()})
* <li>Specify targets using {@code on()} or {@code onClass()} methods
* <li>Set annotation properties (e.g., {@code typeName()}, {@code properties()})
* <li>Build the annotation object
@@ -290,7 +290,7 @@ public class AnnotationProvider {
*
* <p class='bjava'>
* <jc>// Example 1: Target a specific class using type-safe targeting</jc>
- * Bean <jv>beanAnnotation</jv> = BeanAnnotation
+ * Bean <jv>beanAnnotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .onClass(MyClass.<jk>class</jk>) <jc>// Targets MyClass</jc>
* .typeName(<js>"MyType"</js>)
@@ -298,14 +298,14 @@ public class AnnotationProvider {
* .build();
*
* <jc>// Example 2: Target multiple classes</jc>
- * Bean <jv>multiAnnotation</jv> = BeanAnnotation
+ * Bean <jv>multiAnnotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .onClass(MyClass.<jk>class</jk>, OtherClass.<jk>class</jk>)
* .sort(<jk>true</jk>)
* .build();
*
* <jc>// Example 3: Target using string names (useful for dynamic/reflection scenarios)</jc>
- * Bean <jv>stringAnnotation</jv> = BeanAnnotation
+ * Bean <jv>stringAnnotation</jv> = MarshalledAnnotation
* .<jsm>create</jsm>()
* .on(<js>"com.example.MyClass"</js>)
* .findFluentSetters(<jk>true</jk>)
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
index f703f42545..9da86cb722 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ClassInfo.java
@@ -787,8 +787,8 @@ public class ClassInfo extends ElementInfo implements Annotatable, Type, Compara
* <p>
* <b>Note on Repeatable Annotations:</b>
* Repeatable annotations (those marked with {@link java.lang.annotation.Repeatable @Repeatable}) are automatically
- * expanded into their individual annotation instances. For example, if a class has multiple {@code @Bean} annotations,
- * this method returns each {@code @Bean} annotation separately, rather than the container annotation.
+ * expanded into their individual annotation instances. For example, if a class has multiple {@code @Marshalled} annotations,
+ * this method returns each {@code @Marshalled} annotation separately, rather than the container annotation.
*
* @return
* An unmodifiable list of {@link AnnotationInfo} wrappers for annotations declared directly on this class.
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ExecutableInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ExecutableInfo.java
index fddf0def45..2cf0d1f1fe 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ExecutableInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ExecutableInfo.java
@@ -249,8 +249,8 @@ public abstract class ExecutableInfo extends AccessibleInfo {
* <p>
* <b>Note on Repeatable Annotations:</b>
* Repeatable annotations (those marked with {@link java.lang.annotation.Repeatable @Repeatable}) are automatically
- * expanded into their individual annotation instances. For example, if a method has multiple {@code @Bean} annotations,
- * this method returns each {@code @Bean} annotation separately, rather than the container annotation.
+ * expanded into their individual annotation instances. For example, if a method has multiple {@code @Marshalled} annotations,
+ * this method returns each {@code @Marshalled} annotation separately, rather than the container annotation.
*
* @return
* The declared annotations on this executable as {@link AnnotationInfo} objects.
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/FieldInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/FieldInfo.java
index 8591850552..a8e3ce5b47 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/FieldInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/FieldInfo.java
@@ -228,8 +228,8 @@ public class FieldInfo extends AccessibleInfo implements Comparable<FieldInfo>,
* <p>
* <b>Note on Repeatable Annotations:</b>
* Repeatable annotations (those marked with {@link java.lang.annotation.Repeatable @Repeatable}) are automatically
- * expanded into their individual annotation instances. For example, if a field has multiple {@code @Bean} annotations,
- * this method returns each {@code @Bean} annotation separately, rather than the container annotation.
+ * expanded into their individual annotation instances. For example, if a field has multiple {@code @Marshalled} annotations,
+ * this method returns each {@code @Marshalled} annotation separately, rather than the container annotation.
*
* @return
* An unmodifiable list of all annotations declared on this field.
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/MethodInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/MethodInfo.java
index 53bb9add79..6cea072a91 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/MethodInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/MethodInfo.java
@@ -245,8 +245,8 @@ public class MethodInfo extends ExecutableInfo implements Comparable<MethodInfo>
* <p>
* <b>Note on Repeatable Annotations:</b>
* Repeatable annotations (those marked with {@link java.lang.annotation.Repeatable @Repeatable}) are automatically
- * expanded into their individual annotation instances. For example, if a method has multiple {@code @Bean} annotations,
- * this method returns each {@code @Bean} annotation separately, rather than the container annotation.
+ * expanded into their individual annotation instances. For example, if a method has multiple {@code @Marshalled} annotations,
+ * this method returns each {@code @Marshalled} annotation separately, rather than the container annotation.
*
* <p>
* List is unmodifiable.
@@ -276,9 +276,9 @@ public class MethodInfo extends ExecutableInfo implements Comparable<MethodInfo>
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// Get all @Bean annotations on this method and overridden methods</jc>
+ * <jc>// Get all @Marshalled annotations on this method and overridden methods</jc>
* Stream<AnnotationInfo<Bean>> <jv>beans</jv> = <jv>methodInfo</jv>.getAnnotations(Bean.<jk>class</jk>);
- * <jc>// If method has @Beans({@Bean(...), @Bean(...)}), both individual @Bean instances are returned</jc>
+ * <jc>// If method has @Beans({@Marshalled(...), @Marshalled(...)}), both individual @Marshalled instances are returned</jc>
* </p>
*
* @param <A> The annotation type.
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ParameterInfo.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ParameterInfo.java
index 8f5146aea8..67312ecfa5 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ParameterInfo.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/ParameterInfo.java
@@ -231,8 +231,8 @@ public class ParameterInfo extends ElementInfo implements Annotatable {
* <p>
* <b>Note on Repeatable Annotations:</b>
* Repeatable annotations (those marked with {@link java.lang.annotation.Repeatable @Repeatable}) are automatically
- * expanded into their individual annotation instances. For example, if a parameter has multiple {@code @Bean} annotations,
- * this method returns each {@code @Bean} annotation separately, rather than the container annotation.
+ * expanded into their individual annotation instances. For example, if a parameter has multiple {@code @Marshalled} annotations,
+ * this method returns each {@code @Marshalled} annotation separately, rather than the container annotation.
*
* @return
* An unmodifiable list of annotations on this parameter, never <jk>null</jk>.
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 73679eb2ae..74c70b3738 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
@@ -56,7 +56,7 @@ import org.apache.juneau.utils.*;
* <li>
* Provides the ability to wrap beans inside {@link Map} interfaces.
* <li>
- * Serves as a repository for metadata on POJOs, such as associated {@link Bean @Bean} annotations,
+ * Serves as a repository for metadata on POJOs, such as associated {@link Bean @Marshalled} annotations,
* {@link PropertyNamer PropertyNamers}, etc... which are used to tailor how POJOs are serialized and parsed.
* </ul>
*
@@ -434,7 +434,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a non-public bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a non-public bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean class to ignore it as a bean.
* </ul>
*
@@ -540,7 +540,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <p>
* A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred
- * through reflection. The names are defined through the {@link Bean#typeName() @Bean(typeName)} annotation defined
+ * through reflection. The names are defined through the {@link Bean#typeName() @Marshalled(typeName)} annotation defined
* on the bean class. For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up
* serialized as <js>"{_type:'myfoo',...}"</js> in JSON
* or <js>"<myfoo>...</myfoo>"</js> in XML.
@@ -551,7 +551,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* Values can consist of any of the following types:
* <ul>
- * <li>Any bean class that specifies a value for {@link Bean#typeName() @Bean(typeName)}.
+ * <li>Any bean class that specifies a value for {@link Bean#typeName() @Marshalled(typeName)}.
* <li>Any subclass of {@link BeanDictionaryList} containing a collection of bean classes with type name annotations.
* <li>Any subclass of {@link BeanDictionaryMap} containing a mapping of type names to classes without type name annotations.
* <li>Any array or collection of the objects above.
@@ -559,10 +559,10 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// Create a parser and tell it which classes to try to resolve.</jc>
@@ -587,7 +587,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p class='bjava'>
* <jc>// Instead of by parser, define a bean dictionary on a class through an annotation.</jc>
* <jc>// This applies to all properties on this class and all subclasses.</jc>
- * <ja>@Bean</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>})
+ * <ja>@Marshalled</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>})
* <jk>public class</jk> MyBean {
* <jk>public</jk> Object <jf>mySimpleField</jf>; <jc>// May contain Foo or Bar object.</jc>
* <jk>public</jk> Map<String,Object> <jf>myMapField</jf>; <jc>// May contain Foo or Bar objects.</jc>
@@ -608,7 +608,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.Bean#dictionary()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.Beanp#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary_replace()}
@@ -753,7 +753,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanInterceptor(Class<?> on, Class<? extends BeanInterceptor<?>> value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().interceptor(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().interceptor(value).build()).build());
}
/**
@@ -891,7 +891,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).properties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).properties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -907,7 +907,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanProperties(Class<?> beanClass, String properties) {
assertArgNotNull(ARG_beanClass, beanClass);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClass).value(BeanAnnotation.create().p(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClass).value(MarshalledAnnotation.create().p(properties).build()).build());
}
/**
@@ -954,7 +954,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).properties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).properties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -970,7 +970,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public Builder beanProperties(Map<String,Object> values) {
assertArgNotNull(ARG_values, values);
- values.forEach((k, v) -> annotations(BeanApplyAnnotation.create(k).value(BeanAnnotation.create().p(s(v)).build()).build()));
+ values.forEach((k, v) -> annotations(MarshalledApplyAnnotation.create(k).value(MarshalledAnnotation.create().p(s(v)).build()).build()));
return this;
}
@@ -1018,7 +1018,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).properties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).properties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1035,7 +1035,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanProperties(String beanClassName, String properties) {
assertArgNotNull(ARG_beanClassName, beanClassName);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClassName).value(BeanAnnotation.create().p(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClassName).value(MarshalledAnnotation.create().p(properties).build()).build());
}
/**
@@ -1074,7 +1074,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).excludeProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).excludeProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1090,7 +1090,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesExcludes(Class<?> beanClass, String properties) {
assertArgNotNull(ARG_beanClass, beanClass);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClass).value(BeanAnnotation.create().xp(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClass).value(MarshalledAnnotation.create().xp(properties).build()).build());
}
/**
@@ -1129,7 +1129,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).excludeProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).excludeProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1145,7 +1145,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public Builder beanPropertiesExcludes(Map<String,Object> values) {
assertArgNotNull(ARG_values, values);
- values.forEach((k, v) -> annotations(BeanApplyAnnotation.create(k).value(BeanAnnotation.create().xp(s(v)).build()).build()));
+ values.forEach((k, v) -> annotations(MarshalledApplyAnnotation.create(k).value(MarshalledAnnotation.create().xp(s(v)).build()).build()));
return this;
}
@@ -1185,7 +1185,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).excludeProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).excludeProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1203,7 +1203,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesExcludes(String beanClassName, String properties) {
assertArgNotNull(ARG_beanClassName, beanClassName);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClassName).value(BeanAnnotation.create().xp(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClassName).value(MarshalledAnnotation.create().xp(properties).build()).build());
}
/**
@@ -1245,7 +1245,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).readOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).readOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1261,7 +1261,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesReadOnly(Class<?> beanClass, String properties) {
assertArgNotNull(ARG_beanClass, beanClass);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClass).value(BeanAnnotation.create().ro(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClass).value(MarshalledAnnotation.create().ro(properties).build()).build());
}
/**
@@ -1303,7 +1303,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).readOnlyProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).readOnlyProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1319,7 +1319,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public Builder beanPropertiesReadOnly(Map<String,Object> values) {
assertArgNotNull(ARG_values, values);
- values.forEach((k, v) -> annotations(BeanApplyAnnotation.create(k).value(BeanAnnotation.create().ro(s(v)).build()).build()));
+ values.forEach((k, v) -> annotations(MarshalledApplyAnnotation.create(k).value(MarshalledAnnotation.create().ro(s(v)).build()).build()));
return this;
}
@@ -1362,7 +1362,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).readOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).readOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1378,7 +1378,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesReadOnly(String beanClassName, String properties) {
assertArgNotNull(ARG_beanClassName, beanClassName);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClassName).value(BeanAnnotation.create().ro(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClassName).value(MarshalledAnnotation.create().ro(properties).build()).build());
}
/**
@@ -1419,7 +1419,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).writeOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).writeOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1435,7 +1435,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesWriteOnly(Class<?> beanClass, String properties) {
assertArgNotNull(ARG_beanClass, beanClass);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClass).value(BeanAnnotation.create().wo(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClass).value(MarshalledAnnotation.create().wo(properties).build()).build());
}
/**
@@ -1476,7 +1476,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).writeOnlyProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).writeOnlyProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1492,7 +1492,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public Builder beanPropertiesWriteOnly(Map<String,Object> values) {
assertArgNotNull(ARG_values, values);
- values.forEach((k, v) -> annotations(BeanApplyAnnotation.create(k).value(BeanAnnotation.create().wo(s(v)).build()).build()));
+ values.forEach((k, v) -> annotations(MarshalledApplyAnnotation.create(k).value(MarshalledAnnotation.create().wo(s(v)).build()).build()));
return this;
}
@@ -1534,7 +1534,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).writeOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).writeOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1550,7 +1550,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder beanPropertiesWriteOnly(String beanClassName, String properties) {
assertArgNotNull(ARG_beanClassName, beanClassName);
assertArgNotNull(ARG_properties, properties);
- return annotations(BeanApplyAnnotation.create(beanClassName).value(BeanAnnotation.create().wo(properties).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(beanClassName).value(MarshalledAnnotation.create().wo(properties).build()).build());
}
/**
@@ -1590,7 +1590,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
@@ -1647,7 +1647,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
@@ -1728,7 +1728,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <p>
* The bean store is used to resolve {@link BeanFactory} instances registered via
- * <ja>@Bean</ja><c>(factory=X.class)</c> and <ja>@Beanp</ja><c>(factory=X.class)</c> annotations.
+ * <ja>@Marshalled</ja><c>(factory=X.class)</c> and <ja>@Beanp</ja><c>(factory=X.class)</c> annotations.
* When a factory class is encountered, the framework first looks it up in the bean store
* before attempting direct instantiation.
*
@@ -1793,10 +1793,10 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// A bean with a field with an indeterminate type.</jc>
@@ -1830,7 +1830,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder dictionaryOn(Class<?> on, Class<?>...values) {
assertArgNotNull(ARG_on, on);
assertArgNoNulls(ARG_values, values);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().dictionary(values).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().dictionary(values).build()).build());
}
/**
@@ -1841,7 +1841,7 @@ public class BeanContext extends Context implements ConversionFinder {
* Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
*
* <p>
- * The {@link Bean @Bean} annotation can be used on a class to override this setting when <jk>true</jk>.
+ * The {@link Bean @Marshalled} annotation can be used on a class to override this setting when <jk>true</jk>.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
@@ -1860,7 +1860,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on the class to force it to be recognized as a bean class
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on the class to force it to be recognized as a bean class
* even if it has no properties.
* </ul>
*
@@ -2192,11 +2192,11 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Notes:</h5><ul>
* <li class='note'>The {@link Beanp @Beanp} annotation can also be used on methods to individually identify them as fluent setters.
- * <li class='note'>The {@link Bean#findFluentSetters() @Bean.fluentSetters()} annotation can also be used on classes to specify to look for fluent setters.
+ * <li class='note'>The {@link Bean#findFluentSetters() @Marshalled.fluentSetters()} annotation can also be used on classes to specify to look for fluent setters.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.Bean#findFluentSetters()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#findFluentSetters()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#findFluentSetters()}
* </ul>
*
@@ -2255,7 +2255,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public Builder findFluentSetters(Class<?> on) {
assertArgNotNull(ARG_on, on);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().findFluentSetters(true).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().findFluentSetters(true).build()).build());
}
@Override /* Overridden from Context.Builder */
@@ -2588,7 +2588,7 @@ public class BeanContext extends Context implements ConversionFinder {
* individually on the child classes.
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#interfaceClass() @Bean(interfaceClass)} annotation is the equivalent annotation-based solution.
+ * <li class='note'>The {@link Bean#interfaceClass() @Marshalled(interfaceClass)} annotation is the equivalent annotation-based solution.
* </ul>
*
* @param on The class that the interface class applies to.
@@ -2601,7 +2601,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder interfaceClass(Class<?> on, Class<?> value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().interfaceClass(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().interfaceClass(value).build()).build());
}
/**
@@ -2637,7 +2637,7 @@ public class BeanContext extends Context implements ConversionFinder {
* individually on the child classes.
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#interfaceClass() @Bean(interfaceClass)} annotation is the equivalent annotation-based solution.
+ * <li class='note'>The {@link Bean#interfaceClass() @Marshalled(interfaceClass)} annotation is the equivalent annotation-based solution.
* </ul>
*
* @param value
@@ -2648,7 +2648,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder interfaces(Class<?>...value) {
assertArgNoNulls(ARG_value, value);
for (var v : value)
- annotations(BeanApplyAnnotation.create(v).value(BeanAnnotation.create().interfaceClass(v).build()).build());
+ annotations(MarshalledApplyAnnotation.create(v).value(MarshalledAnnotation.create().interfaceClass(v).build()).build());
return this;
}
@@ -2945,7 +2945,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder propertyNamer(Class<?> on, Class<? extends PropertyNamer> value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().propertyNamer(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().propertyNamer(value).build()).build());
}
/**
@@ -3017,7 +3017,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#unsorted() @Bean.unsorted()} annotation can also be used to opt out of sorting on a single class.
+ * <li class='note'>The {@link Bean#unsorted() @Marshalled.unsorted()} annotation can also be used to opt out of sorting on a single class.
* </ul>
*
* @return This object.
@@ -3041,7 +3041,7 @@ public class BeanContext extends Context implements ConversionFinder {
* Opt specific bean classes out of alphabetical property sorting.
*
* <p>
- * Applies the {@link Bean#unsorted() @Bean(unsorted=true)} annotation to the specified classes,
+ * Applies the {@link Bean#unsorted() @Marshalled(unsorted=true)} annotation to the specified classes,
* overriding the default sorted behavior for those specific beans.
*
* <h5 class='section'>See Also:</h5><ul>
@@ -3055,7 +3055,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder unsortedProperties(Class<?>...on) {
assertArgNoNulls(ARG_on, on);
for (var c : on)
- annotations(BeanApplyAnnotation.create(c).value(BeanAnnotation.create().unsorted(true).build()).build());
+ annotations(MarshalledApplyAnnotation.create(c).value(MarshalledAnnotation.create().unsorted(true).build()).build());
return this;
}
@@ -3104,7 +3104,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder stopClass(Class<?> on, Class<?> value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().stopClass(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().stopClass(value).build()).build());
}
/**
@@ -3381,7 +3381,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder typeName(Class<?> on, String value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().typeName(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().typeName(value).build()).build());
}
/**
@@ -3392,10 +3392,10 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// A bean with a field with an indeterminate type.</jc>
@@ -3429,7 +3429,7 @@ public class BeanContext extends Context implements ConversionFinder {
public Builder typePropertyName(Class<?> on, String value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
- return annotations(BeanApplyAnnotation.create(on).value(BeanAnnotation.create().typePropertyName(value).build()).build());
+ return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().typePropertyName(value).build()).build());
}
/**
@@ -3441,10 +3441,10 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc>
@@ -3474,7 +3474,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.Bean#typePropertyName()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#typePropertyName()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#typePropertyName()}
* </ul>
*
@@ -3545,7 +3545,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <p>
* Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
- * <br>Most {@link Bean @Bean} annotations will be ignored.
+ * <br>Most {@link Bean @Marshalled} annotations will be ignored.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextable.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextable.java
index 9d4dd742e7..e332d84ebd 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextable.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextable.java
@@ -165,7 +165,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Notes:</h5>
* <ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a non-public bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a non-public bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean class to ignore it as a bean.
* </ul>
*
@@ -301,7 +301,7 @@ public abstract class BeanContextable extends Context {
*
* <p>
* A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred
- * through reflection. The names are defined through the {@link Bean#typeName() @Bean(typeName)} annotation defined
+ * through reflection. The names are defined through the {@link Bean#typeName() @Marshalled(typeName)} annotation defined
* on the bean class. For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up
* serialized as <js>"{_type:'myfoo',...}"</js> in JSON
* or <js>"<myfoo>...</myfoo>"</js> in XML.
@@ -312,7 +312,7 @@ public abstract class BeanContextable extends Context {
* <p>
* Values can consist of any of the following types:
* <ul>
- * <li>Any bean class that specifies a value for {@link Bean#typeName() @Bean(typeName)}.
+ * <li>Any bean class that specifies a value for {@link Bean#typeName() @Marshalled(typeName)}.
* <li>Any subclass of {@link BeanDictionaryList} containing a collection of bean classes with type name annotations.
* <li>Any subclass of {@link BeanDictionaryMap} containing a mapping of type names to classes without type name annotations.
* <li>Any array or collection of the objects above.
@@ -320,10 +320,10 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// Create a parser and tell it which classes to try to resolve.</jc>
@@ -348,7 +348,7 @@ public abstract class BeanContextable extends Context {
* <p class='bjava'>
* <jc>// Instead of by parser, define a bean dictionary on a class through an annotation.</jc>
* <jc>// This applies to all properties on this class and all subclasses.</jc>
- * <ja>@Bean</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>})
+ * <ja>@Marshalled</ja>(dictionary={Foo.<jk>class</jk>,Bar.<jk>class</jk>})
* <jk>public class</jk> MyBean {
* <jk>public</jk> Object <jf>mySimpleField</jf>; <jc>// May contain Foo or Bar object.</jc>
* <jk>public</jk> Map<String,Object> <jf>myMapField</jf>; <jc>// May contain Foo or Bar objects.</jc>
@@ -628,7 +628,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).properties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).properties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -689,7 +689,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).properties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).properties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -752,7 +752,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).properties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).properties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -808,7 +808,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).excludeProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).excludeProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -861,7 +861,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).excludeProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).excludeProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -916,7 +916,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).excludeProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).excludeProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -975,7 +975,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).readOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).readOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1031,7 +1031,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).readOnlyProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).readOnlyProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1089,7 +1089,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).readOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).readOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1147,7 +1147,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).writeOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClass</jv>).writeOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1202,7 +1202,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code for each entry:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>key</jv>).writeOnlyProperties(<jv>value</jv>.toString()).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>key</jv>).writeOnlyProperties(<jv>value</jv>.toString()).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1259,7 +1259,7 @@ public abstract class BeanContextable extends Context {
* <p>
* This method is functionally equivalent to the following code:
* <p class='bjava'>
- * <jv>builder</jv>.annotations(BeanAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).writeOnlyProperties(<jv>properties</jv>).build());
+ * <jv>builder</jv>.annotations(MarshalledAnnotation.<jsm>create</jsm>(<jv>beanClassName</jv>).writeOnlyProperties(<jv>properties</jv>).build());
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1316,7 +1316,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
@@ -1364,7 +1364,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on a bean class to override this setting.
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on a bean class to override this setting.
* <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
@@ -1451,10 +1451,10 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// A bean with a field with an indeterminate type.</jc>
@@ -1501,7 +1501,7 @@ public abstract class BeanContextable extends Context {
* Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
*
* <p>
- * The {@link Bean @Bean} annotation can be used on a class to override this setting when <jk>true</jk>.
+ * The {@link Bean @Marshalled} annotation can be used on a class to override this setting when <jk>true</jk>.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
@@ -1520,7 +1520,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean @Bean} annotation can be used on the class to force it to be recognized as a bean class
+ * <li class='note'>The {@link Bean @Marshalled} annotation can be used on the class to force it to be recognized as a bean class
* even if it has no properties.
* </ul>
*
@@ -1809,7 +1809,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Notes:</h5><ul>
* <li class='note'>The {@link Beanp @Beanp} annotation can also be used on methods to individually identify them as fluent setters.
- * <li class='note'>The {@link Bean#findFluentSetters() @Bean.fluentSetters()} annotation can also be used on classes to specify to look for fluent setters.
+ * <li class='note'>The {@link Bean#findFluentSetters() @Marshalled.fluentSetters()} annotation can also be used on classes to specify to look for fluent setters.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -2127,7 +2127,7 @@ public abstract class BeanContextable extends Context {
* individually on the child classes.
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#interfaceClass() @Bean(interfaceClass)} annotation is the equivalent annotation-based solution.
+ * <li class='note'>The {@link Bean#interfaceClass() @Marshalled(interfaceClass)} annotation is the equivalent annotation-based solution.
* </ul>
*
* @param on The class that the interface class applies to.
@@ -2175,7 +2175,7 @@ public abstract class BeanContextable extends Context {
* individually on the child classes.
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#interfaceClass() @Bean(interfaceClass)} annotation is the equivalent annotation-based solution.
+ * <li class='note'>The {@link Bean#interfaceClass() @Marshalled(interfaceClass)} annotation is the equivalent annotation-based solution.
* </ul>
*
* @param value
@@ -2827,10 +2827,10 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// A bean with a field with an indeterminate type.</jc>
@@ -2875,10 +2875,10 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// POJOs with @Bean(name) annotations.</jc>
- * <ja>@Bean</ja>(typeName=<js>"foo"</js>)
+ * <jc>// POJOs with @Marshalled(name) annotations.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"foo"</js>)
* <jk>public class</jk> Foo {...}
- * <ja>@Bean</ja>(typeName=<js>"bar"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"bar"</js>)
* <jk>public class</jk> Bar {...}
*
* <jc>// Create a serializer that uses 't' instead of '_type' for dictionary names.</jc>
@@ -2974,7 +2974,7 @@ public abstract class BeanContextable extends Context {
*
* <p>
* Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
- * <br>Most {@link Bean @Bean} annotations will be ignored.
+ * <br>Most {@link Bean @Marshalled} annotations will be ignored.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryList.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryList.java
index 595f7deea3..b3447b9be7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryList.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryList.java
@@ -26,14 +26,14 @@ import org.apache.juneau.annotation.*;
* <p>
* The classes in the list must be one of the following:
* <ul>
- * <li>Beans that provide a dictionary name using the {@link Bean#typeName() @Bean(typeName)} annotation.
+ * <li>Beans that provide a dictionary name using the {@link Bean#typeName() @Marshalled(typeName)} annotation.
* <li>Other subclasses of {@link BeanDictionaryList}.
* <li>Other subclasses of {@link BeanDictionaryMap}.
* </ul>
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// A bean dictionary list consisting of classes with @Bean(typeName) annotations.</jc>
+ * <jc>// A bean dictionary list consisting of classes with @Marshalled(typeName) annotations.</jc>
* <jk>public class</jk> MyBeanDictionaryList <jk>extends</jk> BeanDictionaryList {
*
* <jc>// Must provide a no-arg constructor!</jc>
@@ -63,7 +63,7 @@ public class BeanDictionaryList extends ArrayList<Class<?>> {
*
* @param c
* The list of bean classes to add to this dictionary.
- * Classes must either specify a {@link Bean#typeName() @Bean(typeName)} value or be another subclass of
+ * Classes must either specify a {@link Bean#typeName() @Marshalled(typeName)} value or be another subclass of
* <c>BeanDictionaryList</c>.
*/
protected BeanDictionaryList(Class<?>...c) {
@@ -75,7 +75,7 @@ public class BeanDictionaryList extends ArrayList<Class<?>> {
*
* @param c
* The list of bean classes to add to this dictionary.
- * Classes must either specify a {@link Bean#typeName() @Bean(typeName)} value or be another subclass of
+ * Classes must either specify a {@link Bean#typeName() @Marshalled(typeName)} value or be another subclass of
* <c>BeanDictionaryList</c>.
* @return This object.
*/
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryMap.java
index 2c305941a0..f10bdb00f2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanDictionaryMap.java
@@ -30,11 +30,11 @@ import org.apache.juneau.annotation.*;
*
* <p>
* In general, this approach for defining dictionary names for classes is used when it's not possible to use the
- * {@link Bean#typeName() @Bean(typeName)} annotation.
+ * {@link Bean#typeName() @Marshalled(typeName)} annotation.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <jc>// A bean dictionary map consisting of classes without @Bean(typeName) annotations</jc>
+ * <jc>// A bean dictionary map consisting of classes without @Marshalled(typeName) annotations</jc>
* <jc>// that require type names to be explicitly specified.</jc>
* <jk>public class</jk> MyBeanDictionaryMap <jk>extends</jk> BeanDictionaryMap {
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
deleted file mode 100644
index da8ade85bd..0000000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
+++ /dev/null
@@ -1,1007 +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;
-
-import static org.apache.juneau.commons.reflect.ReflectionUtils.*;
-import static org.apache.juneau.commons.utils.ClassUtils.*;
-import static org.apache.juneau.commons.utils.CollectionUtils.*;
-import static org.apache.juneau.commons.utils.StringUtils.*;
-import static org.apache.juneau.commons.utils.Utils.*;
-
-import java.beans.*;
-import java.util.*;
-
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.commons.inject.*;
-import org.apache.juneau.commons.reflect.*;
-import org.apache.juneau.swap.*;
-
-/**
- * Bean filter for customizing bean property handling during serialization and parsing.
- *
- * <p>
- * Bean filters provide fine-grained control over how beans are processed, allowing you to:
- * <ul>
- * <li>Specify which properties to include or exclude
- * <li>Define read-only and write-only properties
- * <li>Control property ordering and naming
- * <li>Configure bean dictionaries for polymorphic types
- * <li>Intercept property getter and setter calls
- * <li>Define interface classes and stop classes for property filtering
- * </ul>
- *
- * <p>
- * Bean filters are created using the {@link Builder} class, which is the programmatic equivalent to the
- * {@link Bean @Bean} annotation. Filters can be registered with serializers and parsers to customize
- * how specific bean classes are handled.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define a custom filter for MyBean</jc>
- * <jk>public class</jk> MyBeanFilter <jk>extends</jk> BeanFilter.Builder<MyBean> {
- * <jk>public</jk> MyBeanFilter() {
- * properties(<js>"id,name,email"</js>); <jc>// Only include these properties</jc>
- * excludeProperties(<js>"password"</js>); <jc>// Exclude sensitive data</jc>
- * readOnlyProperties(<js>"id"</js>); <jc>// ID is read-only</jc>
- * unsortedProperties(); <jc>// Opt out of default alphabetical sorting</jc>
- * }
- * }
- *
- * <jc>// Register the filter with a serializer</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyBeanFilter.<jk>class</jk>)
- * .build();
- * </p>
- *
- * <h5 class='section'>See Also:</h5>
- * <ul>
- * <li class='ja'>{@link Bean @Bean}
- * <li class='jc'>{@link BeanInterceptor}
- * <li class='jc'>{@link PropertyNamer}
- * </ul>
- */
-@SuppressWarnings({
- "rawtypes", // Raw types necessary for generic type handling
- "java:S1452" // Wildcard required - ClassInfoTyped<?>, ClassMeta<?> for filter metadata
-})
-public class BeanFilter {
-
- /**
- * Builder class.
- */
- public static class Builder {
-
- private ClassInfoTyped<?> beanClass;
- private String typeName;
- private String example;
- private Set<String> properties = set();
- private Set<String> excludeProperties = set();
- private Set<String> readOnlyProperties = set();
- private Set<String> writeOnlyProperties = set();
- private ClassInfo implClass;
- private ClassInfo interfaceClass;
- private ClassInfo stopClass;
- private boolean unsortedProperties;
- private boolean fluentSetters;
- private BeanInstantiator.Builder<PropertyNamer> propertyNamer = BeanInstantiator.of(PropertyNamer.class);
- private List<ClassInfo> dictionary;
- private BeanInstantiator.Builder<BeanInterceptor> interceptor = BeanInstantiator.of(BeanInterceptor.class);
-
- /**
- * Constructor.
- *
- * @param beanClass The bean class that this filter applies to.
- */
- protected Builder(ClassInfoTyped<?> beanClass) {
- this.beanClass = beanClass;
- }
-
- /**
- * Applies the information in the specified list of {@link Bean @Bean} annotations to this filter.
- * @param annotations The annotations to apply.
- * @return This object.
- */
- @SuppressWarnings({
- "java:S3776" // Cognitive complexity acceptable for annotation application
- })
- public Builder applyAnnotations(List<Bean> annotations) {
-
- annotations.forEach(x -> {
- if (isAnyNotEmpty(x.properties(), x.p()))
- properties(x.properties(), x.p());
- if (x.unsorted())
- unsortedProperties(true);
- if (x.findFluentSetters())
- findFluentSetters();
- if (isAnyNotEmpty(x.excludeProperties(), x.xp()))
- excludeProperties(x.excludeProperties(), x.xp());
- if (isAnyNotEmpty(x.readOnlyProperties(), x.ro()))
- readOnlyProperties(x.readOnlyProperties(), x.ro());
- if (isAnyNotEmpty(x.writeOnlyProperties(), x.wo()))
- writeOnlyProperties(x.writeOnlyProperties(), x.wo());
- if (ne(x.typeName()))
- typeName(x.typeName());
- if (isNotVoid(x.propertyNamer()))
- propertyNamer(x.propertyNamer());
- if (isNotVoid(x.interfaceClass()))
- interfaceClass(x.interfaceClass());
- if (isNotVoid(x.stopClass()))
- stopClass(x.stopClass());
- if (isNotVoid(x.interceptor()))
- interceptor(x.interceptor());
- if (isNotVoid(x.implClass()))
- implClass(x.implClass());
- if (isNotEmptyArray(x.dictionary()))
- dictionary(x.dictionary());
- if (ne(x.example()))
- example(x.example());
- });
- return this;
- }
-
- /**
- * Creates a {@link BeanFilter} with settings in this builder class.
- *
- * @return A new {@link BeanFilter} instance.
- */
- public BeanFilter build() {
- return new BeanFilter(this);
- }
-
- /**
- * Bean dictionary.
- *
- * <p>
- * Adds to the list of classes that make up the bean dictionary for this bean.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * <jc>// Our bean contains generic collections of Foo and Bar objects.</jc>
- * beanDictionary(Foo.<jk>class</jk>, Bar.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a parser.</jc>
- * ReaderParser <jv>parser</jv> = JsonParser
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Instantiate our bean.</jc>
- * MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<jv>json</jv>);
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#dictionary()}
- * <li class='jm'>{@link BeanContext.Builder#beanDictionary(Class...)}
- * </ul>
- *
- * @param values
- * The values to add to this property.
- * @return This object.
- */
- public Builder dictionary(Class<?>...values) {
- if (dictionary == null)
- dictionary = list();
- for (var cc : values)
- dictionary.add(info(cc));
- return this;
- }
-
- /**
- * Bean dictionary.
- *
- * <p>
- * Adds to the list of classes that make up the bean dictionary for this bean.
- *
- * <p>
- * Same as the other dictionary method but accepts {@link ClassInfo} objects directly instead of {@link Class} objects.
- *
- * @param values The class info objects to add to this property.
- * @return This object.
- */
- public Builder dictionary(ClassInfo...values) {
- if (dictionary == null)
- dictionary = list();
- Collections.addAll(dictionary, values);
- return this;
- }
-
- /**
- * Example.
- *
- * @param value
- * The new value for this property.
- * @return This object.
- */
- public Builder example(String value) {
- example = value;
- return this;
- }
-
- /**
- * Bean property excludes.
- *
- * <p>
- * Specifies properties to exclude from the bean class.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * excludeProperties(<js>"foo,bar"</js>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Serializes all properties except for 'foo' and 'bar'.</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#excludeProperties()}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(Class, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(String, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(Map)}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>Values can contain comma-delimited list of property names.
- * @return This object.
- */
- public Builder excludeProperties(String...value) {
- excludeProperties = set();
- for (var v : value)
- split(v, x -> excludeProperties.add(x));
- return this;
- }
-
- /**
- * Find fluent setters.
- *
- * <p>
- * When enabled, fluent setters are detected on beans.
- *
- * <p>
- * Fluent setters must have the following attributes:
- * <ul>
- * <li>Public.
- * <li>Not static.
- * <li>Take in one parameter.
- * <li>Return the bean itself.
- * </ul>
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * findFluentSetters();
- * }
- * }
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#findFluentSetters()}
- * <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
- * </ul>
- *
- * @return This object.
- */
- public Builder findFluentSetters() {
- fluentSetters = true;
- return this;
- }
-
- /**
- * Bean implementation class.
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder implClass(Class<?> value) {
- implClass = value == null ? null : info(value);
- return this;
- }
-
- /**
- * Implementation class.
- *
- * <p>
- * Same as the other implClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder implClass(ClassInfo value) {
- implClass = value;
- return this;
- }
-
- /**
- * Bean interceptor.
- *
- * <p>
- * The interceptor to use for intercepting and altering getter and setter calls.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * <jc>// Our bean contains generic collections of Foo and Bar objects.</jc>
- * interceptor(AddressInterceptor.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a serializer or parser.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#interceptor()}
- * <li class='jc'>{@link BeanInterceptor}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>The default value is {@link BeanInterceptor}.
- * @return This object.
- */
- @SuppressWarnings("unchecked")
- public Builder interceptor(Class<?> value) {
- interceptor.type((Class<? extends BeanInterceptor>) value);
- return this;
- }
-
- /**
- * Bean interceptor.
- *
- * <p>
- * Same as the other interceptor method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
- *
- * <p>
- * The interceptor to use for intercepting and altering getter and setter calls.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#interceptor()}
- * <li class='jc'>{@link BeanInterceptor}
- * </ul>
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder interceptor(ClassInfo value) {
- interceptor.type(value);
- return this;
- }
-
- /**
- * Bean interface class.
- *
- * Identifies a class to be used as the interface class for this and all subclasses.
- *
- * <p>
- * When specified, only the list of properties defined on the interface class will be used during serialization.
- * <br>Additional properties on subclasses will be ignored.
- *
- * <p class='bjava'>
- * <jc>// Parent class</jc>
- * <jk>public abstract class</jk> A {
- * <jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
- * }
- *
- * <jc>// Sub class</jc>
- * <jk>public class</jk> A1 <jk>extends</jk> A {
- * <jk>public</jk> String <jf>f1</jf> = <js>"f1"</js>;
- * }
- *
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> AFilter <jk>extends</jk> Builder<A> {
- * <jk>public</jk> AFilter() {
- * interfaceClass(A.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(AFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Use it.</jc>
- * A1 <jv>a1</jv> = <jk>new</jk> A1();
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jv>a1</jv>);
- * <jsm>assertEquals</jsm>(<js>"{f0:'f0'}"</js>, <jv>json</jv>); <jc>// Note f1 is not serialized</jc>
- * </p>
- *
- * <p>
- * Note that this filter can be used on the parent class so that it filters to all child classes, or can be set
- * individually on the child classes.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#interfaceClass()}
- * </ul>
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder interfaceClass(Class<?> value) {
- interfaceClass = value == null ? null : info(value);
- return this;
- }
-
- /**
- * Interface class.
- *
- * <p>
- * Same as the other interfaceClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder interfaceClass(ClassInfo value) {
- interfaceClass = value;
- return this;
- }
-
- /**
- * Bean property includes.
- *
- * <p>
- * Specifies the set and order of names of properties associated with the bean class.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * properties(<js>"foo,bar,baz"</js>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Only serializes the properties 'foo', 'bar', and 'baz'.</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#properties()}
- * <li class='jm'>{@link BeanContext.Builder#beanProperties(Class, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanProperties(String, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanProperties(Map)}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>Values can contain comma-delimited list of property names.
- * @return This object.
- */
- public Builder properties(String...value) {
- properties = set();
- for (var v : value)
- split(v, x -> properties.add(x));
- return this;
- }
-
- /**
- * Bean property namer
- *
- * <p>
- * The class to use for calculating bean property names.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * <jc>// Use Dashed-Lower-Case property names.</jc>
- * <jc>// (e.g. "foo-bar-url" instead of "fooBarURL")</jc>
- * propertyNamer(PropertyNamerDLC.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a serializer or parser.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Properties names will be Dashed-Lower-Case.</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#propertyNamer()}
- * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
- * <li class='jc'>{@link PropertyNamer}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>The default is {@link BasicPropertyNamer}.
- * @return This object.
- */
- public Builder propertyNamer(Class<? extends PropertyNamer> value) {
- propertyNamer.type(value);
- return this;
- }
-
- /**
- * Bean property namer.
- *
- * <p>
- * Same as the other propertyNamer method but accepts a {@link ClassInfoTyped} object directly instead of a {@link Class} object.
- *
- * <p>
- * The class to use for calculating bean property names.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#propertyNamer()}
- * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
- * <li class='jc'>{@link PropertyNamer}
- * </ul>
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder propertyNamer(ClassInfoTyped<? extends PropertyNamer> value) {
- propertyNamer.type(value);
- return this;
- }
-
- /**
- * Read-only bean properties.
- *
- * <p>
- * Specifies one or more properties on a bean that are read-only despite having valid getters.
- * Serializers will serialize such properties as usual, but parsers will silently ignore them.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * readOnlyProperties(<js>"foo,bar"</js>);
- * }
- * }
- *
- * <jc>// Register it with a parser.</jc>
- * ReaderParser <jv>parser</jv> = JsonParser
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Parsers all properties except for 'foo' and 'bar'.</jc>
- * MyBean <jv>bean</jv> = <jv>parser</jv>.parse(<js>"..."</js>, MyBean.<jk>class</jk>);
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#readOnlyProperties()}
- * <li class='ja'>{@link Beanp#ro()}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(Class, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(String, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(Map)}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>Values can contain comma-delimited list of property names.
- * @return This object.
- */
- public Builder readOnlyProperties(String...value) {
- readOnlyProperties = set();
- for (var v : value)
- split(v, x -> readOnlyProperties.add(x));
- return this;
- }
-
- /**
- * Opt out of alphabetical property sorting for this specific bean.
- *
- * <p>
- * When <jk>true</jk>, the natural JVM-dependent order is used instead of the default alphabetical order.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#unsorted()}
- * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
- * </ul>
- *
- * @return This object.
- */
- public Builder unsortedProperties() {
- unsortedProperties = true;
- return this;
- }
-
- /**
- * Opt out of alphabetical property sorting for this specific bean.
- *
- * <p>
- * When <jk>true</jk>, the natural JVM-dependent order is used instead of the default alphabetical order.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#unsorted()}
- * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
- * </ul>
- *
- * @param value
- * The new value for this property.
- * <br>The default is <jk>false</jk>.
- * @return This object.
- */
- public Builder unsortedProperties(boolean value) {
- unsortedProperties = value;
- return this;
- }
-
- /**
- * Bean stop class.
- *
- * <p>
- * Identifies a stop class for this class and all subclasses.
- *
- * <p>
- * Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
- * <br>Any properties in the stop class or in its base classes will be ignored during analysis.
- *
- * <p>
- * For example, in the following class hierarchy, instances of <c>C3</c> will include property <c>p3</c>,
- * but not <c>p1</c> or <c>p2</c>.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jk>public class</jk> C1 {
- * <jk>public int</jk> getP1();
- * }
- *
- * <jk>public class</jk> C2 <jk>extends</jk> C1 {
- * <jk>public int</jk> getP2();
- * }
- *
- * <jk>public class</jk> C3 <jk>extends</jk> C2 {
- * <jk>public int</jk> getP3();
- * }
- *
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> C3Filter <jk>extends</jk> Builder<C3> {
- * <jk>public</jk> C3Filter() {
- * stopClass(C2.<jk>class</jk>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(C3Filter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Serializes property 'p3', but NOT 'p1' or 'p2'.</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> C3());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#stopClass()}
- * </ul>
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder stopClass(Class<?> value) {
- stopClass = value == null ? null : info(value);
- return this;
- }
-
- /**
- * Stop class.
- *
- * <p>
- * Same as the other stopClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder stopClass(ClassInfo value) {
- stopClass = value;
- return this;
- }
-
- /**
- * Bean dictionary type name.
- *
- * <p>
- * Specifies the dictionary type name for this bean.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * typeName(<js>"mybean"</js>);
- * }
- * }
- *
- * <jc>// Register it with a serializer or parser.</jc>
- * WriterSerializer <jv>serializer<jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Produces: "{_type:'mybean', ...}"</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#typeName()}
- * </ul>
- *
- * @param value The new value for this setting.
- * @return This object.
- */
- public Builder typeName(String value) {
- typeName = value;
- return this;
- }
-
- /**
- * Write-only bean properties.
- *
- * <p>
- * Specifies one or more properties on a bean that are write-only despite having valid setters.
- * Parsers will parse such properties as usual, but serializers will silently ignore them.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define our filter.</jc>
- * <jk>public class</jk> MyFilter <jk>extends</jk> Builder<MyBean> {
- * <jk>public</jk> MyFilter() {
- * writeOnlyProperties(<js>"foo,bar"</js>);
- * }
- * }
- *
- * <jc>// Register it with a serializer.</jc>
- * WriterSerializer <jv>serializer</jv> = JsonSerializer
- * .<jsm>create</jsm>()
- * .beanFilters(MyFilter.<jk>class</jk>)
- * .build();
- *
- * <jc>// Serializes all properties except for 'foo' and 'bar'.</jc>
- * String <jv>json</jv> = <jv>serializer</jv>.serialize(<jk>new</jk> MyBean());
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Bean#writeOnlyProperties()}
- * <li class='ja'>{@link Beanp#wo()}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(Class, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(String, String)}
- * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(Map)}
- * </ul>
- *
- * @param value
- * The new value for this setting.
- * <br>Values can contain comma-delimited list of property names.
- * @return This object.
- */
- public Builder writeOnlyProperties(String...value) {
- writeOnlyProperties = set();
- for (var v : value)
- split(v, x -> writeOnlyProperties.add(x));
- return this;
- }
- }
-
- /**
- * Create a new builder for this object.
- *
- * @param <T> The bean class being filtered.
- * @param beanClass The bean class being filtered.
- * @return A new builder.
- */
- public static <T> Builder create(ClassInfoTyped<T> beanClass) {
- return new Builder(beanClass);
- }
-
- private final ClassInfoTyped<?> beanClass;
- private final List<ClassInfo> beanDictionary;
- private final String example;
- private final Set<String> excludeProperties;
- private final boolean fluentSetters;
- private final ClassInfo implClass;
- private final ClassInfo interfaceClass;
- private final BeanInterceptor interceptor;
- private final Set<String> properties;
- private final PropertyNamer propertyNamer;
- private final Set<String> readOnlyProperties;
- private final boolean unsortedProperties;
- private final ClassInfo stopClass;
- private final String typeName;
- private final Set<String> writeOnlyProperties;
-
- /**
- * Constructor.
- */
- BeanFilter(Builder builder) {
- this.beanClass = builder.beanClass;
- this.typeName = builder.typeName;
- this.properties = copyOf(builder.properties);
- this.excludeProperties = copyOf(builder.excludeProperties);
- this.readOnlyProperties = copyOf(builder.readOnlyProperties);
- this.writeOnlyProperties = copyOf(builder.writeOnlyProperties);
- this.example = builder.example;
- this.implClass = builder.implClass;
- this.interfaceClass = builder.interfaceClass;
- this.stopClass = builder.stopClass;
- this.unsortedProperties = builder.unsortedProperties;
- this.fluentSetters = builder.fluentSetters;
- this.propertyNamer = builder.propertyNamer.asOptional().orElse(null);
- this.beanDictionary = builder.dictionary == null ? list() : u(copyOf(builder.dictionary));
- this.interceptor = builder.interceptor.asOptional().orElse(BeanInterceptor.DEFAULT);
- }
-
- /**
- * Returns the bean class that this filter applies to.
- *
- * @return The bean class that this filter applies to.
- */
- public ClassInfoTyped<?> getBeanClass() { return beanClass; }
-
- /**
- * Returns the bean dictionary defined on this bean.
- *
- * @return An unmodifiable list of the bean dictionary defined on this bean, or an empty list if no bean dictionary is defined.
- */
- public List<ClassInfo> getBeanDictionary() { return beanDictionary; }
-
- /**
- * Returns the example associated with this class.
- *
- * @return The example associated with this class, or <jk>null</jk> if no example is associated.
- */
- public String getExample() { return example; }
-
- /**
- * Returns the list of properties to ignore on a bean.
- *
- * @return The names of the properties to ignore on a bean, or an empty set to not ignore any properties.
- */
- public Set<String> getExcludeProperties() { return excludeProperties; }
-
- /**
- * Returns the implementation class associated with this class.
- *
- * @return The implementation class associated with this class, or <jk>null</jk> if no implementation class is associated.
- */
- public ClassInfo getImplClass() { return implClass; }
-
- /**
- * Returns the interface class associated with this class.
- *
- * @return The interface class associated with this class, or <jk>null</jk> if no interface class is associated.
- */
- public ClassInfo getInterfaceClass() { return interfaceClass; }
-
- /**
- * Returns the set and order of names of properties associated with a bean class.
- *
- * @return
- * The names of the properties associated with a bean class, or and empty set if all bean properties should
- * be used.
- */
- public Set<String> getProperties() { return properties; }
-
- /**
- * Returns the {@link PropertyNamer} associated with the bean to tailor the names of bean properties.
- *
- * @return The property namer class, or <jk>null</jk> if no property namer is associated with this bean property.
- */
- public PropertyNamer getPropertyNamer() { return propertyNamer; }
-
- /**
- * Returns the list of read-only properties on a bean.
- *
- * @return The names of the read-only properties on a bean, or an empty set to not have any read-only properties.
- */
- public Set<String> getReadOnlyProperties() { return readOnlyProperties; }
-
- /**
- * Returns the stop class associated with this class.
- *
- * @return The stop class associated with this class, or <jk>null</jk> if no stop class is associated.
- */
- public ClassInfo getStopClass() { return stopClass; }
-
- /**
- * Returns the dictionary name associated with this bean.
- *
- * @return The dictionary name associated with this bean, or <jk>null</jk> if no name is defined.
- */
- public String getTypeName() { return typeName; }
-
- /**
- * Returns the list of write-only properties on a bean.
- *
- * @return The names of the write-only properties on a bean, or an empty set to not have any write-only properties.
- */
- public Set<String> getWriteOnlyProperties() { return writeOnlyProperties; }
-
- /**
- * Returns <jk>true</jk> if we should find fluent setters.
- *
- * @return <jk>true</jk> if fluent setters should be found.
- */
- public boolean isFluentSetters() { return fluentSetters; }
-
- /**
- * Returns <jk>true</jk> if the properties defined on this bean class should be ordered alphabetically.
- *
- * <p>
- * This method is only used when the {@link #getProperties()} method returns <jk>null</jk>.
- * Otherwise, the ordering of the properties in the returned value is used.
- *
- * @return <jk>true</jk> if this bean opts out of alphabetical property sorting.
- */
- public boolean isUnsortedProperties() { return unsortedProperties; }
-
- /**
- * Calls the {@link BeanInterceptor#readProperty(Object, String, Object)} method on the registered property filters.
- *
- * @param bean The bean from which the property was read.
- * @param name The property name.
- * @param value The value just extracted from calling the bean getter.
- * @return The value to serialize. Default is just to return the existing value.
- */
- @SuppressWarnings({
- "unchecked" // Type erasure requires unchecked casts
- })
- public Object readProperty(Object bean, String name, Object value) {
- return interceptor.readProperty(bean, name, value);
- }
-
- /**
- * Calls the {@link BeanInterceptor#writeProperty(Object, String, Object)} method on the registered property filters.
- *
- * @param bean The bean from which the property was read.
- * @param name The property name.
- * @param value The value just parsed.
- * @return The value to serialize. Default is just to return the existing value.
- */
- @SuppressWarnings({
- "unchecked" // Type erasure requires unchecked casts
- })
- public Object writeProperty(Object bean, String name, Object value) {
- return interceptor.writeProperty(bean, name, value);
- }
-}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
index 206de6079d..7ac4d22bb0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMap.java
@@ -51,10 +51,10 @@ import org.apache.juneau.swap.*;
* methods are as follows:
* <ul class='spaced-list'>
* <li>
- * If {@link Bean @Bean} annotation is specified on class, then the order is the same as the list of properties
+ * If {@link Bean @Marshalled} annotation is specified on class, then the order is the same as the list of properties
* in the annotation.
* <li>
- * If {@link Bean @Bean} annotation is not specified on the class, then the order is the same as that returned
+ * If {@link Bean @Marshalled} annotation is not specified on the class, then the order is the same as that returned
* by the {@link java.beans.BeanInfo} class (i.e. ordered by definition in the class).
* </ul>
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
index cf18daee01..6efc8e06b3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMeta.java
@@ -44,7 +44,7 @@ import org.apache.juneau.commons.inject.*;
*
* <h5 class='topic'>Description</h5>
*
- * Uses introspection to find all the properties associated with this class. If the {@link Bean @Bean} annotation
+ * Uses introspection to find all the properties associated with this class. If the {@link Marshalled @Marshalled} annotation
* is present on the class, then that information is used to determine the properties on the class.
* Otherwise, the {@code BeanInfo} functionality in Java is used to determine the properties on the class.
*
@@ -53,10 +53,10 @@ import org.apache.juneau.commons.inject.*;
* The order of the properties are as follows:
* <ul class='spaced-list'>
* <li>
- * If {@link Bean @Bean} annotation is specified on class, then the order is the same as the list of properties
+ * If {@link Bean @Marshalled} annotation is specified on class, then the order is the same as the list of properties
* in the annotation.
* <li>
- * If {@link Bean @Bean} annotation is not specified on the class, then the order is based on the following.
+ * If {@link Bean @Marshalled} annotation is not specified on the class, then the order is based on the following.
* <ul>
* <li>Public fields (same order as {@code Class.getFields()}).
* <li>Properties returned by {@code BeanInfo.getPropertyDescriptors()}.
@@ -221,16 +221,16 @@ public class BeanMeta<T> {
if (bc.isNotABean(cm))
return notABean("Class matches exclude-class list");
- if (bc.isBeansRequireSerializable() && ! cm.isAssignableTo(Serializable.class) && ! ap.has(Bean.class, cm))
+ if (bc.isBeansRequireSerializable() && ! cm.isAssignableTo(Serializable.class) && ! ap.has(Marshalled.class, cm))
return notABean("Class is not serializable");
if (ap.has(BeanIgnore.class, cm) || ap.has(org.apache.juneau.commons.annotation.BeanIgnore.class, cm))
return notABean("Class is annotated with @BeanIgnore");
- if ((! bc.getBeanClassVisibility().isVisible(cm.getModifiers()) || cm.isAnonymousClass()) && ! ap.has(Bean.class, cm))
- return notABean("Class is not public");
+ if ((! bc.getBeanClassVisibility().isVisible(cm.getModifiers()) || cm.isAnonymousClass()) && ! ap.has(Marshalled.class, cm))
+ return notABean("Class is not public");
- var bm = new BeanMeta<>(cm, findBeanFilter(cm), null, implClass);
+ var bm = new BeanMeta<>(cm, findMarshalledFilter(cm), null, implClass);
if (nn(bm.notABeanReason))
return notABean(bm.notABeanReason);
@@ -274,11 +274,11 @@ public class BeanMeta<T> {
* Finds and creates the bean filter for the specified class metadata.
*
* <p>
- * Searches for {@link Bean @Bean} annotations on the class and its parent classes/interfaces. If found, creates a
- * {@link BeanFilter} that applies the configuration from those annotations.
+ * Searches for {@link Marshalled @Marshalled} annotations on the class and its parent classes/interfaces. If found, creates a
+ * {@link MarshalledFilter} that applies the configuration from those annotations.
*
* <p>
- * When multiple {@link Bean @Bean} annotations are found (e.g., on a parent class and a child class), they are
+ * When multiple {@link Marshalled @Marshalled} annotations are found (e.g., on a parent class and a child class), they are
* applied in reverse order (parent classes first, then child classes). This ensures that child class annotations
* override parent class annotations, allowing child classes to customize or extend the bean configuration.
*
@@ -294,16 +294,16 @@ public class BeanMeta<T> {
*
* @param <T> The class type.
* @param cm The class metadata to find the filter for.
- * @return The bean filter, or <jk>null</jk> if no {@link Bean @Bean} annotations are found on the class or its hierarchy.
- * @see Bean
- * @see BeanFilter
+ * @return The bean filter, or <jk>null</jk> if no {@link Marshalled @Marshalled} annotations are found on the class or its hierarchy.
+ * @see Marshalled
+ * @see MarshalledFilter
*/
- private static <T> BeanFilter findBeanFilter(ClassMeta<T> cm) {
+ private static <T> MarshalledFilter findMarshalledFilter(ClassMeta<T> cm) {
var ap = cm.getBeanContext().getAnnotationProvider();
- var l = ap.find(Bean.class, cm);
+ var l = ap.find(Marshalled.class, cm);
if (l.isEmpty())
return null;
- return BeanFilter.create(cm).applyAnnotations(reverse(l.stream().map(AnnotationInfo::inner).toList())).build();
+ return MarshalledFilter.create(cm).applyAnnotations(reverse(l.stream().map(AnnotationInfo::inner).toList())).build();
}
/*
@@ -351,15 +351,15 @@ public class BeanMeta<T> {
private BeanConstructor beanConstructor; // The constructor for this bean.
private final BeanContext beanContext; // The bean context that created this metadata object.
- private final BeanFilter beanFilter; // Optional bean filter associated with the target class.
+ private final MarshalledFilter beanFilter; // Optional bean filter associated with the target class.
private final NullableSupplier<InvocationHandler> beanProxyInvocationHandler; // The invocation handler for this bean (if it's an interface).
private final Supplier<BeanRegistry> beanRegistry; // The bean registry for this bean.
private final Supplier<List<ClassInfo>> classHierarchy; // List of all classes traversed in the class hierarchy.
private final ClassMeta<T> classMeta; // The target class type that this meta object describes.
- private final Supplier<String> dictionaryName; // The @Bean(typeName) annotation defined on this bean class.
+ private final Supplier<String> dictionaryName; // The @Marshalled(typeName) annotation defined on this bean class.
private final BeanPropertyMeta dynaProperty; // "extras" property.
@SuppressWarnings("rawtypes")
- private final Class<? extends org.apache.juneau.commons.function.BeanFactory> factoryClass; // @Bean(factory=X.class) — null means no factory.
+ private final Class<? extends org.apache.juneau.commons.function.BeanFactory> factoryClass; // @Marshalled(factory=X.class) — null means no factory.
private final boolean fluentSetters; // Whether fluent setters are enabled.
private final Map<Method,String> getterProps; // The getter properties on the target class.
private final Map<String,BeanPropertyMeta> hiddenProperties; // The hidden properties on the target class.
@@ -398,7 +398,7 @@ public class BeanMeta<T> {
@SuppressWarnings({
"java:S3776" // Cognitive complexity acceptable for bean metadata initialization
})
- protected BeanMeta(ClassMeta<T> cm, BeanFilter bf, String[] pNames, ClassInfo implClass) {
+ protected BeanMeta(ClassMeta<T> cm, MarshalledFilter bf, String[] pNames, ClassInfo implClass) {
classMeta = cm;
beanContext = cm.getBeanContext();
beanFilter = bf;
@@ -420,7 +420,7 @@ public class BeanMeta<T> {
var setterPropsMap = CollectionUtils.<Method,String>map();
var dynaPropertyValue = Value.<BeanPropertyMeta>empty();
var unsortedPropertiesTemp = false;
- var ba = ap.find(Bean.class, cm);
+ var ba = ap.find(Marshalled.class, cm);
var propertyNamer = opt(bf).map(x -> x.getPropertyNamer()).orElse(beanContext.getPropertyNamer());
this.typePropertyName = ba.stream().map(x -> x.inner().typePropertyName()).filter(Utils::ne).findFirst().orElseGet(beanContext::getBeanTypePropertyName);
@@ -507,7 +507,7 @@ public class BeanMeta<T> {
}
// Check for missing properties.
- fixedBeanProps.stream().filter(x -> ! normalProps.containsKey(x)).findFirst().ifPresent(x -> { throw bex(c, "The property ''{0}'' was defined on the @Bean(properties=X) annotation of class ''{1}'' but was not found on the class definition.", x, ci.getNameSimple()); });
+ fixedBeanProps.stream().filter(x -> ! normalProps.containsKey(x)).findFirst().ifPresent(x -> { throw bex(c, "The property ''{0}'' was defined on the @Marshalled(properties=X) annotation of class ''{1}'' but was not found on the class definition.", x, ci.getNameSimple()); });
// For records with renamed properties, remap constructor args to use the actual property names.
if (ci.isRecord() && ne(beanConstructor.args())) {
@@ -557,13 +557,13 @@ public class BeanMeta<T> {
// If a beanFilter is defined, look for inclusion and exclusion lists.
if (bf != null) {
- // Eliminated excluded properties if BeanFilter.excludeKeys is specified.
+ // Eliminated excluded properties if MarshalledFilter.excludeKeys is specified.
var bfbpi = bf.getProperties();
var bfbpx = bf.getExcludeProperties();
var p = propertiesValue.get();
if (! bfbpi.isEmpty()) {
- // Only include specified properties if BeanFilter.includeKeys is specified.
+ // Only include specified properties if MarshalledFilter.includeKeys is specified.
// Note that the order must match includeKeys.
Map<String,BeanPropertyMeta> p2 = map(); // NOAI
bfbpi.stream().filter(p::containsKey).forEach(x -> p2.put(x, p.remove(x)));
@@ -643,13 +643,13 @@ public class BeanMeta<T> {
* property inclusion/exclusion, property ordering, and type name mapping.
*
* <p>
- * The bean filter is typically created from the {@link Bean @Bean} annotation on the class. If no {@link Bean @Bean}
+ * The bean filter is typically created from the {@link Bean @Marshalled} annotation on the class. If no {@link Bean @Marshalled}
* annotation is present, this method returns <jk>null</jk>.
*
* @return The bean filter for this bean, or <jk>null</jk> if no bean filter is associated with this bean.
* @see Bean
*/
- public BeanFilter getBeanFilter() {
+ public MarshalledFilter getMarshalledFilter() {
return beanFilter;
}
@@ -667,7 +667,7 @@ public class BeanMeta<T> {
*
* <p>
* The bean registry is used to resolve dictionary names to class types. It's created when a bean class has a
- * {@link Bean#dictionary() @Bean(dictionary)} annotation that specifies a list of possible subclasses.
+ * {@link Bean#dictionary() @Marshalled(dictionary)} annotation that specifies a list of possible subclasses.
*
* @return The bean registry for this bean, or <jk>null</jk> if no bean registry is associated with it.
*/
@@ -681,7 +681,7 @@ public class BeanMeta<T> {
public ClassMeta<T> getClassMeta() { return classMeta; }
/**
- * Returns the dictionary name for this bean as defined through the {@link Bean#typeName() @Bean(typeName)} annotation.
+ * Returns the dictionary name for this bean as defined through the {@link Bean#typeName() @Marshalled(typeName)} annotation.
*
* @return The dictionary name for this bean, or <jk>null</jk> if it has no dictionary name defined.
*/
@@ -742,7 +742,7 @@ public class BeanMeta<T> {
* <p>
* The value is determined from:
* <ul>
- * <li>The {@link Bean#typePropertyName() @Bean(typePropertyName)} annotation on the class, if present.
+ * <li>The {@link Bean#typePropertyName() @Marshalled(typePropertyName)} annotation on the class, if present.
* <li>Otherwise, the default value from {@link BeanContext#getBeanTypePropertyName()}.
* </ul>
*
@@ -876,7 +876,7 @@ public class BeanMeta<T> {
* <p>
* Hidden properties can be defined through:
* <ul>
- * <li>{@link BeanFilter#getExcludeProperties() Bean filter exclude properties}
+ * <li>{@link MarshalledFilter#getExcludeProperties() Bean filter exclude properties}
* <li>Properties that fail validation during bean metadata creation
* </ul>
*
@@ -992,9 +992,9 @@ public class BeanMeta<T> {
* <li><b>Implementation class constructor:</b> If an {@link #implClassConstructor} was provided during bean
* metadata creation, it is used with an empty property list.
* <li><b>No-arg constructor:</b> Searches for a no-argument constructor. The visibility required depends on
- * whether the class has a {@link Bean @Bean} annotation:
+ * whether the class has a {@link Bean @Marshalled} annotation:
* <ul>
- * <li>If {@link Bean @Bean} is present, private constructors are allowed
+ * <li>If {@link Bean @Marshalled} is present, private constructors are allowed
* <li>Otherwise, the visibility is determined by {@link BeanContext#getBeanConstructorVisibility()}
* </ul>
* <li><b>No constructor:</b> Returns an empty {@link Optional} if no suitable constructor is found.
@@ -1051,7 +1051,7 @@ public class BeanMeta<T> {
if (implClassConstructor != null)
return new BeanConstructor(opt(implClassConstructor.accessible()), liste());
- var ba = ap.find(Bean.class, classMeta);
+ var ba = ap.find(Marshalled.class, classMeta);
var con = ci.getNoArgConstructor(! ba.isEmpty() ? Visibility.PRIVATE : vis).orElse(null);
if (con != null)
return new BeanConstructor(opt(con.accessible()), liste());
@@ -1289,10 +1289,10 @@ public class BeanMeta<T> {
* <p>
* The registry is built from:
* <ul>
- * <li><b>Bean filter dictionary:</b> Classes specified in the {@link BeanFilter#getBeanDictionary() bean filter's dictionary}
+ * <li><b>Bean filter dictionary:</b> Classes specified in the {@link MarshalledFilter#getBeanDictionary() bean filter's dictionary}
* (if a bean filter is present)
- * <li><b>{@link Bean @Bean} annotation:</b> If the class has a {@link Bean @Bean} annotation with a non-empty
- * {@link Bean#typeName() typeName()}, the class itself is added to the dictionary
+ * <li><b>{@link Marshalled @Marshalled} annotation:</b> If the class has a {@link Marshalled @Marshalled} annotation with a non-empty
+ * {@link Marshalled#typeName() typeName()}, the class itself is added to the dictionary
* </ul>
*
* <p>
@@ -1305,8 +1305,8 @@ public class BeanMeta<T> {
// Bean dictionary on bean filter.
var beanDictionaryClasses = opt(beanFilter).map(x -> new ArrayList<>(x.getBeanDictionary())).orElse(new ArrayList<>());
- // Bean dictionary from @Bean(typeName) annotation.
- var ba = beanContext.getAnnotationProvider().find(Bean.class, classMeta);
+ // Bean dictionary from @Marshalled(typeName) annotation.
+ var ba = beanContext.getAnnotationProvider().find(Marshalled.class, classMeta);
ba.stream().map(x -> x.inner().typeName()).filter(Utils::ne).findFirst().ifPresent(x -> beanDictionaryClasses.add(classMeta));
return new BeanRegistry(beanContext, null, beanDictionaryClasses);
@@ -1328,7 +1328,7 @@ public class BeanMeta<T> {
* </ol>
*
* <p>
- * If a {@link BeanFilter#getInterfaceClass() bean filter interface class} is specified, the traversal starts
+ * If a {@link MarshalledFilter#getInterfaceClass() bean filter interface class} is specified, the traversal starts
* from that interface class instead of the bean class itself. This allows beans to use properties defined on
* a parent interface rather than the concrete implementation class.
*
@@ -1340,7 +1340,7 @@ public class BeanMeta<T> {
*/
private List<ClassInfo> findClassHierarchy() {
var result = new LinkedList<ClassInfo>();
- // If @Bean.interfaceClass is specified on the parent class, then we want
+ // If @Marshalled.interfaceClass is specified on the parent class, then we want
// to use the properties defined on that class, not the subclass.
var c2 = (nn(beanFilter) && nn(beanFilter.getInterfaceClass()) ? beanFilter.getInterfaceClass() : classMeta);
findClassHierarchy(c2, stopClass, result::add);
@@ -1385,13 +1385,13 @@ public class BeanMeta<T> {
* The dictionary name is determined by searching in the following order of precedence:
* <ol>
* <li><b>Bean filter type name:</b> If a bean filter is present and has a type name specified via
- * {@link BeanFilter#getTypeName()}, that value is used.
+ * {@link MarshalledFilter#getTypeName()}, that value is used.
* <li><b>Bean registry lookup:</b> If a bean registry exists for this bean, it is queried for the type name
* of this class.
* <li><b>Parent class registry lookup:</b> Searches through parent classes and interfaces (starting from the
* second one, skipping the class itself) and checks if any of their bean registries contain a type name
* for this class.
- * <li><b>{@link Bean @Bean} annotation:</b> If the class has a {@link Bean @Bean} annotation with a non-empty
+ * <li><b>{@link Marshalled @Marshalled} annotation:</b> If the class has a {@link Marshalled @Marshalled} annotation with a non-empty
* {@link Bean#typeName() typeName()}, that value is used.
* <li><b>No dictionary name:</b> Returns <jk>null</jk> if no dictionary name is found.
* </ol>
@@ -1428,11 +1428,11 @@ public class BeanMeta<T> {
if (n != null)
return n;
- return classMeta.getBeanContext().getAnnotationProvider().find(Bean.class, classMeta)
+ return classMeta.getBeanContext().getAnnotationProvider().find(Marshalled.class, classMeta)
.stream()
.map(AnnotationInfo::inner)
.filter(x -> ! x.typeName().isEmpty())
- .map(Bean::typeName)
+ .map(Marshalled::typeName)
.findFirst()
.orElse(null);
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMetaFiltered.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMetaFiltered.java
index 74abfe763e..878644eacb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMetaFiltered.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMetaFiltered.java
@@ -45,6 +45,6 @@ public class BeanMetaFiltered<T> extends BeanMeta<T> {
* @param pNames The list of transformed property names.
*/
public BeanMetaFiltered(BeanMeta<T> innerMeta, String[] pNames) {
- super(innerMeta.getClassMeta(), innerMeta.getBeanFilter(), pNames, null);
+ super(innerMeta.getClassMeta(), innerMeta.getMarshalledFilter(), pNames, null);
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRegistry.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRegistry.java
index 239683465e..a64633dae3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRegistry.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRegistry.java
@@ -39,7 +39,7 @@ import org.apache.juneau.commons.utils.*;
* In a nutshell, provides a simple mapping of bean class objects to identifying names.
*
* <p>
- * Class names are defined through the {@link Bean#typeName() @Bean(typeName)} annotation.
+ * Class names are defined through the {@link Bean#typeName() @Marshalled(typeName)} annotation.
*
* <p>
* The dictionary is used by the framework in the following ways:
@@ -85,7 +85,7 @@ public class BeanRegistry {
* Gets the class metadata for the specified bean type name.
*
* @param typeName
- * The bean type name as defined by {@link Bean#typeName() @Bean(typeName)}.
+ * The bean type name as defined by {@link Bean#typeName() @Marshalled(typeName)}.
* Can include multi-dimensional array type names (e.g. <js>"X^^"</js>).
* @return The class metadata for the bean.
*/
@@ -166,12 +166,12 @@ public class BeanRegistry {
});
} else {
// @formatter:off
- var typeName = ap.find(Bean.class, ci)
+ var typeName = ap.find(Marshalled.class, ci)
.stream()
.map(x -> x.inner().typeName())
.filter(Utils::ne)
.findFirst()
- .orElseThrow(() -> bex("Class ''{0}'' was passed to BeanRegistry but it doesn't have a @Bean(typeName) annotation defined.", ci.getName()));
+ .orElseThrow(() -> bex("Class ''{0}'' was passed to BeanRegistry but it doesn't have a @Marshalled(typeName) annotation defined.", ci.getName()));
// @formatter:on
addToMap(typeName, bc.getClassMeta(ci.inner()));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
index 89254a98a8..65429839a0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ClassMeta.java
@@ -66,7 +66,7 @@ import org.apache.juneau.swap.*;
*
* @param <T> The class type of the wrapped class.
*/
-@Bean(properties = "innerClass,elementType,keyType,valueType,notABeanReason,initException,beanMeta")
+@Marshalled(properties = "innerClass,elementType,keyType,valueType,notABeanReason,initException,beanMeta")
@SuppressWarnings({
"java:S1200", // Class has 23 dependencies, acceptable for this core reflection metadata class
"java:S1452", // Wildcard required - ClassMeta<?>, ObjectSwap<T,?>, etc. for element/component types
@@ -485,7 +485,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* Returns the bean registry for this class.
*
* <p>
- * This bean registry contains names specified in the {@link Bean#dictionary() @Bean(dictionary)} annotation
+ * This bean registry contains names specified in the {@link Bean#dictionary() @Marshalled(dictionary)} annotation
* defined on the class, regardless of whether the class is an actual bean.
* This allows interfaces to define subclasses with type names.
*
@@ -512,7 +512,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* Returns the bean dictionary name associated with this class.
*
* <p>
- * The lexical name is defined by {@link Bean#typeName() @Bean(typeName)}.
+ * The lexical name is defined by {@link Bean#typeName() @Marshalled(typeName)}.
*
* @return
* The type name associated with this bean class, or <jk>null</jk> if there is no type name defined or this
@@ -1440,13 +1440,13 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
if (nn(d))
return d;
- // Note that @Bean(typeName) can be defined on non-bean types, so
+ // Note that @Marshalled(typeName) can be defined on non-bean types, so
// we have to check again.
- return beanContext.getAnnotationProvider().find(Bean.class, this)
+ return beanContext.getAnnotationProvider().find(Marshalled.class, this)
.stream()
.map(AnnotationInfo::inner)
.filter(x -> ! x.typeName().isEmpty())
- .map(Bean::typeName)
+ .map(Marshalled::typeName)
.findFirst()
.orElse(null);
}
@@ -1558,7 +1558,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
private String findExample() {
- var ex = beanMeta.get().optBeanMeta().map(x -> x.getBeanFilter()).map(x -> x.getExample()).orElse(null);
+ var ex = beanMeta.get().optBeanMeta().map(x -> x.getMarshalledFilter()).map(x -> x.getExample()).orElse(null);
if (ex == null)
ex = marshalledFilter.map(x -> x.getExample()).orElse(null);
@@ -1641,12 +1641,13 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
if (is(Object.class))
return null;
- var v = beanContext.getAnnotationProvider().find(Bean.class, this).stream().map(x -> x.inner()).filter(x -> neq(x.implClass(), void.class)).map(ClassInfo::of).findFirst().orElse(null);
-
- if (v == null)
- v = marshalledFilter.map(x -> x.getImplClass()).map(ReflectionUtils::info).orElse(null);
-
- return (ClassInfoTyped<? extends T>)v;
+ var mf = marshalledFilter.get();
+ if (mf == null)
+ return null;
+ var implClassInfo = mf.getImplClass();
+ if (implClassInfo == null)
+ return null;
+ return (ClassInfoTyped<? extends T>)implClassInfo;
}
private MarshalledFilter findMarshalledFilter() {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
index bbdfb3c7a0..1d0bddddd8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.java
@@ -171,10 +171,10 @@ public abstract class Context {
* As a rule, any Juneau annotation with an <l>on()</l> method can be used with this setting.
*
* <p>
- * The following example shows the equivalent methods for applying the {@link Bean @Bean} annotation:
+ * The following example shows the equivalent methods for applying the {@link Bean @Marshalled} annotation:
* <p class='bjava'>
* <jc>// Class with explicit annotation.</jc>
- * <ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
+ * <ja>@Marshalled</ja>(properties=<js>"street,city,state"</js>)
* <jk>public class</jk> A {...}
*
* <jc>// Class with annotation applied via @BeanConfig</jc>
@@ -182,7 +182,7 @@ public abstract class Context {
*
* <jc>// Java REST method with @BeanConfig annotation.</jc>
* <ja>@RestGet</ja>(...)
- * <ja>@Bean</ja>(on=<js>"B"</js>, properties=<js>"street,city,state"</js>)
+ * <ja>@Marshalled</ja>(on=<js>"B"</js>, properties=<js>"street,city,state"</js>)
* <jk>public void</jk> doFoo() {...}
* </p>
*
@@ -191,8 +191,8 @@ public abstract class Context {
* config annotations. However, concrete implementations of annotations are also provided that can be passed
* directly into builder classes like so:
* <p class='bjava'>
- * <jc>// Create a concrete @Bean annotation.</jc>
- * <ja>Bean</ja> <jv>annotation</jv> = BeanAnnotation.<jsm>create</jsm>(B.<jk>class</jk>).properties(<js>"street,city,state"</js>).build();
+ * <jc>// Create a concrete @Marshalled annotation.</jc>
+ * <ja>Bean</ja> <jv>annotation</jv> = MarshalledAnnotation.<jsm>create</jsm>(B.<jk>class</jk>).properties(<js>"street,city,state"</js>).build();
*
* <jc>// Apply it to a serializer.</jc>
* WriterSerializer <jv>serializer</jv> = JsonSerializer.<jsm>create</jsm>().annotations(<jv>annotation</jv>).build();
@@ -205,7 +205,7 @@ public abstract class Context {
* The following is the list of annotations builders provided that can be constructed
* and passed into the builder class:
* <ul class='javatreec'>
- * <li class='ja'>{@link BeanAnnotation}
+ * <li class='ja'>{@link MarshalledAnnotation}
* <li class='ja'>{@link BeancAnnotation}
* <li class='ja'>{@link BeanIgnoreAnnotation}
* <li class='ja'>{@link BeanpAnnotation}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshalledFilter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshalledFilter.java
index ce78c4f9f1..896fc18c1f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshalledFilter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshalledFilter.java
@@ -16,24 +16,71 @@
*/
package org.apache.juneau;
+import static org.apache.juneau.commons.reflect.ReflectionUtils.*;
import static org.apache.juneau.commons.utils.ClassUtils.*;
+import static org.apache.juneau.commons.utils.CollectionUtils.*;
+import static org.apache.juneau.commons.utils.StringUtils.*;
import static org.apache.juneau.commons.utils.Utils.*;
+import java.beans.*;
import java.util.*;
import org.apache.juneau.annotation.*;
+import org.apache.juneau.commons.inject.*;
+import org.apache.juneau.commons.reflect.*;
+import org.apache.juneau.swap.*;
/**
- * Parent class for all non-bean filters.
+ * Filter for customizing how POJOs and beans are handled during serialization and parsing.
*
* <p>
- * Marshalled filters are used to control aspects of how POJOs are handled during serialization and parsing.
+ * Marshalled filters provide fine-grained control over how classes are processed, allowing you to:
+ * <ul>
+ * <li>Specify which properties to include or exclude (for beans)
+ * <li>Define read-only and write-only properties
+ * <li>Control property ordering and naming
+ * <li>Configure bean dictionaries for polymorphic types
+ * <li>Intercept property getter and setter calls
+ * <li>Define interface classes and stop classes for property filtering
+ * <li>Specify implementation classes for interfaces and abstract classes
+ * <li>Provide example instances for documentation
+ * </ul>
*
* <p>
- * Marshalled filters are created by {@link Builder} which is the programmatic equivalent to the {@link Marshalled @Marshalled}
- * annotation.
+ * Marshalled filters are created using the {@link Builder} class, which is the programmatic equivalent to the
+ * {@link Marshalled @Marshalled} annotation. Filters can be registered with serializers and parsers to customize
+ * how specific classes are handled.
*
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Define a custom filter for MyBean</jc>
+ * <jk>public class</jk> MyMarshalledFilter <jk>extends</jk> MarshalledFilter.Builder<MyBean> {
+ * <jk>public</jk> MyMarshalledFilter() {
+ * properties(<js>"id,name,email"</js>); <jc>// Only include these properties</jc>
+ * excludeProperties(<js>"password"</js>); <jc>// Exclude sensitive data</jc>
+ * readOnlyProperties(<js>"id"</js>); <jc>// ID is read-only</jc>
+ * unsortedProperties(); <jc>// Opt out of default alphabetical sorting</jc>
+ * }
+ * }
+ *
+ * <jc>// Register the filter with a serializer</jc>
+ * WriterSerializer <jv>serializer</jv> = JsonSerializer
+ * .<jsm>create</jsm>()
+ * .beanFilters(MyMarshalledFilter.<jk>class</jk>)
+ * .build();
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5>
+ * <ul>
+ * <li class='ja'>{@link Marshalled @Marshalled}
+ * <li class='jc'>{@link BeanInterceptor}
+ * <li class='jc'>{@link PropertyNamer}
+ * </ul>
*/
+@SuppressWarnings({
+ "rawtypes", // Raw types necessary for generic type handling
+ "java:S1452" // Wildcard required - ClassInfoTyped<?>, ClassMeta<?> for filter metadata
+})
public class MarshalledFilter {
/**
@@ -41,13 +88,25 @@ public class MarshalledFilter {
*/
public static class Builder {
- Class<?> marshalledClass;
-
- Class<?> implClass;
- String example;
+ private ClassInfoTyped<?> beanClass;
+ private Class<?> marshalledClass;
+ private String typeName;
+ private String example;
+ private Set<String> properties = set();
+ private Set<String> excludeProperties = set();
+ private Set<String> readOnlyProperties = set();
+ private Set<String> writeOnlyProperties = set();
+ private ClassInfo implClass;
+ private ClassInfo interfaceClass;
+ private ClassInfo stopClass;
+ private boolean unsortedProperties;
+ private boolean fluentSetters;
+ private BeanInstantiator.Builder<PropertyNamer> propertyNamer = BeanInstantiator.of(PropertyNamer.class);
+ private List<ClassInfo> dictionary;
+ private BeanInstantiator.Builder<BeanInterceptor> interceptor = BeanInstantiator.of(BeanInterceptor.class);
/**
- * Constructor.
+ * Constructor for non-bean POJO filters.
*
* @param marshalledClass The class that this filter applies to.
*/
@@ -55,17 +114,54 @@ public class MarshalledFilter {
this.marshalledClass = marshalledClass;
}
+ /**
+ * Constructor for bean filters.
+ *
+ * @param beanClass The bean class that this filter applies to.
+ */
+ protected Builder(ClassInfoTyped<?> beanClass) {
+ this.beanClass = beanClass;
+ this.marshalledClass = beanClass.inner();
+ }
+
/**
* Applies the information in the specified list of {@link Marshalled @Marshalled} annotations to this filter.
*
* @param annotations The annotations to apply.
* @return This object.
*/
+ @SuppressWarnings({
+ "java:S3776" // Cognitive complexity acceptable for annotation application
+ })
public Builder applyAnnotations(List<Marshalled> annotations) {
annotations.forEach(x -> {
+ if (isAnyNotEmpty(x.properties(), x.p()))
+ properties(x.properties(), x.p());
+ if (x.unsorted())
+ unsortedProperties(true);
+ if (x.findFluentSetters())
+ findFluentSetters();
+ if (isAnyNotEmpty(x.excludeProperties(), x.xp()))
+ excludeProperties(x.excludeProperties(), x.xp());
+ if (isAnyNotEmpty(x.readOnlyProperties(), x.ro()))
+ readOnlyProperties(x.readOnlyProperties(), x.ro());
+ if (isAnyNotEmpty(x.writeOnlyProperties(), x.wo()))
+ writeOnlyProperties(x.writeOnlyProperties(), x.wo());
+ if (ne(x.typeName()))
+ typeName(x.typeName());
+ if (isNotVoid(x.propertyNamer()))
+ propertyNamer(x.propertyNamer());
+ if (isNotVoid(x.interfaceClass()))
+ interfaceClass(x.interfaceClass());
+ if (isNotVoid(x.stopClass()))
+ stopClass(x.stopClass());
+ if (isNotVoid(x.interceptor()))
+ interceptor(x.interceptor());
if (isNotVoid(x.implClass()))
implClass(x.implClass());
+ if (isNotEmptyArray(x.dictionary()))
+ dictionary(x.dictionary());
if (ne(x.example()))
example(x.example());
});
@@ -82,9 +178,47 @@ public class MarshalledFilter {
}
/**
- * POJO example in Simplified JSON format.
+ * Bean dictionary.
*
- * @param value The new value for this annotation.
+ * <p>
+ * Adds to the list of classes that make up the bean dictionary for this bean.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#dictionary()}
+ * <li class='jm'>{@link BeanContext.Builder#beanDictionary(Class...)}
+ * </ul>
+ *
+ * @param values The values to add to this property.
+ * @return This object.
+ */
+ public Builder dictionary(Class<?>...values) {
+ if (dictionary == null)
+ dictionary = list();
+ for (var cc : values)
+ dictionary.add(info(cc));
+ return this;
+ }
+
+ /**
+ * Bean dictionary.
+ *
+ * <p>
+ * Same as the other dictionary method but accepts {@link ClassInfo} objects directly instead of {@link Class} objects.
+ *
+ * @param values The class info objects to add to this property.
+ * @return This object.
+ */
+ public Builder dictionary(ClassInfo...values) {
+ if (dictionary == null)
+ dictionary = list();
+ Collections.addAll(dictionary, values);
+ return this;
+ }
+
+ /**
+ * Example.
+ *
+ * @param value The new value for this property.
* @return This object.
*/
public Builder example(String value) {
@@ -93,31 +227,378 @@ public class MarshalledFilter {
}
/**
- * Implementation class.
+ * Bean property excludes.
+ *
+ * <p>
+ * Specifies properties to exclude from the bean class.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#excludeProperties()}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(Class, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(String, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesExcludes(Map)}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>Values can contain comma-delimited list of property names.
+ * @return This object.
+ */
+ public Builder excludeProperties(String...value) {
+ excludeProperties = set();
+ for (var v : value)
+ split(v, x -> excludeProperties.add(x));
+ return this;
+ }
+
+ /**
+ * Find fluent setters.
+ *
+ * <p>
+ * When enabled, fluent setters are detected on beans.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#findFluentSetters()}
+ * <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
+ * </ul>
+ *
+ * @return This object.
+ */
+ public Builder findFluentSetters() {
+ fluentSetters = true;
+ return this;
+ }
+
+ /**
+ * Bean implementation class.
*
* @param value The new value for this setting.
* @return This object.
*/
public Builder implClass(Class<?> value) {
+ implClass = value == null ? null : info(value);
+ return this;
+ }
+
+ /**
+ * Implementation class.
+ *
+ * <p>
+ * Same as the other implClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder implClass(ClassInfo value) {
implClass = value;
return this;
}
+
+ /**
+ * Bean interceptor.
+ *
+ * <p>
+ * The interceptor to use for intercepting and altering getter and setter calls.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#interceptor()}
+ * <li class='jc'>{@link BeanInterceptor}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>The default value is {@link BeanInterceptor}.
+ * @return This object.
+ */
+ @SuppressWarnings("unchecked")
+ public Builder interceptor(Class<?> value) {
+ interceptor.type((Class<? extends BeanInterceptor>) value);
+ return this;
+ }
+
+ /**
+ * Bean interceptor.
+ *
+ * <p>
+ * Same as the other interceptor method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder interceptor(ClassInfo value) {
+ interceptor.type(value);
+ return this;
+ }
+
+ /**
+ * Bean interface class.
+ *
+ * <p>
+ * Identifies a class to be used as the interface class for this and all subclasses.
+ * When specified, only the list of properties defined on the interface class will be used during serialization.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#interfaceClass()}
+ * </ul>
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder interfaceClass(Class<?> value) {
+ interfaceClass = value == null ? null : info(value);
+ return this;
+ }
+
+ /**
+ * Interface class.
+ *
+ * <p>
+ * Same as the other interfaceClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder interfaceClass(ClassInfo value) {
+ interfaceClass = value;
+ return this;
+ }
+
+ /**
+ * Bean property includes.
+ *
+ * <p>
+ * Specifies the set and order of names of properties associated with the bean class.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#properties()}
+ * <li class='jm'>{@link BeanContext.Builder#beanProperties(Class, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanProperties(String, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanProperties(Map)}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>Values can contain comma-delimited list of property names.
+ * @return This object.
+ */
+ public Builder properties(String...value) {
+ properties = set();
+ for (var v : value)
+ split(v, x -> properties.add(x));
+ return this;
+ }
+
+ /**
+ * Bean property namer.
+ *
+ * <p>
+ * The class to use for calculating bean property names.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#propertyNamer()}
+ * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jc'>{@link PropertyNamer}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>The default is {@link BasicPropertyNamer}.
+ * @return This object.
+ */
+ public Builder propertyNamer(Class<? extends PropertyNamer> value) {
+ propertyNamer.type(value);
+ return this;
+ }
+
+ /**
+ * Bean property namer.
+ *
+ * <p>
+ * Same as the other propertyNamer method but accepts a {@link ClassInfoTyped} object directly instead of a {@link Class} object.
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder propertyNamer(ClassInfoTyped<? extends PropertyNamer> value) {
+ propertyNamer.type(value);
+ return this;
+ }
+
+ /**
+ * Read-only bean properties.
+ *
+ * <p>
+ * Specifies one or more properties on a bean that are read-only despite having valid getters.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#readOnlyProperties()}
+ * <li class='ja'>{@link Beanp#ro()}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(Class, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(String, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesReadOnly(Map)}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>Values can contain comma-delimited list of property names.
+ * @return This object.
+ */
+ public Builder readOnlyProperties(String...value) {
+ readOnlyProperties = set();
+ for (var v : value)
+ split(v, x -> readOnlyProperties.add(x));
+ return this;
+ }
+
+ /**
+ * Opt out of alphabetical property sorting for this specific bean.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#unsorted()}
+ * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
+ * </ul>
+ *
+ * @return This object.
+ */
+ public Builder unsortedProperties() {
+ unsortedProperties = true;
+ return this;
+ }
+
+ /**
+ * Opt out of alphabetical property sorting for this specific bean.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#unsorted()}
+ * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
+ * </ul>
+ *
+ * @param value
+ * The new value for this property.
+ * <br>The default is <jk>false</jk>.
+ * @return This object.
+ */
+ public Builder unsortedProperties(boolean value) {
+ unsortedProperties = value;
+ return this;
+ }
+
+ /**
+ * Bean stop class.
+ *
+ * <p>
+ * Identifies a stop class for this class and all subclasses.
+ * Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#stopClass()}
+ * </ul>
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder stopClass(Class<?> value) {
+ stopClass = value == null ? null : info(value);
+ return this;
+ }
+
+ /**
+ * Stop class.
+ *
+ * <p>
+ * Same as the other stopClass method but accepts a {@link ClassInfo} object directly instead of a {@link Class} object.
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder stopClass(ClassInfo value) {
+ stopClass = value;
+ return this;
+ }
+
+ /**
+ * Bean dictionary type name.
+ *
+ * <p>
+ * Specifies the dictionary type name for this bean.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#typeName()}
+ * </ul>
+ *
+ * @param value The new value for this setting.
+ * @return This object.
+ */
+ public Builder typeName(String value) {
+ typeName = value;
+ return this;
+ }
+
+ /**
+ * Write-only bean properties.
+ *
+ * <p>
+ * Specifies one or more properties on a bean that are write-only despite having valid setters.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Marshalled#writeOnlyProperties()}
+ * <li class='ja'>{@link Beanp#wo()}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(Class, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(String, String)}
+ * <li class='jm'>{@link BeanContext.Builder#beanPropertiesWriteOnly(Map)}
+ * </ul>
+ *
+ * @param value
+ * The new value for this setting.
+ * <br>Values can contain comma-delimited list of property names.
+ * @return This object.
+ */
+ public Builder writeOnlyProperties(String...value) {
+ writeOnlyProperties = set();
+ for (var v : value)
+ split(v, x -> writeOnlyProperties.add(x));
+ return this;
+ }
}
/**
- * Create a new instance of this POJO filter.
+ * Create a new builder for this object for use with non-bean POJO classes.
*
* @param <T> The POJO class being filtered.
* @param marshalledClass The POJO class being filtered.
- * @return A new {@link Builder} object.
+ * @return A new builder.
*/
public static <T> Builder create(Class<T> marshalledClass) {
return new Builder(marshalledClass);
}
+ /**
+ * Create a new builder for this object for use with bean classes.
+ *
+ * @param <T> The bean class being filtered.
+ * @param beanClass The bean class being filtered.
+ * @return A new builder.
+ */
+ public static <T> Builder create(ClassInfoTyped<T> beanClass) {
+ return new Builder(beanClass);
+ }
+
+ private final ClassInfoTyped<?> beanClass;
private final Class<?> marshalledClass;
- private final Class<?> implClass;
+ private final List<ClassInfo> beanDictionary;
private final String example;
+ private final Set<String> excludeProperties;
+ private final boolean fluentSetters;
+ private final ClassInfo implClass;
+ private final ClassInfo interfaceClass;
+ private final BeanInterceptor interceptor;
+ private final Set<String> properties;
+ private final PropertyNamer propertyNamer;
+ private final Set<String> readOnlyProperties;
+ private final boolean unsortedProperties;
+ private final ClassInfo stopClass;
+ private final String typeName;
+ private final Set<String> writeOnlyProperties;
/**
* Constructor.
@@ -125,24 +606,65 @@ public class MarshalledFilter {
* @param builder The builder for this object.
*/
protected MarshalledFilter(Builder builder) {
+ this.beanClass = builder.beanClass;
this.marshalledClass = builder.marshalledClass;
- this.implClass = builder.implClass;
+ this.typeName = builder.typeName;
+ this.properties = copyOf(builder.properties);
+ this.excludeProperties = copyOf(builder.excludeProperties);
+ this.readOnlyProperties = copyOf(builder.readOnlyProperties);
+ this.writeOnlyProperties = copyOf(builder.writeOnlyProperties);
this.example = builder.example;
+ this.implClass = builder.implClass;
+ this.interfaceClass = builder.interfaceClass;
+ this.stopClass = builder.stopClass;
+ this.unsortedProperties = builder.unsortedProperties;
+ this.fluentSetters = builder.fluentSetters;
+ this.propertyNamer = builder.propertyNamer.asOptional().orElse(null);
+ this.beanDictionary = builder.dictionary == null ? list() : u(copyOf(builder.dictionary));
+ this.interceptor = builder.interceptor.asOptional().orElse(BeanInterceptor.DEFAULT);
}
/**
- * Returns the example string with this class.
+ * Returns the bean class that this filter applies to.
+ *
+ * @return The bean class that this filter applies to, or <jk>null</jk> if this is a non-bean filter.
+ */
+ public ClassInfoTyped<?> getBeanClass() { return beanClass; }
+
+ /**
+ * Returns the bean dictionary defined on this bean.
+ *
+ * @return An unmodifiable list of the bean dictionary defined on this bean, or an empty list if no bean dictionary is defined.
+ */
+ public List<ClassInfo> getBeanDictionary() { return beanDictionary; }
+
+ /**
+ * Returns the example associated with this class.
*
- * @return The example string associated with this class, or <jk>null</jk> if no example string is associated.
+ * @return The example associated with this class, or <jk>null</jk> if no example is associated.
*/
public String getExample() { return example; }
+ /**
+ * Returns the list of properties to ignore on a bean.
+ *
+ * @return The names of the properties to ignore on a bean, or an empty set to not ignore any properties.
+ */
+ public Set<String> getExcludeProperties() { return excludeProperties; }
+
/**
* Returns the implementation class associated with this class.
*
* @return The implementation class associated with this class, or <jk>null</jk> if no implementation class is associated.
*/
- public Class<?> getImplClass() { return implClass; }
+ public ClassInfo getImplClass() { return implClass; }
+
+ /**
+ * Returns the interface class associated with this class.
+ *
+ * @return The interface class associated with this class, or <jk>null</jk> if no interface class is associated.
+ */
+ public ClassInfo getInterfaceClass() { return interfaceClass; }
/**
* Returns the class that this filter applies to.
@@ -150,4 +672,96 @@ public class MarshalledFilter {
* @return The class that this filter applies to.
*/
public Class<?> getMarshalledClass() { return marshalledClass; }
-}
\ No newline at end of file
+
+ /**
+ * Returns the set and order of names of properties associated with a bean class.
+ *
+ * @return
+ * The names of the properties associated with a bean class, or and empty set if all bean properties should
+ * be used.
+ */
+ public Set<String> getProperties() { return properties; }
+
+ /**
+ * Returns the {@link PropertyNamer} associated with the bean to tailor the names of bean properties.
+ *
+ * @return The property namer class, or <jk>null</jk> if no property namer is associated with this bean property.
+ */
+ public PropertyNamer getPropertyNamer() { return propertyNamer; }
+
+ /**
+ * Returns the list of read-only properties on a bean.
+ *
+ * @return The names of the read-only properties on a bean, or an empty set to not have any read-only properties.
+ */
+ public Set<String> getReadOnlyProperties() { return readOnlyProperties; }
+
+ /**
+ * Returns the stop class associated with this class.
+ *
+ * @return The stop class associated with this class, or <jk>null</jk> if no stop class is associated.
+ */
+ public ClassInfo getStopClass() { return stopClass; }
+
+ /**
+ * Returns the dictionary name associated with this bean.
+ *
+ * @return The dictionary name associated with this bean, or <jk>null</jk> if no name is defined.
+ */
+ public String getTypeName() { return typeName; }
+
+ /**
+ * Returns the list of write-only properties on a bean.
+ *
+ * @return The names of the write-only properties on a bean, or an empty set to not have any write-only properties.
+ */
+ public Set<String> getWriteOnlyProperties() { return writeOnlyProperties; }
+
+ /**
+ * Returns <jk>true</jk> if we should find fluent setters.
+ *
+ * @return <jk>true</jk> if fluent setters should be found.
+ */
+ public boolean isFluentSetters() { return fluentSetters; }
+
+ /**
+ * Returns <jk>true</jk> if the properties defined on this bean class should be ordered alphabetically.
+ *
+ * <p>
+ * This method is only used when the {@link #getProperties()} method returns <jk>null</jk>.
+ * Otherwise, the ordering of the properties in the returned value is used.
+ *
+ * @return <jk>true</jk> if this bean opts out of alphabetical property sorting.
+ */
+ public boolean isUnsortedProperties() { return unsortedProperties; }
+
+ /**
+ * Calls the {@link BeanInterceptor#readProperty(Object, String, Object)} method on the registered property filters.
+ *
+ * @param bean The bean from which the property was read.
+ * @param name The property name.
+ * @param value The value just extracted from calling the bean getter.
+ * @return The value to serialize. Default is just to return the existing value.
+ */
+ @SuppressWarnings({
+ "unchecked" // Type erasure requires unchecked casts
+ })
+ public Object readProperty(Object bean, String name, Object value) {
+ return interceptor.readProperty(bean, name, value);
+ }
+
+ /**
+ * Calls the {@link BeanInterceptor#writeProperty(Object, String, Object)} method on the registered property filters.
+ *
+ * @param bean The bean from which the property was read.
+ * @param name The property name.
+ * @param value The value just parsed.
+ * @return The value to serialize. Default is just to return the existing value.
+ */
+ @SuppressWarnings({
+ "unchecked" // Type erasure requires unchecked casts
+ })
+ public Object writeProperty(Object bean, String name, Object value) {
+ return interceptor.writeProperty(bean, name, value);
+ }
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
index 79fd4d8e97..79079d4a3c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/PropertyNamer.java
@@ -26,7 +26,7 @@ import org.apache.juneau.annotation.*;
* this to <js>"foo-bar-url"</js>.
*
* <p>
- * Property namers are associated with beans through the {@link Bean#propertyNamer @Bean(propertyNamer)} annotation.
+ * Property namers are associated with beans through the {@link Bean#propertyNamer @Marshalled(propertyNamer)} annotation.
*
*/
public interface PropertyNamer {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
index 7a62ff4732..87c80e7a7c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/UriContext.java
@@ -44,7 +44,7 @@ import org.apache.juneau.parser.*;
* (e.g. <js>"/foo/bar"</js>) URLs.
*
*/
-@Bean
+@Marshalled
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_aContextRoot)
})
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
deleted file mode 100644
index 7e840b8731..0000000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
+++ /dev/null
@@ -1,539 +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.beans.*;
-import java.lang.annotation.*;
-import java.util.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.swap.*;
-
-/**
- * Used to tailor how beans get interpreted by the framework.
- *
- * <p>
- * Can be used in the following locations:
- * <ul>
- * <li>Bean classes and parent interfaces.
- * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link BeanApply @BeanApply}.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanAnnotation">@Bean Annotation</a>
- * </ul>
- */
-@Documented
-@Target({ TYPE })
-@Retention(RUNTIME)
-@Inherited
-@SuppressWarnings({
- "java:S1452" // Wildcard required - Class<? extends BeanInterceptor<?>> for interceptor definition
-})
-public @interface Bean {
-
- /**
- * Optional description for the exposed API.
- *
- * @return The annotation value.
- * @since 9.2.0
- */
- String[] description() default {};
-
- /**
- * Bean factory class.
- *
- * <p>
- * Specifies a {@link org.apache.juneau.commons.function.BeanFactory} class to use for instantiating
- * this class instead of relying on a no-arg constructor or static {@code getInstance()} method.
- *
- * <p>
- * When a factory class is specified, the framework resolves it in the following order:
- * <ol>
- * <li>Look up the factory class in the configured {@link org.apache.juneau.commons.inject.BeanStore}
- * (e.g. a Spring {@code ApplicationContext} wrapped in a {@code SpringBeanStore})
- * <li>Attempt direct instantiation via no-arg constructor or {@code getInstance()} static method
- * <li>Throw {@link IllegalArgumentException} if both fail
- * </ol>
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <ja>@Bean</ja>(factory=ItemChannelFactory.<jk>class</jk>)
- * <jk>public class</jk> ItemChannel <jk>implements</jk> BeanChannel<Item> { ... }
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jc'>{@link org.apache.juneau.commons.function.BeanFactory}
- * <li class='ja'>{@link Beanp#factory()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
- * </ul>
- *
- * @return The annotation value.
- */
- @SuppressWarnings({
- "rawtypes" // Raw BeanFactory type required for annotation attribute declaration
- })
- Class<? extends org.apache.juneau.commons.function.BeanFactory> factory() default org.apache.juneau.commons.function.BeanFactory.Void.class;
-
- /**
- * Bean dictionary.
- *
- * <p>
- * The list of classes that make up the bean dictionary for all properties in this class and all subclasses.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Beanp#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary_replace()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
- * </ul>
- *
- * @return The annotation value.
- */
- Class<?>[] dictionary() default {};
-
- /**
- * POJO example.
- *
- * <p>
- * Specifies an example of the specified class in Simplified JSON format.
- *
- * <p>
- * Examples are used in cases such as POJO examples in Swagger documents.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <ja>@Bean</ja>(example=<js>"{foo:'bar'}"</js>)
- * <jk>public class</jk> MyClass {...}
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>
- * Setting applies to specified class and all subclasses.
- * <li class='note'>
- * Keys are the class of the example.
- * <br>Values are JSON 5 representation of that class.
- * <li class='note'>
- * POJO examples can also be defined on classes via the following:
- * <ul class='spaced-list'>
- * <li>A static field annotated with {@link Example @Example}.
- * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link BeanSession} argument.
- * <li>A static method with name <c>example</c> with no arguments or one {@link BeanSession} argument.
- * </ul>
- * <li class='note'>
- * Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link Example}
- * </ul>
- *
- * @return The annotation value.
- */
- String example() default "";
-
- /**
- * Bean property excludes.
- *
- * <p>
- * Specifies a list of properties that should be excluded from {@link BeanMap#entrySet()}.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Exclude the 'city' and 'state' properties from the Address class.</jc>
- * <ja>@Bean</ja>(excludeProperties=<js>"city,state"</js>})
- * <jk>public class</jk> Address {...}
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>
- * {@link #xp()} is a shortened synonym for this value.
- * <li class='note'>
- * <b>Java Records:</b> Excluding record components is not supported during parsing.
- * Because records are immutable, all components must be provided to the canonical constructor.
- * Excluded components will be omitted from serialization output, but the parser will be unable to
- * instantiate the record if the excluded component values are missing from the input.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(Class, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(String, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(Map)}
- * </ul>
- *
- * @return The annotation value.
- */
- String excludeProperties() default "";
-
- /**
- * Find fluent setters.
- *
- * <p>
- * When <jk>true</jk>, fluent setters will be detected on beans.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <ja>@Bean</ja>(findFluentSetters=<jk>true</jk>)
- * <jk>public class</jk> MyBean {
- * <jk>public int</jk> getId() {...}
- * <jk>public</jk> MyBean id(<jk>int</jk> <jv>id</jv>) {...}
- * }
- * </p>
- *
- * <p>
- * Fluent setters must have the following attributes:
- * <ul>
- * <li>Public.
- * <li>Not static.
- * <li>Take in one parameter.
- * <li>Return the bean itself.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#findFluentSetters()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#findFluentSetters()}
- * </ul>
- *
- * @return The annotation value.
- */
- boolean findFluentSetters() default false;
-
- /**
- * Implementation class.
- *
- * <p>
- * For interfaces and abstract classes this method can be used to specify an implementation class for the
- * interface/abstract class so that instances of the implementation class are used when instantiated (e.g. during a
- * parse).
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <ja>@Bean</ja>(implClass=MyInterfaceImpl.<jk>class</jk>)
- * <jk>public class</jk> MyInterface {...}
- * <p>
- *
- * @return The annotation value.
- */
- Class<?> implClass() default void.class;
-
- /**
- * Bean property interceptor.
- *
- * <p>
- * Bean interceptors can be used to intercept calls to getters and setters and alter their values in transit.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jc'>{@link BeanInterceptor}
- * </ul>
- *
- * @return The annotation value.
- */
- Class<? extends BeanInterceptor<?>> interceptor() default BeanInterceptor.Void.class;
-
- /**
- * Identifies a class to be used as the interface class for this and all subclasses.
- *
- * <p>
- * When specified, only the list of properties defined on the interface class will be used during serialization.
- * Additional properties on subclasses will be ignored.
- *
- * <p class='bjava'>
- * <jc>// Parent class</jc>
- * <ja>@Bean</ja>(interfaceClass=A.<jk>class</jk>)
- * <jk>public abstract class</jk> A {
- * <jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
- * }
- *
- * <jc>// Sub class</jc>
- * <jk>public class</jk> A1 <jk>extends</jk> A {
- * <jk>public</jk> String <jf>f1</jf> = <js>"f1"</js>;
- * }
- *
- * <jc>// Produces "{f0:'f0'}"</jc>
- * String <jv>json</jv> = Json5Serializer.<jsf>DEFAULT</jsf>.serialize(<jk>new</jk> A1());
- * </p>
- *
- * <p>
- * Note that this annotation can be used on the parent class so that it filters to all child classes,
- * or can be set individually on the child classes.
- *
- * @return The annotation value.
- */
- Class<?> interfaceClass() default void.class;
-
- /**
- * Synonym for {@link #properties()}.
- *
- * @return The annotation value.
- */
- String p() default "";
-
- /**
- * Bean property includes.
- *
- * <p>
- * The set and order of names of properties associated with a bean class.
- *
- * <p>
- * The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and
- * related methods.
- *
- * <p>
- * This value is entirely optional if you simply want to expose all the getters and public fields on
- * a class as bean properties.
- * <br>However, it's useful if you want certain getters to be ignored or you want the properties to be
- * serialized in a particular order.
- * <br>Note that on IBM JREs, the property order is the same as the order in the source code,
- * whereas on Oracle JREs, the order is entirely random.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Address class with only street/city/state properties (in that order).</jc>
- * <ja>@Bean</ja>(properties=<js>"street,city,state"</js>)
- * <jk>public class</jk> Address {...}
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>
- * {@link #p()} is a shortened synonym for this value.
- * <li class='note'>
- * <b>Java Records:</b> When used on records to control property order, all record components should
- * be included. Omitting record components from this list will prevent them from being parsed, and
- * because records are immutable, all components must be provided to the canonical constructor.
- * Use {@link Beanc @Beanc} to specify a non-canonical constructor if you need to omit components.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(Class, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(String, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(Map)}
- * </ul>
- *
- * @return The annotation value.
- */
- String properties() default "";
-
- /**
- * Associates a {@link PropertyNamer} with this bean to tailor the names of the bean properties.
- *
- * <p>
- * Property namers are used to transform bean property names from standard form to some other form.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Define a class with dashed-lowercase property names.</jc>
- * <ja>@Bean</ja>(propertyNamer=PropertyNamerDashedLC.<jk>class</jk>)
- * <jk>public class</jk> MyBean {...}
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#propertyNamer(Class)}
- * </ul>
- *
- * @return The annotation value.
- */
- Class<? extends PropertyNamer> propertyNamer() default PropertyNamer.Void.class;
-
- /**
- * Read-only bean properties.
- *
- * <p>
- * Specifies one or more properties on a bean that are read-only despite having valid getters.
- * Serializers will serialize such properties as usual, but parsers will silently ignore them.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Exclude the 'city' and 'state' properties from being parsed, but not serialized.</jc>
- * <ja>@Bean</ja>(readOnlyProperties=<js>"city,state"</js>})
- * <jk>public class</jk> Address {...}
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>
- * {@link #ro()} is a shortened synonym for this value.
- * <li class='note'>
- * <b>Java Records:</b> Marking record components as read-only is not supported during parsing.
- * Because records are immutable, all components must be provided to the canonical constructor.
- * Read-only components will be serialized as usual, but the parser will be unable to instantiate the
- * record if the read-only component values are missing from the input.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(Class, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(String, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(Map)}
- * </ul>
- *
- * @return The annotation value.
- */
- String readOnlyProperties() default "";
-
- /**
- * Synonym for {@link #readOnlyProperties()}.
- *
- * @return The annotation value.
- */
- String ro() default "";
-
- /**
- * Opt out of alphabetical sorting for this specific bean's properties.
- *
- * <p>
- * By default, bean properties are serialized in alphabetical order.
- * When <jk>true</jk>, properties of this bean will use the natural JVM-dependent order instead.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Disable sorted properties for this specific bean.</jc>
- * <ja>@Bean</ja>(unsorted=<jk>true</jk>)
- * <jk>public class</jk> MyBean {...}
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#unsortedProperties()}
- * </ul>
- *
- * @return The annotation value.
- */
- boolean unsorted() default false;
-
- /**
- * Identifies a stop class for the annotated class.
- *
- * <p>
- * Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
- * Any properties in the stop class or in its base classes will be ignored during analysis.
- *
- * <p>
- * For example, in the following class hierarchy, instances of <c>C3</c> will include property <c>p3</c>,
- * but not <c>p1</c> or <c>p2</c>.
- * <p class='bjava'>
- * <jk>public class</jk> C1 {
- * <jk>public int</jk> getP1();
- * }
- *
- * <jk>public class</jk> C2 <jk>extends</jk> C1 {
- * <jk>public int</jk> getP2();
- * }
- *
- * <ja>@Bean</ja>(stopClass=C2.<jk>class</jk>)
- * <jk>public class</jk> C3 <jk>extends</jk> C2 {
- * <jk>public int</jk> getP3();
- * }
- * </p>
- *
- * @return The annotation value.
- */
- Class<?> stopClass() default void.class;
-
- /**
- * An identifying name for this class.
- *
- * <p>
- * The name is used to identify the class type during parsing when it cannot be inferred through reflection.
- * <br>For example, if a bean property is of type <c>Object</c>, then the serializer will add the name to the
- * output so that the class can be determined during parsing.
- *
- * <p>
- * It is also used to specify element names in XML.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Use _type='mybean' to identify this bean.</jc>
- * <ja>@Bean</ja>(typeName=<js>"mybean"</js>)
- * <jk>public class</jk> MyBean {...}
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
- * </ul>
- *
- * @return The annotation value.
- */
- String typeName() default "";
-
- /**
- * The property name to use for representing the type name.
- *
- * <p>
- * This can be used to override the name used for the <js>"_type"</js> property used by the {@link #typeName()} setting.
- *
- * <p>
- * The default value if not specified is <js>"_type"</js> .
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Use 'type' instead of '_type' for bean names.</jc>
- * <ja>@Bean</ja>(typePropertyName=<js>"type"</js>)
- * <jk>public class</jk> MyBean {...}
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#typePropertyName()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)}
- * </ul>
- *
- * @return The annotation value.
- */
- String typePropertyName() default "";
-
- /**
- * Synonym for {@link #writeOnlyProperties()}.
- *
- * @return The annotation value.
- */
- String wo() default "";
-
- /**
- * Write-only bean properties.
- *
- * <p>
- * Specifies one or more properties on a bean that are write-only despite having valid setters.
- * Parsers will parse such properties as usual, but serializers will silently ignore them.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <jc>// Exclude the 'city' and 'state' properties from being serialized, but not parsed.</jc>
- * <ja>@Bean</ja>(writeOnlyProperties=<js>"city,state"</js>})
- * <jk>public class</jk> Address {...}
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>
- * {@link #wo()} is a shortened synonym for this value.
- * </ul>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(Class, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(String, String)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(Map)}
- * </ul>
- *
- * @return The annotation value.
- */
- String writeOnlyProperties() default "";
-
- /**
- * Synonym for {@link #excludeProperties()}.
- *
- * @return The annotation value.
- */
- String xp() default "";
-}
\ No newline at end of file
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
deleted file mode 100644
index 81f1bf35c8..0000000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanAnnotation.java
+++ /dev/null
@@ -1,492 +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.commons.utils.CollectionUtils.*;
-
-import java.lang.annotation.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.commons.annotation.*;
-import org.apache.juneau.commons.function.*;
-import org.apache.juneau.swap.*;
-
-/**
- * Utility classes and methods for the {@link Bean @Bean} annotation.
- *
- */
-public class BeanAnnotation {
-
- /**
- * Prevents instantiation.
- */
- private BeanAnnotation() {}
-
- /**
- * Builder class.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
- * </ul>
- */
- public static class Builder extends AnnotationObject.Builder {
-
- private String[] description = {};
- private Class<?>[] dictionary = new Class[0];
- private Class<?> implClass = void.class;
- private Class<?> interfaceClass = void.class;
- private Class<?> stopClass = void.class;
- private Class<? extends BeanInterceptor<?>> interceptor = BeanInterceptor.Void.class;
- private Class<? extends PropertyNamer> propertyNamer = BasicPropertyNamer.class;
- @SuppressWarnings("rawtypes")
- private Class<? extends BeanFactory> factory = BeanFactory.Void.class;
- private String example = "";
- private String excludeProperties = "";
- private String p = "";
- private String properties = "";
- private String readOnlyProperties = "";
- private String ro = "";
- private String typeName = "";
- private String typePropertyName = "";
- private String wo = "";
- private String writeOnlyProperties = "";
- private String xp = "";
- private boolean findFluentSetters;
- private boolean unsorted;
-
- /**
- * Constructor.
- */
- protected 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 Object(this);
- }
-
- /**
- * Sets the description property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder description(String...value) {
- description = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#dictionary()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder dictionary(Class<?>...value) {
- dictionary = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#factory()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- @SuppressWarnings("rawtypes")
- public Builder factory(Class<? extends BeanFactory> value) {
- factory = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#example()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder example(String value) {
- example = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#excludeProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder excludeProperties(String value) {
- excludeProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#findFluentSetters()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder findFluentSetters(boolean value) {
- findFluentSetters = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#implClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder implClass(Class<?> value) {
- implClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#interceptor()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder interceptor(Class<? extends BeanInterceptor<?>> value) {
- interceptor = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#interfaceClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder interfaceClass(Class<?> value) {
- interfaceClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#p()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder p(String value) {
- p = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#properties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder properties(String value) {
- properties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#propertyNamer()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder propertyNamer(Class<? extends PropertyNamer> value) {
- propertyNamer = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#readOnlyProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder readOnlyProperties(String value) {
- readOnlyProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#ro()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder ro(String value) {
- ro = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#unsorted()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder unsorted(boolean value) {
- unsorted = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#stopClass()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder stopClass(Class<?> value) {
- stopClass = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#typeName()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder typeName(String value) {
- typeName = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#typePropertyName()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder typePropertyName(String value) {
- typePropertyName = value;
- return this;
- }
-
- /**
- * Sets the{@link Bean#wo()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder wo(String value) {
- wo = value;
- return this;
- }
-
- /**
- * Sets the{@link Bean#writeOnlyProperties()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder writeOnlyProperties(String value) {
- writeOnlyProperties = value;
- return this;
- }
-
- /**
- * Sets the {@link Bean#xp()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder xp(String value) {
- xp = value;
- return this;
- }
-
- }
-
- @SuppressWarnings({
- "java:S2160" // equals() inherited from AnnotationObject compares all annotation interface methods; subclass fields are accessed via those methods
- })
- private static class Object extends AnnotationObject implements Bean {
-
- private final String[] description;
- private final boolean findFluentSetters;
- private final boolean unsorted;
- private final Class<? extends BeanInterceptor<?>> interceptor;
- private final Class<? extends PropertyNamer> propertyNamer;
- private final Class<?> implClass;
- private final Class<?> interfaceClass;
- private final Class<?> stopClass;
- private final Class<?>[] dictionary;
- @SuppressWarnings("rawtypes")
- private final Class<? extends BeanFactory> factory;
- private final String example;
- private final String excludeProperties;
- private final String p;
- private final String properties;
- private final String readOnlyProperties;
- private final String ro;
- private final String typeName;
- private final String typePropertyName;
- private final String wo;
- private final String writeOnlyProperties;
- private final String xp;
-
- Object(BeanAnnotation.Builder b) {
- super(b);
- description = copyOf(b.description);
- dictionary = copyOf(b.dictionary);
- example = b.example;
- excludeProperties = b.excludeProperties;
- factory = b.factory;
- findFluentSetters = b.findFluentSetters;
- implClass = b.implClass;
- interceptor = b.interceptor;
- interfaceClass = b.interfaceClass;
- p = b.p;
- properties = b.properties;
- propertyNamer = b.propertyNamer;
- readOnlyProperties = b.readOnlyProperties;
- ro = b.ro;
- unsorted = b.unsorted;
- stopClass = b.stopClass;
- typeName = b.typeName;
- typePropertyName = b.typePropertyName;
- wo = b.wo;
- writeOnlyProperties = b.writeOnlyProperties;
- xp = b.xp;
- }
-
- @Override /* Overridden from Bean */
- public Class<?>[] dictionary() {
- return dictionary;
- }
-
- @Override /* Overridden from Bean */
- @SuppressWarnings("rawtypes")
- public Class<? extends BeanFactory> factory() {
- return factory;
- }
-
- @Override /* Overridden from Bean */
- public String example() {
- return example;
- }
-
- @Override /* Overridden from Bean */
- public String excludeProperties() {
- return excludeProperties;
- }
-
- @Override /* Overridden from Bean */
- public boolean findFluentSetters() {
- return findFluentSetters;
- }
-
- @Override /* Overridden from Bean */
- public Class<?> implClass() {
- return implClass;
- }
-
- @Override /* Overridden from Bean */
- public Class<? extends BeanInterceptor<?>> interceptor() {
- return interceptor;
- }
-
- @Override /* Overridden from Bean */
- public Class<?> interfaceClass() {
- return interfaceClass;
- }
-
- @Override /* Overridden from Bean */
- public String p() {
- return p;
- }
-
- @Override /* Overridden from Bean */
- public String properties() {
- return properties;
- }
-
- @Override /* Overridden from Bean */
- public Class<? extends PropertyNamer> propertyNamer() {
- return propertyNamer;
- }
-
- @Override /* Overridden from Bean */
- public String readOnlyProperties() {
- return readOnlyProperties;
- }
-
- @Override /* Overridden from Bean */
- public String ro() {
- return ro;
- }
-
- @Override /* Overridden from Bean */
- public boolean unsorted() {
- return unsorted;
- }
-
- @Override /* Overridden from Bean */
- public Class<?> stopClass() {
- return stopClass;
- }
-
- @Override /* Overridden from Bean */
- public String typeName() {
- return typeName;
- }
-
- @Override /* Overridden from Bean */
- public String typePropertyName() {
- return typePropertyName;
- }
-
- @Override /* Overridden from Bean */
- public String wo() {
- return wo;
- }
-
- @Override /* Overridden from Bean */
- public String writeOnlyProperties() {
- return writeOnlyProperties;
- }
-
- @Override /* Overridden from Bean */
- public String xp() {
- return xp;
- }
-
- @Override /* Overridden from Bean */
- public String[] description() {
- return description;
- }
- }
-
- /** 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();
- }
-}
\ No newline at end of file
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 ed1ed1c998..0000000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApply.java
+++ /dev/null
@@ -1,99 +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.*;
-
-/**
- * Dynamically applies a {@link Bean @Bean} annotation to specified classes, methods, or fields.
- *
- * <p>
- * This annotation separates the <b>targeting</b> concern ({@link #on()}/{@link #onClass()}) from the
- * <b>content</b> concern ({@link #value()}), enabling {@link Bean @Bean} to be a pure data annotation
- * without marshall-specific application machinery.
- *
- * <h5 class='section'>Example:</h5>
- * <p class='bjava'>
- * <ja>@BeanApply</ja>(on=<js>"com.example.Foo"</js>, value=<ja>@Bean</ja>(unsorted=<jk>true</jk>))
- * <jk>public class</jk> MyConfig {}
- * </p>
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically Applied Annotations</a>
- * </ul>
- */
-@Documented
-@Target({ TYPE, METHOD })
-@Retention(RUNTIME)
-@Repeatable(BeanApply.Array.class)
-@ContextApply(BeanApplyAnnotation.Applier.class)
-public @interface BeanApply {
-
- /**
- * The {@link Bean @Bean} annotation to apply.
- *
- * @return The annotation value.
- */
- Bean value();
-
- /**
- * Dynamically apply this annotation to the specified classes/methods/fields.
- *
- * <p>
- * Identifies the targets this annotation applies to using fully-qualified names.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- String[] on() default {};
-
- /**
- * Dynamically apply this annotation to the specified classes.
- *
- * <p>
- * Identical to {@link #on()} except allows you to specify class objects instead of strings.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/DynamicallyAppliedAnnotations">Dynamically Applied Annotations</a>
- * </ul>
- *
- * @return The annotation value.
- */
- Class<?>[] onClass() default {};
-
- /**
- * A collection of {@link BeanApply @BeanApply annotations}.
- */
- @Documented
- @Target({ TYPE, METHOD })
- @Retention(RUNTIME)
- public @interface Array {
-
- /**
- * The child annotations.
- *
- * @return The annotation value.
- */
- BeanApply[] value();
- }
-}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApplyAnnotation.java
deleted file mode 100644
index b309d85ef0..0000000000
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApplyAnnotation.java
+++ /dev/null
@@ -1,231 +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.commons.utils.CollectionUtils.*;
-
-import java.lang.annotation.*;
-import java.lang.reflect.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.commons.annotation.*;
-import org.apache.juneau.commons.reflect.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Utility classes and methods for the {@link BeanApply @BeanApply} annotation.
- *
- */
-public class BeanApplyAnnotation {
-
- /**
- * Prevents instantiation.
- */
- private BeanApplyAnnotation() {}
-
- /**
- * Applies targeted {@link BeanApply} annotations to a {@link org.apache.juneau.Context.Builder}.
- *
- * <p>
- * Passes the {@link BeanApply @BeanApply} annotation through to the builder's annotation list.
- * The {@link org.apache.juneau.commons.reflect.AnnotationProvider.Builder#addRuntimeAnnotations(java.util.List)}
- * method handles unwrapping the nested {@link Bean @Bean} from {@link BeanApply#value()} and registering it
- * under the targets specified by {@link BeanApply#on()} and {@link BeanApply#onClass()}.
- */
- public static class Applier extends AnnotationApplier<BeanApply,Context.Builder> {
-
- /**
- * Constructor.
- *
- * @param vr The resolver for resolving values in annotations.
- */
- public Applier(VarResolverSession vr) {
- super(BeanApply.class, Context.Builder.class, vr);
- }
-
- @Override
- public void apply(AnnotationInfo<BeanApply> ai, Context.Builder b) {
- BeanApply a = ai.inner();
- if (isEmptyArray(a.on()) && isEmptyArray(a.onClass()))
- return;
- b.annotations(a);
- }
- }
-
- /**
- * Builder class.
- *
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
- * </ul>
- */
- public static class Builder extends AppliedAnnotationObject.BuilderTMF {
-
- Bean value = BeanAnnotation.DEFAULT;
-
- /**
- * Constructor.
- */
- protected Builder() {
- super(BeanApply.class);
- }
-
- /**
- * Sets the {@link BeanApply#value()} property on this annotation.
- *
- * @param value The new value for this property.
- * @return This object.
- */
- public Builder value(Bean value) {
- this.value = value;
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.Builder */
- public Builder on(String...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder on(Class<?>...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedOnClassAnnotationObject.Builder */
- public Builder onClass(Class<?>...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderM */
- public Builder on(Method...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderMF */
- public Builder on(Field...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder on(ClassInfo...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderT */
- public Builder onClass(ClassInfo...value) {
- super.onClass(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderTMF */
- public Builder on(FieldInfo...value) {
- super.on(value);
- return this;
- }
-
- @Override /* Overridden from AppliedAnnotationObject.BuilderTMF */
- public Builder on(MethodInfo...value) {
- super.on(value);
- return this;
- }
-
- /**
- * Instantiates a new {@link BeanApply @BeanApply} object initialized with this builder.
- *
- * @return A new {@link BeanApply} object.
- */
- public BeanApply build() {
- return new Object(this);
- }
- }
-
- @SuppressWarnings({
- "java:S2160" // equals() inherited from AnnotationObject compares all annotation interface methods; subclass fields are accessed via those methods
- })
- private static class Object extends AppliedOnClassAnnotationObject implements BeanApply {
-
- private final Bean value;
-
- Object(BeanApplyAnnotation.Builder b) {
- super(b);
- value = b.value;
- }
-
- @Override /* Overridden from BeanApply */
- public Bean value() {
- return value;
- }
-
- @Override /* Overridden from BeanApply */
- public String[] on() {
- return super.on();
- }
-
- @Override /* Overridden from BeanApply */
- public Class<?>[] onClass() {
- return super.onClass();
- }
- }
-
- /** Default value */
- public static final BeanApply 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);
- }
-
- /**
- * Returns <jk>true</jk> if the specified annotation contains all default values.
- *
- * @param a The annotation to check.
- * @return <jk>true</jk> if the specified annotation contains all default values.
- */
- public static boolean empty(BeanApply a) {
- return a == null || DEFAULT.equals(a);
- }
-}
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 fb82505df1..d0b21690be 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
@@ -211,7 +211,7 @@ public @interface BeanConfig {
* <li class='note'>
* Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
* <li class='note'>
- * The {@link Bean @Bean} annotation can be used on a class to override this setting when <js>"true"</js>.
+ * The {@link Bean @Marshalled} annotation can be used on a class to override this setting when <js>"true"</js>.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -238,7 +238,7 @@ public @interface BeanConfig {
* <li class='note'>
* Supports <a class="doclink" href="https://juneau.apache.org/docs/topics/DefaultVarResolver">VarResolver.DEFAULT</a> (e.g. <js>"$C{myConfigVar}"</js>).
* <li class='note'>
- * The {@link Bean @Bean} annotation can be used on a class to override this setting when <js>"true"</js>.
+ * The {@link Bean @Marshalled} annotation can be used on a class to override this setting when <js>"true"</js>.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -322,7 +322,7 @@ public @interface BeanConfig {
* <p>
* A dictionary is a name/class mapping used to find class types during parsing when they cannot be inferred
* through reflection.
- * <br>The names are defined through the {@link Bean#typeName() @Bean(typeName)} annotation defined on the bean class.
+ * <br>The names are defined through the {@link Bean#typeName() @Marshalled(typeName)} annotation defined on the bean class.
* <br>For example, if a class <c>Foo</c> has a type-name of <js>"myfoo"</js>, then it would end up serialized
* as <js>"{_type:'myfoo',...}"</js>.
*
@@ -647,7 +647,7 @@ public @interface BeanConfig {
* individually on the child classes.
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Bean#interfaceClass() @Bean(interfaceClass)} annotation is the equivalent annotation-based solution.
+ * <li class='note'>The {@link Bean#interfaceClass() @Marshalled(interfaceClass)} annotation is the equivalent annotation-based solution.
* </ul>
*
* @return The annotation value.
@@ -951,7 +951,7 @@ public @interface BeanConfig {
*
* <p>
* Using the built-in Java bean introspector will not pick up fields or non-standard getters/setters.
- * <br>Most {@link Bean @Bean} annotations will be ignored.
+ * <br>Most {@link Bean @Marshalled} annotations will be ignored.
*
* <ul class='values'>
* <li><js>"true"</js>
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
index f5093d2365..0223cdb48e 100644
--- 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
@@ -88,7 +88,7 @@ public class BeanConfigAnnotation {
classes(a.notBeanClasses()).ifPresent(b::notBeanClasses);
classes(a.notBeanClasses_replace()).ifPresent(x -> { b.notBeanClasses().clear(); b.notBeanClasses(x);});
type(a.propertyNamer()).ifPresent(b::propertyNamer);
- l(a.interfaces()).stream().map(x -> BeanApplyAnnotation.create(x).value(BeanAnnotation.create().interfaceClass(x).build()).build()).forEach(b::annotations);
+ l(a.interfaces()).stream().map(x -> MarshalledApplyAnnotation.create(x).value(MarshalledAnnotation.create().interfaceClass(x).build()).build()).forEach(b::annotations);
strings(a.notBeanPackages()).ifPresent(b::notBeanPackages);
strings(a.notBeanPackages_replace()).ifPresent(x -> {b.notBeanPackages().clear(); b.notBeanPackages(x);});
// @formatter:on
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 c1da46ae5a..f65f311015 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
@@ -47,7 +47,7 @@ import org.apache.juneau.*;
* For Java records, the canonical constructor and its property mappings are automatically detected, so this
* annotation is not required. It can still be used to specify a non-canonical constructor if needed, for example
* to provide default values for certain components. When using a non-canonical constructor on a record, use
- * {@link Bean#properties() @Bean(properties)} to limit the visible properties to match the constructor parameters.
+ * {@link Bean#properties() @Marshalled(properties)} to limit the visible properties to match the constructor parameters.
*
* <p>
* When present, bean instantiation is delayed until the call to {@link BeanMap#getBean()}.
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 50675302d2..52908cc792 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
@@ -63,7 +63,7 @@ public @interface Beanp {
* The list of classes that make up the bean dictionary this bean property.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.Bean#dictionary()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
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 54b94074ed..0e06826605 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
@@ -19,9 +19,12 @@ package org.apache.juneau.annotation;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
+import java.beans.*;
import java.lang.annotation.*;
+import java.util.*;
import org.apache.juneau.*;
+import org.apache.juneau.swap.*;
/**
* Annotation that can be applied to classes to control how they are marshalled.
@@ -29,19 +32,22 @@ import org.apache.juneau.*;
* <p>
* Can be used in the following locations:
* <ul>
- * <li>Marshalled classes.
+ * <li>Bean classes and parent interfaces.
+ * <li>Non-bean marshalled classes.
* <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link MarshalledApply @MarshalledApply}.
* </ul>
*
- * <p>
- * This annotation is typically only applied to non-bean classes. The {@link Bean @Bean} annotation contains equivalent
- * functionality for bean classes.
- *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshalledAnnotation">@Marshalled Annotation</a>
+ * </ul>
*/
@Documented
@Target({ TYPE })
@Retention(RUNTIME)
@Inherited
+@SuppressWarnings({
+ "java:S1452" // Wildcard required - Class<? extends BeanInterceptor<?>> for interceptor definition
+})
public @interface Marshalled {
/**
@@ -52,6 +58,23 @@ public @interface Marshalled {
*/
String[] description() default {};
+ /**
+ * Bean dictionary.
+ *
+ * <p>
+ * The list of classes that make up the bean dictionary for all properties in this class and all subclasses.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link Beanp#dictionary()}
+ * <li class='ja'>{@link BeanConfig#dictionary()}
+ * <li class='ja'>{@link BeanConfig#dictionary_replace()}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ Class<?>[] dictionary() default {};
+
/**
* POJO example.
*
@@ -92,6 +115,92 @@ public @interface Marshalled {
*/
String example() default "";
+ /**
+ * Bean property excludes.
+ *
+ * <p>
+ * Specifies a list of properties that should be excluded from {@link BeanMap#entrySet()}.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Exclude the 'city' and 'state' properties from the Address class.</jc>
+ * <ja>@Marshalled</ja>(excludeProperties=<js>"city,state"</js>})
+ * <jk>public class</jk> Address {...}
+ * </p>
+ *
+ * <h5 class='section'>Notes:</h5><ul>
+ * <li class='note'>
+ * {@link #xp()} is a shortened synonym for this value.
+ * <li class='note'>
+ * <b>Java Records:</b> Excluding record components is not supported during parsing.
+ * Because records are immutable, all components must be provided to the canonical constructor.
+ * Excluded components will be omitted from serialization output, but the parser will be unable to
+ * instantiate the record if the excluded component values are missing from the input.
+ * </ul>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesExcludes(Map)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String excludeProperties() default "";
+
+ /**
+ * Bean factory class.
+ *
+ * <p>
+ * Specifies a {@link org.apache.juneau.commons.function.BeanFactory} class to use for instantiating
+ * this class instead of relying on a no-arg constructor or static {@code getInstance()} method.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jc'>{@link org.apache.juneau.commons.function.BeanFactory}
+ * <li class='ja'>{@link Beanp#factory()}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ @SuppressWarnings({
+ "rawtypes" // Raw BeanFactory type required for annotation attribute declaration
+ })
+ Class<? extends org.apache.juneau.commons.function.BeanFactory> factory() default org.apache.juneau.commons.function.BeanFactory.Void.class;
+
+ /**
+ * Find fluent setters.
+ *
+ * <p>
+ * When <jk>true</jk>, fluent setters will be detected on beans.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <ja>@Marshalled</ja>(findFluentSetters=<jk>true</jk>)
+ * <jk>public class</jk> MyBean {
+ * <jk>public int</jk> getId() {...}
+ * <jk>public</jk> MyBean id(<jk>int</jk> <jv>id</jv>) {...}
+ * }
+ * </p>
+ *
+ * <p>
+ * Fluent setters must have the following attributes:
+ * <ul>
+ * <li>Public.
+ * <li>Not static.
+ * <li>Take in one parameter.
+ * <li>Return the bean itself.
+ * </ul>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link BeanConfig#findFluentSetters()}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#findFluentSetters()}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ boolean findFluentSetters() default false;
+
/**
* Implementation class.
*
@@ -110,4 +219,289 @@ public @interface Marshalled {
*/
Class<?> implClass() default void.class;
-}
\ No newline at end of file
+ /**
+ * Bean property interceptor.
+ *
+ * <p>
+ * Bean interceptors can be used to intercept calls to getters and setters and alter their values in transit.
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jc'>{@link BeanInterceptor}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ Class<? extends BeanInterceptor<?>> interceptor() default BeanInterceptor.Void.class;
+
+ /**
+ * Identifies a class to be used as the interface class for this and all subclasses.
+ *
+ * <p>
+ * When specified, only the list of properties defined on the interface class will be used during serialization.
+ * Additional properties on subclasses will be ignored.
+ *
+ * <p class='bjava'>
+ * <jc>// Parent class</jc>
+ * <ja>@Marshalled</ja>(interfaceClass=A.<jk>class</jk>)
+ * <jk>public abstract class</jk> A {
+ * <jk>public</jk> String <jf>f0</jf> = <js>"f0"</js>;
+ * }
+ *
+ * <jc>// Sub class</jc>
+ * <jk>public class</jk> A1 <jk>extends</jk> A {
+ * <jk>public</jk> String <jf>f1</jf> = <js>"f1"</js>;
+ * }
+ *
+ * <jc>// Produces "{f0:'f0'}"</jc>
+ * String <jv>json</jv> = Json5Serializer.<jsf>DEFAULT</jsf>.serialize(<jk>new</jk> A1());
+ * </p>
+ *
+ * <p>
+ * Note that this annotation can be used on the parent class so that it filters to all child classes,
+ * or can be set individually on the child classes.
+ *
+ * @return The annotation value.
+ */
+ Class<?> interfaceClass() default void.class;
+
+ /**
+ * Synonym for {@link #properties()}.
+ *
+ * @return The annotation value.
+ */
+ String p() default "";
+
+ /**
+ * Bean property includes.
+ *
+ * <p>
+ * The set and order of names of properties associated with a bean class.
+ *
+ * <p>
+ * The order specified is the same order that the entries will be returned by the {@link BeanMap#entrySet()} and
+ * related methods.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Address class with only street/city/state properties (in that order).</jc>
+ * <ja>@Marshalled</ja>(properties=<js>"street,city,state"</js>)
+ * <jk>public class</jk> Address {...}
+ * </p>
+ *
+ * <h5 class='section'>Notes:</h5><ul>
+ * <li class='note'>
+ * {@link #p()} is a shortened synonym for this value.
+ * </ul>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanProperties(Map)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String properties() default "";
+
+ /**
+ * Associates a {@link PropertyNamer} with this bean to tailor the names of the bean properties.
+ *
+ * <p>
+ * Property namers are used to transform bean property names from standard form to some other form.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Define a class with dashed-lowercase property names.</jc>
+ * <ja>@Marshalled</ja>(propertyNamer=PropertyNamerDashedLC.<jk>class</jk>)
+ * <jk>public class</jk> MyBean {...}
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#propertyNamer(Class)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ Class<? extends PropertyNamer> propertyNamer() default PropertyNamer.Void.class;
+
+ /**
+ * Read-only bean properties.
+ *
+ * <p>
+ * Specifies one or more properties on a bean that are read-only despite having valid getters.
+ * Serializers will serialize such properties as usual, but parsers will silently ignore them.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Exclude the 'city' and 'state' properties from being parsed, but not serialized.</jc>
+ * <ja>@Marshalled</ja>(readOnlyProperties=<js>"city,state"</js>})
+ * <jk>public class</jk> Address {...}
+ * </p>
+ *
+ * <h5 class='section'>Notes:</h5><ul>
+ * <li class='note'>
+ * {@link #ro()} is a shortened synonym for this value.
+ * </ul>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesReadOnly(Map)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String readOnlyProperties() default "";
+
+ /**
+ * Synonym for {@link #readOnlyProperties()}.
+ *
+ * @return The annotation value.
+ */
+ String ro() default "";
+
+ /**
+ * Identifies a stop class for the annotated class.
+ *
+ * <p>
+ * Identical in purpose to the stop class specified by {@link Introspector#getBeanInfo(Class, Class)}.
+ * Any properties in the stop class or in its base classes will be ignored during analysis.
+ *
+ * <p>
+ * For example, in the following class hierarchy, instances of <c>C3</c> will include property <c>p3</c>,
+ * but not <c>p1</c> or <c>p2</c>.
+ * <p class='bjava'>
+ * <jk>public class</jk> C1 {
+ * <jk>public int</jk> getP1();
+ * }
+ *
+ * <jk>public class</jk> C2 <jk>extends</jk> C1 {
+ * <jk>public int</jk> getP2();
+ * }
+ *
+ * <ja>@Marshalled</ja>(stopClass=C2.<jk>class</jk>)
+ * <jk>public class</jk> C3 <jk>extends</jk> C2 {
+ * <jk>public int</jk> getP3();
+ * }
+ * </p>
+ *
+ * @return The annotation value.
+ */
+ Class<?> stopClass() default void.class;
+
+ /**
+ * An identifying name for this class.
+ *
+ * <p>
+ * The name is used to identify the class type during parsing when it cannot be inferred through reflection.
+ * <br>For example, if a bean property is of type <c>Object</c>, then the serializer will add the name to the
+ * output so that the class can be determined during parsing.
+ *
+ * <p>
+ * It is also used to specify element names in XML.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Use _type='mybean' to identify this bean.</jc>
+ * <ja>@Marshalled</ja>(typeName=<js>"mybean"</js>)
+ * <jk>public class</jk> MyBean {...}
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String typeName() default "";
+
+ /**
+ * The property name to use for representing the type name.
+ *
+ * <p>
+ * This can be used to override the name used for the <js>"_type"</js> property used by the {@link #typeName()} setting.
+ *
+ * <p>
+ * The default value if not specified is <js>"_type"</js>.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Use 'type' instead of '_type' for bean names.</jc>
+ * <ja>@Marshalled</ja>(typePropertyName=<js>"type"</js>)
+ * <jk>public class</jk> MyBean {...}
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='ja'>{@link BeanConfig#typePropertyName()}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String typePropertyName() default "";
+
+ /**
+ * Synonym for {@link #writeOnlyProperties()}.
+ *
+ * @return The annotation value.
+ */
+ String wo() default "";
+
+ /**
+ * Write-only bean properties.
+ *
+ * <p>
+ * Specifies one or more properties on a bean that are write-only despite having valid setters.
+ * Parsers will parse such properties as usual, but serializers will silently ignore them.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Exclude the 'city' and 'state' properties from being serialized, but not parsed.</jc>
+ * <ja>@Marshalled</ja>(writeOnlyProperties=<js>"city,state"</js>})
+ * <jk>public class</jk> Address {...}
+ * </p>
+ *
+ * <h5 class='section'>Notes:</h5><ul>
+ * <li class='note'>
+ * {@link #wo()} is a shortened synonym for this value.
+ * </ul>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanPropertiesWriteOnly(Map)}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ String writeOnlyProperties() default "";
+
+ /**
+ * Synonym for {@link #excludeProperties()}.
+ *
+ * @return The annotation value.
+ */
+ String xp() default "";
+
+ /**
+ * Opt out of alphabetical sorting for this specific bean's properties.
+ *
+ * <p>
+ * By default, bean properties are serialized in alphabetical order.
+ * When <jk>true</jk>, properties of this bean will use the natural JVM-dependent order instead.
+ *
+ * <h5 class='section'>Example:</h5>
+ * <p class='bjava'>
+ * <jc>// Disable sorted properties for this specific bean.</jc>
+ * <ja>@Marshalled</ja>(unsorted=<jk>true</jk>)
+ * <jk>public class</jk> MyBean {...}
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#unsortedProperties()}
+ * </ul>
+ *
+ * @return The annotation value.
+ */
+ boolean unsorted() default false;
+}
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
index 4acfe47db2..b3d4626857 100644
--- 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
@@ -20,7 +20,10 @@ import static org.apache.juneau.commons.utils.CollectionUtils.*;
import java.lang.annotation.*;
+import org.apache.juneau.*;
import org.apache.juneau.commons.annotation.*;
+import org.apache.juneau.commons.function.*;
+import org.apache.juneau.swap.*;
/**
* Utility classes and methods for the {@link Marshalled @Marshalled} annotation.
@@ -43,8 +46,27 @@ public class MarshalledAnnotation {
public static class Builder extends AnnotationObject.Builder {
private String[] description = {};
+ private Class<?>[] dictionary = new Class[0];
private Class<?> implClass = void.class;
+ private Class<?> interfaceClass = void.class;
+ private Class<?> stopClass = void.class;
+ private Class<? extends BeanInterceptor<?>> interceptor = BeanInterceptor.Void.class;
+ private Class<? extends PropertyNamer> propertyNamer = BasicPropertyNamer.class;
+ @SuppressWarnings("rawtypes")
+ private Class<? extends BeanFactory> factory = BeanFactory.Void.class;
private String example = "";
+ private String excludeProperties = "";
+ private String p = "";
+ private String properties = "";
+ private String readOnlyProperties = "";
+ private String ro = "";
+ private String typeName = "";
+ private String typePropertyName = "";
+ private String wo = "";
+ private String writeOnlyProperties = "";
+ private String xp = "";
+ private boolean findFluentSetters;
+ private boolean unsorted;
/**
* Constructor.
@@ -73,6 +95,29 @@ public class MarshalledAnnotation {
return this;
}
+ /**
+ * Sets the {@link Marshalled#dictionary()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder dictionary(Class<?>...value) {
+ dictionary = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#factory()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ @SuppressWarnings("rawtypes")
+ public Builder factory(Class<? extends BeanFactory> value) {
+ factory = value;
+ return this;
+ }
+
/**
* Sets the {@link Marshalled#example()} property on this annotation.
*
@@ -84,6 +129,28 @@ public class MarshalledAnnotation {
return this;
}
+ /**
+ * Sets the {@link Marshalled#excludeProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder excludeProperties(String value) {
+ excludeProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#findFluentSetters()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder findFluentSetters(boolean value) {
+ findFluentSetters = value;
+ return this;
+ }
+
/**
* Sets the {@link Marshalled#implClass()} property on this annotation.
*
@@ -95,6 +162,160 @@ public class MarshalledAnnotation {
return this;
}
+ /**
+ * Sets the {@link Marshalled#interceptor()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder interceptor(Class<? extends BeanInterceptor<?>> value) {
+ interceptor = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#interfaceClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder interfaceClass(Class<?> value) {
+ interfaceClass = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#p()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder p(String value) {
+ p = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#properties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder properties(String value) {
+ properties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#propertyNamer()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder propertyNamer(Class<? extends PropertyNamer> value) {
+ propertyNamer = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#readOnlyProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder readOnlyProperties(String value) {
+ readOnlyProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#ro()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder ro(String value) {
+ ro = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#unsorted()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder unsorted(boolean value) {
+ unsorted = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#stopClass()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder stopClass(Class<?> value) {
+ stopClass = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#typeName()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder typeName(String value) {
+ typeName = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#typePropertyName()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder typePropertyName(String value) {
+ typePropertyName = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#wo()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder wo(String value) {
+ wo = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#writeOnlyProperties()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder writeOnlyProperties(String value) {
+ writeOnlyProperties = value;
+ return this;
+ }
+
+ /**
+ * Sets the {@link Marshalled#xp()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder xp(String value) {
+ xp = value;
+ return this;
+ }
+
}
@SuppressWarnings({
@@ -103,14 +324,62 @@ public class MarshalledAnnotation {
private static class Object extends AnnotationObject implements Marshalled {
private final String[] description;
+ private final boolean findFluentSetters;
+ private final boolean unsorted;
+ private final Class<? extends BeanInterceptor<?>> interceptor;
+ private final Class<? extends PropertyNamer> propertyNamer;
private final Class<?> implClass;
+ private final Class<?> interfaceClass;
+ private final Class<?> stopClass;
+ private final Class<?>[] dictionary;
+ @SuppressWarnings("rawtypes")
+ private final Class<? extends BeanFactory> factory;
private final String example;
+ private final String excludeProperties;
+ private final String p;
+ private final String properties;
+ private final String readOnlyProperties;
+ private final String ro;
+ private final String typeName;
+ private final String typePropertyName;
+ private final String wo;
+ private final String writeOnlyProperties;
+ private final String xp;
Object(MarshalledAnnotation.Builder b) {
super(b);
description = copyOf(b.description);
+ dictionary = copyOf(b.dictionary);
example = b.example;
+ excludeProperties = b.excludeProperties;
+ factory = b.factory;
+ findFluentSetters = b.findFluentSetters;
implClass = b.implClass;
+ interceptor = b.interceptor;
+ interfaceClass = b.interfaceClass;
+ p = b.p;
+ properties = b.properties;
+ propertyNamer = b.propertyNamer;
+ readOnlyProperties = b.readOnlyProperties;
+ ro = b.ro;
+ unsorted = b.unsorted;
+ stopClass = b.stopClass;
+ typeName = b.typeName;
+ typePropertyName = b.typePropertyName;
+ wo = b.wo;
+ writeOnlyProperties = b.writeOnlyProperties;
+ xp = b.xp;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public Class<?>[] dictionary() {
+ return dictionary;
+ }
+
+ @Override /* Overridden from Marshalled */
+ @SuppressWarnings("rawtypes")
+ public Class<? extends BeanFactory> factory() {
+ return factory;
}
@Override /* Overridden from Marshalled */
@@ -118,11 +387,91 @@ public class MarshalledAnnotation {
return example;
}
+ @Override /* Overridden from Marshalled */
+ public String excludeProperties() {
+ return excludeProperties;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public boolean findFluentSetters() {
+ return findFluentSetters;
+ }
+
@Override /* Overridden from Marshalled */
public Class<?> implClass() {
return implClass;
}
+ @Override /* Overridden from Marshalled */
+ public Class<? extends BeanInterceptor<?>> interceptor() {
+ return interceptor;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public Class<?> interfaceClass() {
+ return interfaceClass;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String p() {
+ return p;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String properties() {
+ return properties;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public Class<? extends PropertyNamer> propertyNamer() {
+ return propertyNamer;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String readOnlyProperties() {
+ return readOnlyProperties;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String ro() {
+ return ro;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public boolean unsorted() {
+ return unsorted;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public Class<?> stopClass() {
+ return stopClass;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String typeName() {
+ return typeName;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String typePropertyName() {
+ return typePropertyName;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String wo() {
+ return wo;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String writeOnlyProperties() {
+ return writeOnlyProperties;
+ }
+
+ @Override /* Overridden from Marshalled */
+ public String xp() {
+ return xp;
+ }
+
@Override /* Overridden from annotation */
public String[] description() {
return description;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledApplyAnnotation.java
index 9ec61dfd84..402bb5b02e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledApplyAnnotation.java
@@ -19,6 +19,7 @@ package org.apache.juneau.annotation;
import static org.apache.juneau.commons.utils.CollectionUtils.*;
import java.lang.annotation.*;
+import java.lang.reflect.*;
import org.apache.juneau.*;
import org.apache.juneau.commons.annotation.*;
@@ -72,7 +73,7 @@ public class MarshalledApplyAnnotation {
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
* </ul>
*/
- public static class Builder extends AppliedAnnotationObject.BuilderT {
+ public static class Builder extends AppliedAnnotationObject.BuilderTMF {
Marshalled value = MarshalledAnnotation.DEFAULT;
@@ -112,6 +113,18 @@ public class MarshalledApplyAnnotation {
return this;
}
+ @Override /* Overridden from AppliedAnnotationObject.BuilderM */
+ public Builder on(Method...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* Overridden from AppliedAnnotationObject.BuilderMF */
+ public Builder on(Field...value) {
+ super.on(value);
+ return this;
+ }
+
@Override /* Overridden from AppliedAnnotationObject.BuilderT */
public Builder on(ClassInfo...value) {
super.on(value);
@@ -124,6 +137,18 @@ public class MarshalledApplyAnnotation {
return this;
}
+ @Override /* Overridden from AppliedAnnotationObject.BuilderTMF */
+ public Builder on(FieldInfo...value) {
+ super.on(value);
+ return this;
+ }
+
+ @Override /* Overridden from AppliedAnnotationObject.BuilderTMF */
+ public Builder on(MethodInfo...value) {
+ super.on(value);
+ return this;
+ }
+
/**
* Instantiates a new {@link MarshalledApply @MarshalledApply} object initialized with this builder.
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
index bcae571d26..7a720ede61 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSession.java
@@ -1084,7 +1084,7 @@ public class ParserSession extends BeanSession {
return br.getClassMeta(typeName);
}
- // Resolve via @Bean(dictionary={}) on the expected type where the
+ // Resolve via @Marshalled(dictionary={}) on the expected type where the
// expected type is an interface with subclasses.
if (nn(eType)) {
br = eType.getBeanRegistry();
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
index 9ca68b484e..280197e619 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/Serializer.java
@@ -237,7 +237,7 @@ public class Serializer extends BeanTraverseContext {
* .build();
*
* <jc>// Our map of beans to serialize.</jc>
- * <ja>@Bean</ja>(typeName=<js>"mybean"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"mybean"</js>)
* <jk>public class</jk> MyBean {
* <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
* }
@@ -275,7 +275,7 @@ public class Serializer extends BeanTraverseContext {
* type information that might normally be included to determine the data type will not be serialized.
*
* <p>
- * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean(typeName)} value, a
+ * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Marshalled(typeName)} value, a
* <js>'_type'</js> attribute will only be added when this setting is enabled.
*
* <p>
@@ -294,7 +294,7 @@ public class Serializer extends BeanTraverseContext {
* .build();
*
* <jc>// Our bean to serialize.</jc>
- * <ja>@Bean</ja>(typeName=<js>"mybean"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"mybean"</js>)
* <jk>public class</jk> MyBean {
* <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
* }
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
index 8fc77c6a52..38b12891e2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/annotation/SerializerConfig.java
@@ -88,7 +88,7 @@ public @interface SerializerConfig {
* type information that might normally be included to determine the data type will not be serialized.
*
* <p>
- * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean(typeName)} value, a
+ * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Marshalled(typeName)} value, a
* <js>'_type'</js> attribute will only be added when this setting is enabled.
*
* <p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BeanInterceptor.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BeanInterceptor.java
index 2d2699f16f..c361db56fb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BeanInterceptor.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BeanInterceptor.java
@@ -46,14 +46,14 @@ package org.apache.juneau.swap;
* <p>
* Bean interceptors are registered in the following way:
* <ul class='javatree'>
- * <li class='ja'>{@link org.apache.juneau.annotation.Bean#interceptor() @Bean(interceptor)}
+ * <li class='ja'>{@link org.apache.juneau.annotation.Bean#interceptor() @Marshalled(interceptor)}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanInterceptor(Class,Class)}
* </ul>
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Register interceptor on bean class.</jc>
- * <ja>@Bean</ja>(interceptor=AddressInterceptor.<jk>class</jk>)
+ * <ja>@Marshalled</ja>(interceptor=AddressInterceptor.<jk>class</jk>)
* <jk>public class</jk> Address {
* <jk>public</jk> String getTaxInfo() {...}
* <jk>public void</jk> setTaxInfo(String <jv>value</jv>) {...}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
index 39bc99873a..eb54c2301a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/Namespace.java
@@ -39,7 +39,7 @@ import org.apache.juneau.annotation.*;
@SuppressWarnings({
"java:S3740" // Raw Comparable type used intentionally for namespace ordering where the generic bound cannot be expressed
})
-@Bean
+@Marshalled
public class Namespace {
private static final ConcurrentHashMap<String,Namespace> CACHE = new ConcurrentHashMap<>();
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
index 11824bc869..2fb127ec5f 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/RequestEchoResource.java
@@ -69,9 +69,9 @@ import jakarta.servlet.http.*;
maxDepth="5",
detectRecursions="true"
)
-@BeanApply(on="HttpServletRequest",value=@Bean(interfaceClass=HttpServletRequest.class))
-@BeanApply(on="HttpSession",value=@Bean(interfaceClass=HttpSession.class))
-@BeanApply(on="ServletContext",value=@Bean(interfaceClass=ServletContext.class))
+@MarshalledApply(on="HttpServletRequest",value=@Marshalled(interfaceClass=HttpServletRequest.class))
+@MarshalledApply(on="HttpSession",value=@Marshalled(interfaceClass=HttpSession.class))
+@MarshalledApply(on="ServletContext",value=@Marshalled(interfaceClass=ServletContext.class))
public class RequestEchoResource extends BasicRestObject {
/**
diff --git a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/UtilityBeansResource.java b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/UtilityBeansResource.java
index 140968148b..4541811252 100644
--- a/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/UtilityBeansResource.java
+++ b/juneau-examples/juneau-examples-rest/src/main/java/org/apache/juneau/examples/rest/UtilityBeansResource.java
@@ -62,7 +62,7 @@ public class UtilityBeansResource extends BasicRestObject {
@SuppressWarnings({
"java:S1104" // All public fields intentional for direct bean serialization in REST example demonstrations
})
- @Bean(p = "street,city,state,zip,isCurrent")
+ @Marshalled(p = "street,city,state,zip,isCurrent")
public static class Address {
/** Street address. */
diff --git a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
index bbfce42f41..5d464687a4 100755
--- a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
+++ b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/DirectoryResource.java
@@ -133,7 +133,7 @@ public class DirectoryResource extends BasicRestServlet {
/** File or directory details for REST response. */
@Response
@Schema(description = "File or directory details")
- @Bean(properties = "type,name,size,lastModified,actions,files")
+ @Marshalled(properties = "type,name,size,lastModified,actions,files")
public class FileResource {
private final File f;
private final String path;
diff --git a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
index 3531734462..0ef744ffaf 100644
--- a/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
+++ b/juneau-microservice/juneau-microservice-core/src/main/java/org/apache/juneau/microservice/resources/LogsResource.java
@@ -100,7 +100,7 @@ public class LogsResource extends BasicRestServlet {
/** File or directory details for REST response. */
@Response(schema = @Schema(description = "File or directory details"))
- @Bean(properties = "type,name,size,lastModified,actions,files")
+ @Marshalled(properties = "type,name,size,lastModified,actions,files")
@SuppressWarnings({
"java:S1135" // TODO in getFiles() - will address later
})
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
index bbf195e77b..c7fbc8c4eb 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestClient.java
@@ -1192,7 +1192,7 @@ public class RestClient extends BeanContextable implements HttpClient, Closeable
* .build();
*
* <jc>// Our map of beans to serialize.</jc>
- * <ja>@Bean</ja>(typeName=<js>"mybean"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"mybean"</js>)
* <jk>public class</jk> MyBean {
* <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
* }
@@ -1295,7 +1295,7 @@ public class RestClient extends BeanContextable implements HttpClient, Closeable
* type information that might normally be included to determine the data type will not be serialized.
*
* <p>
- * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Bean(typeName)} value, a
+ * For example, when serializing a top-level POJO with a {@link Bean#typeName() @Marshalled(typeName)} value, a
* <js>'_type'</js> attribute will only be added when this setting is enabled.
*
* <p>
@@ -1315,7 +1315,7 @@ public class RestClient extends BeanContextable implements HttpClient, Closeable
* .build();
*
* <jc>// Our bean to serialize.</jc>
- * <ja>@Bean</ja>(typeName=<js>"mybean"</js>)
+ * <ja>@Marshalled</ja>(typeName=<js>"mybean"</js>)
* <jk>public class</jk> MyBean {
* <jk>public</jk> String <jf>foo</jf> = <js>"bar"</js>;
* }
diff --git a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestRequest.java b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestRequest.java
index 7e629a1aa5..5e4c08e926 100644
--- a/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestRequest.java
+++ b/juneau-rest/juneau-rest-client/src/main/java/org/apache/juneau/rest/client/RestRequest.java
@@ -1111,7 +1111,7 @@ public class RestRequest extends BeanSession implements HttpUriRequest, Configur
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <ja>@Bean</ja>
+ * <ja>@Marshalled</ja>
* <jk>public class</jk> MyHeaders {
* <jk>public</jk> String getFooBar() { <jk>return</jk> <js>"baz"</js>; }
* <jk>public</jk> Integer getQux() { <jk>return</jk> 123; }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/BeanDescription.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/BeanDescription.java
index a0bb2e940f..de683fdda2 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/BeanDescription.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/BeanDescription.java
@@ -37,9 +37,9 @@ import org.apache.juneau.annotation.*;
* </ul>
*/
-@Bean(properties = "type,properties")
+@Marshalled(properties = "type,properties")
@SuppressWarnings({
- "java:S1104" // Public fields required for @Bean serialization
+ "java:S1104" // Public fields required for @Marshalled serialization
})
public class BeanDescription {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/ResourceDescription.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/ResourceDescription.java
index 5dbd4063c9..e1d8a013c7 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/ResourceDescription.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/beans/ResourceDescription.java
@@ -39,7 +39,7 @@ import org.apache.juneau.http.annotation.*;
* </ul>
*/
-@Bean(properties = "name,description", findFluentSetters = true)
+@Marshalled(properties = "name,description", findFluentSetters = true)
@Response(schema = @Schema(ignore = true))
public class ResourceDescription implements Comparable<ResourceDescription> {
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/RestContextStats.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/RestContextStats.java
index 54b0d11568..eae61a8924 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/RestContextStats.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/stats/RestContextStats.java
@@ -30,7 +30,7 @@ import org.apache.juneau.swaps.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/ExecutionStatistics">REST method execution statistics</a>
* </ul>
*/
-@Bean(properties = "startTime,upTime,methodStats")
+@Marshalled(properties = "startTime,upTime,methodStats")
public class RestContextStats {
private final Instant startTime;
private final List<MethodExecStats> methodStats;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/Annotations_Test.java b/juneau-utest/src/test/java/org/apache/juneau/Annotations_Test.java
index e3d096214c..a8e855a841 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/Annotations_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/Annotations_Test.java
@@ -43,7 +43,7 @@ class Annotations_Test extends TestBase {
}
/** Class with explicitly specified properties */
- @Bean(properties="age,name")
+ @Marshalled(properties="age,name")
public static class Person1 {
public int age;
@@ -66,7 +66,7 @@ class Annotations_Test extends TestBase {
}
/** Class with explicitly specified properties */
- @Bean(p="age,name")
+ @Marshalled(p="age,name")
public static class Person2 {
public int age;
@@ -89,7 +89,7 @@ class Annotations_Test extends TestBase {
}
/** Class with explicitly specified properties */
- @Bean(properties="age",p="name")
+ @Marshalled(properties="age",p="name")
public static class Person3 {
public int age;
@@ -120,7 +120,7 @@ class Annotations_Test extends TestBase {
public void setName(String v) { name = v; }
}
- @BeanApply(on="Person4",value=@Bean(properties="age,name"))
+ @MarshalledApply(on="Person4",value=@Marshalled(properties="age,name"))
public static class PersonConfig {}
//====================================================================================================
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java
index c29a8912d6..9afa4b4f62 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java
@@ -317,7 +317,7 @@ class BeanConfig_Test extends TestBase {
assertEquals(1, bc.convertToType(o2, ReadOnlyPerson[].class)[0].getAge());
}
- @Bean(p="name,age")
+ @Marshalled(p="name,age")
public static class ReadOnlyPerson {
private final int age;
@@ -367,9 +367,9 @@ class BeanConfig_Test extends TestBase {
}
}
- @BeanApply(on="Dummy1",value=@Bean(p="dummy"))
- @BeanApply(on="ReadOnlyPerson2",value=@Bean(p="name,age"))
- @BeanApply(on="Dummy2",value=@Bean(p="dummy"))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(p="dummy"))
+ @MarshalledApply(on="ReadOnlyPerson2",value=@Marshalled(p="name,age"))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(p="dummy"))
@BeancApply(on="Dummy1",value=@Beanc(properties="dummy"))
@BeancApply(on="ReadOnlyPerson2(String,int)",value=@Beanc(properties="name,age"))
@BeancApply(on="Dummy2",value=@Beanc(properties="dummy"))
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanMapErrors_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BeanMapErrors_Test.java
index 4984938b46..4367bb0f48 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanMapErrors_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BeanMapErrors_Test.java
@@ -29,7 +29,7 @@ import org.junit.jupiter.api.*;
class BeanMapErrors_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
- // @Beanp(name) on method not in @Bean(properties)
+ // @Beanp(name) on method not in @Marshalled(properties)
// JUNEAU-248: Shouldn't be found in keySet()/entrySet()/containsKey() but should be accessible via get()/put()
//-----------------------------------------------------------------------------------------------------------------
@Test void beanPropertyMethodNotInBeanProperties() {
@@ -44,7 +44,7 @@ class BeanMapErrors_Test extends TestBase {
assertFalse(bm.entrySet().stream().map(Entry::getKey).toList().contains("f2"));
}
- @Bean(p="f1")
+ @Marshalled(p="f1")
public static class A1 {
public int f1;
@@ -65,8 +65,8 @@ class BeanMapErrors_Test extends TestBase {
assertFalse(bm.entrySet().stream().map(Entry::getKey).toList().contains("f2"));
}
- @BeanApply(on="Dummy",value=@Bean(p="dummy"))
- @BeanApply(on="B1",value=@Bean(p="f1"))
+ @MarshalledApply(on="Dummy",value=@Marshalled(p="dummy"))
+ @MarshalledApply(on="B1",value=@Marshalled(p="f1"))
@BeanpApply(on="Dummy",value=@Beanp("dummy"))
@BeanpApply(on="B1.f2",value=@Beanp("f2"))
private static class B1Config {}
@@ -80,7 +80,7 @@ class BeanMapErrors_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // @Beanp(name) on field not in @Bean(properties)
+ // @Beanp(name) on field not in @Marshalled(properties)
// JUNEAU-248: Shouldn't be found in keySet()/entrySet()/containsKey() but should be accessible via get()/put()
//-----------------------------------------------------------------------------------------------------------------
@Test void beanPropertyFieldNotInBeanProperties() {
@@ -95,7 +95,7 @@ class BeanMapErrors_Test extends TestBase {
assertFalse(bm.entrySet().stream().map(Entry::getKey).toList().contains("f2"));
}
- @Bean(p="f1")
+ @Marshalled(p="f1")
public static class A2 {
public int f1;
@@ -115,8 +115,8 @@ class BeanMapErrors_Test extends TestBase {
assertFalse(bm.entrySet().stream().map(Entry::getKey).toList().contains("f2"));
}
- @BeanApply(on="Dummy",value=@Bean(p="dummy"))
- @BeanApply(on="B2",value=@Bean(p="f1"))
+ @MarshalledApply(on="Dummy",value=@Marshalled(p="dummy"))
+ @MarshalledApply(on="B2",value=@Marshalled(p="f1"))
@BeanpApply(on="Dummy",value=@Beanp("dummy"))
@BeanpApply(on="B2.f2",value=@Beanp("f2"))
private static class B2Config {}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanMap_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BeanMap_Test.java
index 050ee06b99..81c5b06396 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanMap_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BeanMap_Test.java
@@ -458,7 +458,7 @@ class BeanMap_Test extends TestBase {
public D2[] ab2 = {};
}
- @Bean(typeName="D2")
+ @Marshalled(typeName="D2")
public static class D2 {
public String s = "default";
}
@@ -493,9 +493,9 @@ class BeanMap_Test extends TestBase {
assertBean(t, "ab2{class{simpleName}},ab2{0{class{simpleName},s}}", "{{D2c[]}},{{{D2c},foobar}}");
}
- @BeanApply(on="Dummy1",value=@Bean(typeName="dummy"))
- @BeanApply(on="D2c",value=@Bean(typeName="D2"))
- @BeanApply(on="Dummy2",value=@Bean(typeName="dummy"))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(typeName="dummy"))
+ @MarshalledApply(on="D2c",value=@Marshalled(typeName="D2"))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(typeName="dummy"))
private static class D1cConfig {}
public static class D1c {
@@ -526,7 +526,7 @@ class BeanMap_Test extends TestBase {
assertEquals("{s:['foo'],s2:[['foo']],i:[0,0,0],i2:[[0,0,0],[0,0,0]]}", Json5Serializer.DEFAULT.serialize(t));
}
- @Bean(p="s,s2,i,i2")
+ @Marshalled(p="s,s2,i,i2")
public static class E {
public String[] s;
public String[][] s2;
@@ -654,7 +654,7 @@ class BeanMap_Test extends TestBase {
ONE, TWO, THREE
}
- @Bean(typeName="H")
+ @Marshalled(typeName="H")
public static class H {
public HEnum enum1;
@@ -929,7 +929,7 @@ class BeanMap_Test extends TestBase {
assertBean(m.getBean(), "foo,barBaz,bingBooURL", "4,5,6");
}
- @Bean(propertyNamer=PropertyNamerDLC.class)
+ @Marshalled(propertyNamer=PropertyNamerDLC.class)
public static class P1 {
public int foo, barBaz, bingBooURL;
}
@@ -944,9 +944,9 @@ class BeanMap_Test extends TestBase {
assertBean(m.getBean(), "foo,barBaz,bingBooURL", "4,5,6");
}
- @BeanApply(on="Dummy1",value=@Bean(propertyNamer=PropertyNamerDLC.class))
- @BeanApply(on="P1c",value=@Bean(propertyNamer=PropertyNamerDLC.class))
- @BeanApply(on="Dummy2",value=@Bean(propertyNamer=PropertyNamerDLC.class))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(propertyNamer=PropertyNamerDLC.class))
+ @MarshalledApply(on="P1c",value=@Marshalled(propertyNamer=PropertyNamerDLC.class))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(propertyNamer=PropertyNamerDLC.class))
private static class P1cConfig {}
public static class P1c {
@@ -966,7 +966,7 @@ class BeanMap_Test extends TestBase {
assertBean(m.getBean(), "fooBar,bazBING", "3,4");
}
- @Bean(propertyNamer=PropertyNamerDLC.class)
+ @Marshalled(propertyNamer=PropertyNamerDLC.class)
public static class P2 {
private int fooBar;
public int getFooBar() { return fooBar; }
@@ -1661,7 +1661,7 @@ class BeanMap_Test extends TestBase {
public String a3="3", a4="4";
}
- @Bean(stopClass=V.class)
+ @Marshalled(stopClass=V.class)
public static class V3 extends V2 {
public String a5="5", a6="6";
}
@@ -1672,9 +1672,9 @@ class BeanMap_Test extends TestBase {
assertEquals("{a3:'3',a4:'4',a5:'5',a6:'6'}", ws.toString(new V3c()));
}
- @BeanApply(on="Dummy1",value=@Bean(stopClass=Vc.class))
- @BeanApply(on="V3c",value=@Bean(stopClass=Vc.class))
- @BeanApply(on="Dummy2",value=@Bean(stopClass=Vc.class))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(stopClass=Vc.class))
+ @MarshalledApply(on="V3c",value=@Marshalled(stopClass=Vc.class))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(stopClass=Vc.class))
private static class VcConfig {}
public static class Vc {
@@ -1707,7 +1707,7 @@ class BeanMap_Test extends TestBase {
public String getA4() {return "4";}
}
- @Bean(stopClass=W.class)
+ @Marshalled(stopClass=W.class)
public static class W3 extends W2 {
public String getA5() {return "5";}
public String getA6() {return "6";}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanStreaming_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BeanStreaming_Test.java
index 85456277da..b7c47079a6 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanStreaming_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BeanStreaming_Test.java
@@ -260,7 +260,7 @@ class BeanStreaming_Test extends TestBase {
}
// ====================================================================================================
- // @Bean(factory=) tests
+ // @Marshalled(factory=) tests
// ====================================================================================================
@Nested
diff --git a/juneau-utest/src/test/java/org/apache/juneau/DynaBean_ComboRoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/DynaBean_ComboRoundTripTest.java
index 4c4906a9cd..4d39da9a63 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/DynaBean_ComboRoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/DynaBean_ComboRoundTripTest.java
@@ -195,7 +195,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
return TESTERS;
}
- @Bean
+ @Marshalled
public static class BeanWithDynaField {
public int f1;
@Beanp(name="*")
@@ -210,7 +210,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean
+ @Marshalled
public static class BeanWithDynaMethods {
private Map<String,Object> f2 = map();
@@ -243,7 +243,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean
+ @Marshalled
public static class BeanWithDynaMethodsAndExtraKeys {
private Map<String,Object> f2 = map();
@@ -281,7 +281,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean
+ @Marshalled
public static class BeanWithDynaGetterOnly {
private Map<String,Object> f2 = map();
@@ -307,7 +307,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean
+ @Marshalled
public static class BeanWithDynaFieldSwapped {
@Beanp(name="*")
@Swap(TemporalCalendarSwap.IsoInstant.class)
@@ -319,7 +319,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean
+ @Marshalled
public static class BeanWithDynaFieldStringList {
@Beanp(name="*")
public Map<String,List<String>> f1 = map();
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanFilter_Test.java b/juneau-utest/src/test/java/org/apache/juneau/MarshalledFilter_Test.java
similarity index 88%
rename from juneau-utest/src/test/java/org/apache/juneau/BeanFilter_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/MarshalledFilter_Test.java
index bb55a0cc74..294e072ff0 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanFilter_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/MarshalledFilter_Test.java
@@ -25,7 +25,7 @@ import org.apache.juneau.annotation.*;
import org.apache.juneau.json5.*;
import org.junit.jupiter.api.*;
-class BeanFilter_Test extends TestBase {
+class MarshalledFilter_Test extends TestBase {
//====================================================================================================
// Test sub types
@@ -55,33 +55,33 @@ class BeanFilter_Test extends TestBase {
);
}
- @Bean(dictionary={A1.class, A2.class})
+ @Marshalled(dictionary={A1.class, A2.class})
public abstract static class A {
public String f0 = "f0";
public B fb;
}
- @Bean(typeName="A1")
+ @Marshalled(typeName="A1")
public static class A1 extends A {
public String f1;
}
- @Bean(typeName="A2")
+ @Marshalled(typeName="A2")
public static class A2 extends A {
public String f2;
}
- @Bean(dictionary={B1.class,B2.class})
+ @Marshalled(dictionary={B1.class,B2.class})
public abstract static class B {
public String f0b = "f0b";
}
- @Bean(typeName="B1")
+ @Marshalled(typeName="B1")
public static class B1 extends B {
public String f1;
}
- @Bean(typeName="B2")
+ @Marshalled(typeName="B2")
public static class B2 extends B {
public String f2;
}
@@ -112,12 +112,12 @@ class BeanFilter_Test extends TestBase {
);
}
- @BeanApply(on="E",value=@Bean(dictionary={E1.class, E2.class}))
- @BeanApply(on="E1",value=@Bean(typeName="E1"))
- @BeanApply(on="E2",value=@Bean(typeName="E2"))
- @BeanApply(on="F",value=@Bean(dictionary={F1.class,F2.class}))
- @BeanApply(on="F1",value=@Bean(typeName="F1"))
- @BeanApply(on="F2",value=@Bean(typeName="F2"))
+ @MarshalledApply(on="E",value=@Marshalled(dictionary={E1.class, E2.class}))
+ @MarshalledApply(on="E1",value=@Marshalled(typeName="E1"))
+ @MarshalledApply(on="E2",value=@Marshalled(typeName="E2"))
+ @MarshalledApply(on="F",value=@Marshalled(dictionary={F1.class,F2.class}))
+ @MarshalledApply(on="F1",value=@Marshalled(typeName="F1"))
+ @MarshalledApply(on="F2",value=@Marshalled(typeName="F2"))
private static class EConfig {}
private static class EConfig2 extends EConfig {}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/ReadWriteOnlyProperties_Test.java b/juneau-utest/src/test/java/org/apache/juneau/ReadWriteOnlyProperties_Test.java
index 6542de7357..29bab04395 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/ReadWriteOnlyProperties_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/ReadWriteOnlyProperties_Test.java
@@ -57,10 +57,10 @@ class ReadWriteOnlyProperties_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @Bean(bpro/bpwo)
+ // @Marshalled(bpro/bpwo)
//------------------------------------------------------------------------------------------------------------------
- @Bean(readOnlyProperties="f1", writeOnlyProperties="f2")
+ @Marshalled(readOnlyProperties="f1", writeOnlyProperties="f2")
public static class B {
@Beanp(ro="true") public int f1;
@Beanp(wo="true") public int f2;
@@ -83,9 +83,9 @@ class ReadWriteOnlyProperties_Test extends TestBase {
assertEquals(2, x.f2);
}
- @BeanApply(on="Dummy1",value=@Bean(readOnlyProperties="f1",writeOnlyProperties="f2"))
- @BeanApply(on="Bc",value=@Bean(readOnlyProperties="f1",writeOnlyProperties="f2"))
- @BeanApply(on="Dummy2",value=@Bean(readOnlyProperties="f1",writeOnlyProperties="f2"))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(readOnlyProperties="f1",writeOnlyProperties="f2"))
+ @MarshalledApply(on="Bc",value=@Marshalled(readOnlyProperties="f1",writeOnlyProperties="f2"))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(readOnlyProperties="f1",writeOnlyProperties="f2"))
@BeanpApply(on="Bc.f1",value=@Beanp(ro="true"))
@BeanpApply(on="Bc.f2",value=@Beanp(wo="true"))
private static class BcConfig {}
@@ -203,10 +203,10 @@ class ReadWriteOnlyProperties_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @Bean(bpro="*")
+ // @Marshalled(bpro="*")
//------------------------------------------------------------------------------------------------------------------
- @Bean(readOnlyProperties="*")
+ @Marshalled(readOnlyProperties="*")
public static class D {
public int f1;
public int f2;
@@ -229,7 +229,7 @@ class ReadWriteOnlyProperties_Test extends TestBase {
assertEquals(0, x.f2);
}
- @BeanApply(on="Dc",value=@Bean(readOnlyProperties="*"))
+ @MarshalledApply(on="Dc",value=@Marshalled(readOnlyProperties="*"))
private static class DcConfig {}
public static class Dc {
@@ -255,10 +255,10 @@ class ReadWriteOnlyProperties_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @Bean(bpwo="*")
+ // @Marshalled(bpwo="*")
//------------------------------------------------------------------------------------------------------------------
- @Bean(writeOnlyProperties="*")
+ @Marshalled(writeOnlyProperties="*")
public static class E {
public int f1;
public int f2;
@@ -281,7 +281,7 @@ class ReadWriteOnlyProperties_Test extends TestBase {
assertEquals(2, x.f2);
}
- @BeanApply(on="Ec",value=@Bean(writeOnlyProperties="*"))
+ @MarshalledApply(on="Ec",value=@Marshalled(writeOnlyProperties="*"))
private static class EcConfig {}
public static class Ec {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
index 4fc7cf7a2e..c58f48fc1f 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/SerializerProperties_ComboRoundTripTest.java
@@ -339,7 +339,7 @@ class SerializerProperties_ComboRoundTripTest extends ComboRoundTripTest_Base {
return TESTERS;
}
- @Bean(typeName="BwT")
+ @Marshalled(typeName="BwT")
public static class T0 {
public int f;
@@ -389,12 +389,12 @@ class SerializerProperties_ComboRoundTripTest extends ComboRoundTripTest_Base {
}
}
- @Bean(typeName="T11")
+ @Marshalled(typeName="T11")
public static class T11 {
public T11a[] f = {new T11a()};
}
- @Bean(typeName="T11a")
+ @Marshalled(typeName="T11a")
public static class T11a {
public String[] f = {" foo "};
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Generics_RoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Generics_RoundTripTest.java
index ceee933944..77ce0b9de7 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Generics_RoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Generics_RoundTripTest.java
@@ -57,7 +57,7 @@ class Generics_RoundTripTest extends RoundTripTest_Base {
}
// Class with unbound type variables.
- @Bean(p="s,t")
+ @Marshalled(p="s,t")
public static class Pair<S,T> {
public Pair() {}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Records_RoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Records_RoundTripTest.java
index fb98a46b7f..19ed088a1f 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Records_RoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/Records_RoundTripTest.java
@@ -54,7 +54,7 @@ class Records_RoundTripTest extends RoundTripTest_Base {
public record WithEnum(String name, Priority priority) {}
- @Bean(properties="age,name")
+ @Marshalled(properties="age,name")
public record AnnotatedOrder(String name, int age) {}
public record WithBeanp(@Beanp(name="fullName") String name, int age) {}
@@ -70,7 +70,7 @@ class Records_RoundTripTest extends RoundTripTest_Base {
public record WithNullValues(String required, String optional) {}
- @Bean(properties="name")
+ @Marshalled(properties="name")
public record WithBeanc(String name, int age) {
@Beanc(properties="name")
public WithBeanc(String name) {
@@ -86,13 +86,13 @@ class Records_RoundTripTest extends RoundTripTest_Base {
public record IdentifiableRecord(String id, String data) implements Identifiable {}
- @Bean(dictionary={DogRecord.class, CatRecord.class})
+ @Marshalled(dictionary={DogRecord.class, CatRecord.class})
public interface AnimalRecord {}
- @Bean(typeName="dog")
+ @Marshalled(typeName="dog")
public record DogRecord(String name, String breed) implements AnimalRecord {}
- @Bean(typeName="cat")
+ @Marshalled(typeName="cat")
public record CatRecord(String name, int lives) implements AnimalRecord {}
public record AnimalHolder(AnimalRecord animal) {}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripAddClassAttrs_Test.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripAddClassAttrs_Test.java
index c92880bbfd..c40fe5480f 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripAddClassAttrs_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripAddClassAttrs_Test.java
@@ -212,7 +212,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
public abstract static class AA implements IA {}
- @Bean(typeName="A")
+ @Marshalled(typeName="A")
public static class A extends AA {
private String f1;
@@ -265,7 +265,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
assertBean(x, "f2a{f1},f2b{f1},f2c{f1},f2d{f1}", "{foo},{foo},{foo},{foo}");
}
- @Bean(typeName="B")
+ @Marshalled(typeName="B")
public static class B {
public A f2a;
public AA f2b;
@@ -294,7 +294,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
assertBean(x, "f3a{foo{f1}},f3b{foo{f1}},f3c{foo{f1}},f3d{foo{f1}}", "{{foo}},{{foo}},{{foo}},{{foo}}");
}
- @Bean(typeName="C")
+ @Marshalled(typeName="C")
public static class C {
public Map<String,A> f3a = new HashMap<>();
public Map<String,A> f3b = new HashMap<>();
@@ -329,7 +329,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
assertBean(x, "f4a{0{f1}},f4b{0{f1}},f4c{0{f1}},f4d{0{f1}}", "{{foo}},{{foo}},{{foo}},{{foo}}");
}
- @Bean(typeName="D")
+ @Marshalled(typeName="D")
public static class D {
public A[] f4a;
public AA[] f4b;
@@ -364,7 +364,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
assertBean(x, "f5a{0{f1}},f5b{0{f1}},f5c{0{f1}},f5d{0{f1}}", "{{foo}},{{foo}},{{foo}},{{foo}}");
}
- @Bean(typeName="E")
+ @Marshalled(typeName="E")
public static class E {
public List<A> f5a = new LinkedList<>();
public List<AA> f5b = new LinkedList<>();
@@ -399,7 +399,7 @@ class RoundTripAddClassAttrs_Test extends TestBase {
assertBean(x, "f6a{0{0{f1}}},f6b{0{0{f1}}},f6c{0{0{f1}}},f6d{0{0{f1}}}", "{{{foo}}},{{{foo}}},{{{foo}}},{{{foo}}}");
}
- @Bean(typeName="F")
+ @Marshalled(typeName="F")
public static class F {
public List<A[]> f6a = new LinkedList<>();
public List<AA[]> f6b = new LinkedList<>();
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMaps_Test.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMaps_Test.java
index edb8ed9f8f..654fe9d8e2 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMaps_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeanMaps_Test.java
@@ -322,7 +322,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(subTypes=xxx)
+ // Test @Marshalled(subTypes=xxx)
//====================================================================================================
@ParameterizedTest
@@ -356,14 +356,14 @@ class RoundTripBeanMaps_Test extends TestBase {
assertSerialized(b, js, "{_type:'B3',f0:'f0',f3:'2001-01-01T12:34:56.789Z'}");
}
- @Bean(
+ @Marshalled(
dictionary={B1.class,B2.class,B3.class}
)
public abstract static class B {
public String f0 = "f0";
}
- @Bean(typeName="B1")
+ @Marshalled(typeName="B1")
public static class B1 extends B {
public String f1;
public static B1 create() {
@@ -374,7 +374,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
}
- @Bean(typeName="B2")
+ @Marshalled(typeName="B2")
public static class B2 extends B {
public int f2;
public static B2 create() {
@@ -385,7 +385,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
}
- @Bean(typeName="B3")
+ @Marshalled(typeName="B3")
public static class B3 extends B {
public XMLGregorianCalendar f3;
public static B3 create() throws Exception {
@@ -397,12 +397,12 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(subTypes=xxx) using BeanFilter
+ // Test @Marshalled(subTypes=xxx) using MarshalledFilter
//====================================================================================================
@ParameterizedTest
@MethodSource("testers")
- void a07_subTypesUsingBeanFilter(RoundTrip_Tester t) throws Exception {
+ void a07_subTypesUsingMarshalledFilter(RoundTrip_Tester t) throws Exception {
var js = Json5Serializer.create().build();
// Skip validation-only tests
@@ -474,7 +474,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(subTypeProperty=xxx) with real bean property
+ // Test @Marshalled(subTypeProperty=xxx) with real bean property
//====================================================================================================
@ParameterizedTest
@@ -493,12 +493,12 @@ class RoundTripBeanMaps_Test extends TestBase {
assertBean(b, "class{simpleName},f0a,f0b,f1", "{BA1},f0a,f0b,f1");
}
- @Bean(dictionary={BA1.class,BA2.class})
+ @Marshalled(dictionary={BA1.class,BA2.class})
public abstract static class BA {
public String f0a, f0b;
}
- @Bean(typeName="BA1")
+ @Marshalled(typeName="BA1")
public static class BA1 extends BA {
public String f1;
public static BA1 create() {
@@ -510,24 +510,24 @@ class RoundTripBeanMaps_Test extends TestBase {
}
}
- @Bean(typeName="BA2")
+ @Marshalled(typeName="BA2")
public static class BA2 extends BA {
public String f2;
}
//====================================================================================================
- // Test @Bean(subTypes=xxx) with real bean property using BeanFilter
+ // Test @Marshalled(subTypes=xxx) with real bean property using MarshalledFilter
//====================================================================================================
@ParameterizedTest
@MethodSource("testers")
- void a09_subTypePropertyWithRealPropertyUsingBeanFilter(RoundTrip_Tester t) throws Exception {
+ void a09_subTypePropertyWithRealPropertyUsingMarshalledFilter(RoundTrip_Tester t) throws Exception {
// Skip validation-only tests
if (t.isValidationOnly())
return;
- var s = t.getSerializer().copy().annotations(BeanApplyAnnotation.create(CA.class).value(BeanAnnotation.create().dictionary(CAFilterDictionaryMap.class).build()).build()).build();
- var p = t.getParser().copy().annotations(BeanApplyAnnotation.create(CA.class).value(BeanAnnotation.create().dictionary(CAFilterDictionaryMap.class).build()).build()).build();
+ var s = t.getSerializer().copy().annotations(MarshalledApplyAnnotation.create(CA.class).value(MarshalledAnnotation.create().dictionary(CAFilterDictionaryMap.class).build()).build()).build();
+ var p = t.getParser().copy().annotations(MarshalledApplyAnnotation.create(CA.class).value(MarshalledAnnotation.create().dictionary(CAFilterDictionaryMap.class).build()).build()).build();
var c1 = CA1.create();
var r = s.serialize(c1);
@@ -562,7 +562,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(bpi=xxx)
+ // Test @Marshalled(bpi=xxx)
//====================================================================================================
@ParameterizedTest
@@ -582,7 +582,7 @@ class RoundTripBeanMaps_Test extends TestBase {
assertBean(d, "f3,f2", "f3,f2");
}
- @Bean(p="f3,f2")
+ @Marshalled(p="f3,f2")
public static class D1 {
public String f1, f2, f3;
public D1 init() {
@@ -594,12 +594,12 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(bpi=xxx) using BeanFilter
+ // Test @Marshalled(bpi=xxx) using MarshalledFilter
//====================================================================================================
@ParameterizedTest
@MethodSource("testers")
- void a11_propertiesUsingBeanFilter(RoundTrip_Tester t) throws Exception {
+ void a11_propertiesUsingMarshalledFilter(RoundTrip_Tester t) throws Exception {
var js = Json5Serializer.create().beanProperties(D2.class, "f3,f2").build();
// Skip validation-only tests
@@ -627,7 +627,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(bpx=xxx)
+ // Test @Marshalled(bpx=xxx)
//====================================================================================================
@ParameterizedTest
@@ -646,7 +646,7 @@ class RoundTripBeanMaps_Test extends TestBase {
assertBean(e, "f1,f3", "f1,f3");
}
- @Bean(excludeProperties="f2")
+ @Marshalled(excludeProperties="f2")
public static class E1 {
public String f1, f2, f3;
public E1 init() {
@@ -658,12 +658,12 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(bpx=xxx) using BeanFilter
+ // Test @Marshalled(bpx=xxx) using MarshalledFilter
//====================================================================================================
@ParameterizedTest
@MethodSource("testers")
- void a13_excludePropertiesUsingBeanFilter(RoundTrip_Tester t) throws Exception {
+ void a13_excludePropertiesUsingMarshalledFilter(RoundTrip_Tester t) throws Exception {
// Skip validation-only tests
if (t.isValidationOnly())
return;
@@ -688,7 +688,7 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(interfaceClass=xxx)
+ // Test @Marshalled(interfaceClass=xxx)
//====================================================================================================
@ParameterizedTest
@@ -707,7 +707,7 @@ class RoundTripBeanMaps_Test extends TestBase {
assertBean(x, "f1", "f1");
}
- @Bean(interfaceClass=FA1.class)
+ @Marshalled(interfaceClass=FA1.class)
public static class FA1 {
public String f1;
}
@@ -722,12 +722,12 @@ class RoundTripBeanMaps_Test extends TestBase {
}
//====================================================================================================
- // Test @Bean(interfaceClass=xxx) using BeanFilter
+ // Test @Marshalled(interfaceClass=xxx) using MarshalledFilter
//====================================================================================================
@ParameterizedTest
@MethodSource("testers")
- void a15_interfaceClassUsingBeanFilter(RoundTrip_Tester t) throws Exception {
+ void a15_interfaceClassUsingMarshalledFilter(RoundTrip_Tester t) throws Exception {
var s = t.getSerializer().copy();
var p = t.getParser() == null ? null : t.getParser().copy();
FB2 x;
@@ -737,7 +737,7 @@ class RoundTripBeanMaps_Test extends TestBase {
if (t.isValidationOnly() || p == null)
return;
- // --- BeanFilter defined on parent class ---
+ // --- MarshalledFilter defined on parent class ---
s.interfaces(FB1.class);
p.interfaces(FB1.class);
@@ -746,7 +746,7 @@ class RoundTripBeanMaps_Test extends TestBase {
x = p.build().parse(r, FB2.class);
assertBean(x, "f1", "f1");
- // --- BeanFilter defined on child class class ---
+ // --- MarshalledFilter defined on child class class ---
s.interfaces(FB1.class);
p.interfaces(FB1.class);
@@ -755,7 +755,7 @@ class RoundTripBeanMaps_Test extends TestBase {
x = p.build().parse(r, FB2.class);
assertBean(x, "f1", "f1");
- // --- BeanFilter defined as plain class ---
+ // --- MarshalledFilter defined as plain class ---
s.interfaces(FB1.class);
p.interfaces(FB1.class);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeansWithBuilders_Test.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeansWithBuilders_Test.java
index 2c7a99624d..4cf05156e8 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeansWithBuilders_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripBeansWithBuilders_Test.java
@@ -194,7 +194,7 @@ class RoundTripBeansWithBuilders_Test extends TestBase {
return new Builder();
}
- @Bean(findFluentSetters=true)
+ @Marshalled(findFluentSetters=true)
public static class Builder {
private int f1;
@@ -216,9 +216,9 @@ class RoundTripBeansWithBuilders_Test extends TestBase {
assertBean(x, "f1", "1");
}
- @BeanApply(on="Dummy1",value=@Bean(findFluentSetters=true))
- @BeanApply(on="Builder",value=@Bean(findFluentSetters=true))
- @BeanApply(on="Dummy2",value=@Bean(findFluentSetters=true))
+ @MarshalledApply(on="Dummy1",value=@Marshalled(findFluentSetters=true))
+ @MarshalledApply(on="Builder",value=@Marshalled(findFluentSetters=true))
+ @MarshalledApply(on="Dummy2",value=@Marshalled(findFluentSetters=true))
private static class AcConfig {}
public static class Ac {
@@ -268,7 +268,7 @@ class RoundTripBeansWithBuilders_Test extends TestBase {
return new Builder();
}
- @Bean(findFluentSetters=true)
+ @Marshalled(findFluentSetters=true)
public static class Builder {
private A f1;
@@ -308,7 +308,7 @@ class RoundTripBeansWithBuilders_Test extends TestBase {
assertJson("{f1:[{f1:1}],f2:[{f1:2}],f3:[[{f1:3}]],f4:[[{f1:4}]],f5:[[[{f1:5}]]],f6:{foo:{f1:6}},f7:{foo:{bar:{f1:7}}},f8:{foo:[{f1:8}]},f9:{foo:[[{f1:9}]]}}", x);
}
- @Bean
+ @Marshalled
public static class A3 {
private final A[] f1;
@@ -338,7 +338,7 @@ class RoundTripBeansWithBuilders_Test extends TestBase {
return new Builder();
}
- @Bean(findFluentSetters=true)
+ @Marshalled(findFluentSetters=true)
public static class Builder {
private A[] f1;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeans_Test.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeans_Test.java
index ce3588c626..a225251dba 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeans_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/RoundTripTransformBeans_Test.java
@@ -465,7 +465,7 @@ class RoundTripTransformBeans_Test extends TestBase {
assertEquals("{\"_type\":\"C3\",\"f1\":{\"f2\":\"f2\",\"f3\":3}}", r);
}
- @Bean(dictionary={C3.class})
+ @Marshalled(dictionary={C3.class})
public interface C1<T> extends Serializable {
void setF1(T f1);
T getF1();
@@ -477,7 +477,7 @@ class RoundTripTransformBeans_Test extends TestBase {
@Override /* C1 */ public void setF1(T v) { f1 = v; }
}
- @Bean(typeName="C3")
+ @Marshalled(typeName="C3")
public static class C3<T> extends C2<T> {
public static C3 create() {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java
deleted file mode 100644
index c399103a3b..0000000000
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.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.TestUtils.*;
-import static org.apache.juneau.junit.bct.BctAssertions.*;
-import static org.junit.jupiter.api.Assertions.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.swap.*;
-import org.junit.jupiter.api.*;
-
-class BeanAnnotation_Test extends TestBase {
-
- private static class X1 {}
- private static class X2 extends BeanInterceptor<BeanAnnotation_Test> {}
-
- //------------------------------------------------------------------------------------------------------------------
- // Basic tests
- //------------------------------------------------------------------------------------------------------------------
-
- Bean a1 = BeanAnnotation.create()
- .description("a")
- .dictionary(X1.class)
- .example("b")
- .excludeProperties("c")
- .findFluentSetters(true)
- .implClass(X1.class)
- .interceptor(X2.class)
- .interfaceClass(X1.class)
- .p("e")
- .properties("f")
- .propertyNamer(BasicPropertyNamer.class)
- .readOnlyProperties("g")
- .ro("h")
- .unsorted(true)
- .stopClass(X1.class)
- .typeName("i")
- .typePropertyName("j")
- .wo("k")
- .writeOnlyProperties("l")
- .xp("m")
- .build();
-
- Bean a2 = BeanAnnotation.create()
- .description("a")
- .dictionary(X1.class)
- .example("b")
- .excludeProperties("c")
- .findFluentSetters(true)
- .implClass(X1.class)
- .interceptor(X2.class)
- .interfaceClass(X1.class)
- .p("e")
- .properties("f")
- .propertyNamer(BasicPropertyNamer.class)
- .readOnlyProperties("g")
- .ro("h")
- .unsorted(true)
- .stopClass(X1.class)
- .typeName("i")
- .typePropertyName("j")
- .wo("k")
- .writeOnlyProperties("l")
- .xp("m")
- .build();
-
- @Test void a01_basic() {
- assertBean(a1,
- "description,dictionary,example,excludeProperties,findFluentSetters,implClass,interceptor,interfaceClass,p,properties,propertyNamer,readOnlyProperties,ro,stopClass,typeName,typePropertyName,unsorted,wo,writeOnlyProperties,xp",
- "[a],[X1],b,c,true,X1,X2,X1,e,f,BasicPropertyNamer,g,h,X1,i,j,true,k,l,m");
- }
-
- @Test void a02_testEquivalency() {
- assertEquals(a2, a1);
- assertNotEquals(0, a1.hashCode());
- assertNotEquals(-1, a1.hashCode());
- assertEquals(a1.hashCode(), a2.hashCode());
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // PropertyStore equivalency.
- //------------------------------------------------------------------------------------------------------------------
-
- @Test void b01_testEquivalencyInPropertyStores() {
- var b1 = BeanContext.create().annotations(a1).build();
- var b2 = BeanContext.create().annotations(a2).build();
- assertSame(b1, b2);
- }
-
- //------------------------------------------------------------------------------------------------------------------
- // Comparison with declared annotations.
- //------------------------------------------------------------------------------------------------------------------
-
- @Bean(
- description={ "a" },
- dictionary=X1.class,
- example="b",
- excludeProperties="c",
- findFluentSetters=true,
- implClass=X1.class,
- interceptor=X2.class,
- interfaceClass=X1.class,
- p="e",
- properties="f",
- propertyNamer=BasicPropertyNamer.class,
- readOnlyProperties="g",
- ro="h",
- unsorted=true,
- stopClass=X1.class,
- typeName="i",
- typePropertyName="j",
- wo="k",
- writeOnlyProperties="l",
- xp="m"
- )
- public static class D1 {}
- Bean d1 = D1.class.getAnnotationsByType(Bean.class)[0];
-
- @Bean(
- description={ "a" },
- dictionary=X1.class,
- example="b",
- excludeProperties="c",
- findFluentSetters=true,
- implClass=X1.class,
- interceptor=X2.class,
- interfaceClass=X1.class,
- p="e",
- properties="f",
- propertyNamer=BasicPropertyNamer.class,
- readOnlyProperties="g",
- ro="h",
- unsorted=true,
- stopClass=X1.class,
- typeName="i",
- typePropertyName="j",
- wo="k",
- writeOnlyProperties="l",
- xp="m"
- )
- public static class D2 {}
- Bean d2 = D2.class.getAnnotationsByType(Bean.class)[0];
-
- @Test void d01_comparisonWithDeclarativeAnnotations() {
- assertEqualsAll(a1, d1, d2);
- assertNotEqualsAny(a1.hashCode(), 0, -1);
- assertEqualsAll(a1.hashCode(), d1.hashCode(), d2.hashCode());
- }
-}
\ No newline at end of file
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
index b194654af3..a6e63ce689 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
@@ -73,8 +73,8 @@ class BeanConfigAnnotation_Test extends TestBase {
if (t instanceof Map.Entry e) {
return apply(e.getKey()) + "=" + apply(e.getValue());
}
- if (t instanceof BeanFilter)
- return ((BeanFilter)t).getBeanClass().getNameSimple();
+ if (t instanceof MarshalledFilter)
+ return ((MarshalledFilter)t).getBeanClass().getNameSimple();
if (t instanceof Class)
return ((Class<?>)t).getSimpleName();
if (t instanceof ClassInfo)
@@ -93,17 +93,17 @@ class BeanConfigAnnotation_Test extends TestBase {
// Basic tests
//-----------------------------------------------------------------------------------------------------------------
- @Bean(typeName="A1")
+ @Marshalled(typeName="A1")
public static class A1 {
public int foo;
@Override
public String toString() {return Json5.of(this);}
}
- @Bean(typeName="A2")
+ @Marshalled(typeName="A2")
public static class A2 {
public int foo;
}
- @Bean(typeName="A3")
+ @Marshalled(typeName="A3")
public static class A3 {
public int foo;
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
index ffb334ae98..0e17299f0c 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledAnnotation_Test.java
@@ -21,14 +21,13 @@ import static org.apache.juneau.junit.bct.BctAssertions.*;
import static org.junit.jupiter.api.Assertions.*;
import org.apache.juneau.*;
+import org.apache.juneau.swap.*;
import org.junit.jupiter.api.*;
-@SuppressWarnings({
- "java:S1186" // Empty test method intentional for framework testing
-})
class MarshalledAnnotation_Test extends TestBase {
private static class X1 {}
+ private static class X2 extends BeanInterceptor<MarshalledAnnotation_Test> {}
//------------------------------------------------------------------------------------------------------------------
// Basic tests
@@ -36,23 +35,60 @@ class MarshalledAnnotation_Test extends TestBase {
Marshalled a1 = MarshalledAnnotation.create()
.description("a")
+ .dictionary(X1.class)
.example("b")
+ .excludeProperties("c")
+ .findFluentSetters(true)
.implClass(X1.class)
+ .interceptor(X2.class)
+ .interfaceClass(X1.class)
+ .p("e")
+ .properties("f")
+ .propertyNamer(BasicPropertyNamer.class)
+ .readOnlyProperties("g")
+ .ro("h")
+ .unsorted(true)
+ .stopClass(X1.class)
+ .typeName("i")
+ .typePropertyName("j")
+ .wo("k")
+ .writeOnlyProperties("l")
+ .xp("m")
.build();
Marshalled a2 = MarshalledAnnotation.create()
.description("a")
+ .dictionary(X1.class)
.example("b")
+ .excludeProperties("c")
+ .findFluentSetters(true)
.implClass(X1.class)
+ .interceptor(X2.class)
+ .interfaceClass(X1.class)
+ .p("e")
+ .properties("f")
+ .propertyNamer(BasicPropertyNamer.class)
+ .readOnlyProperties("g")
+ .ro("h")
+ .unsorted(true)
+ .stopClass(X1.class)
+ .typeName("i")
+ .typePropertyName("j")
+ .wo("k")
+ .writeOnlyProperties("l")
+ .xp("m")
.build();
@Test void a01_basic() {
- assertBean(a1, "description,example,implClass", "[a],b,X1");
+ assertBean(a1,
+ "description,dictionary,example,excludeProperties,findFluentSetters,implClass,interceptor,interfaceClass,p,properties,propertyNamer,readOnlyProperties,ro,stopClass,typeName,typePropertyName,unsorted,wo,writeOnlyProperties,xp",
+ "[a],[X1],b,c,true,X1,X2,X1,e,f,BasicPropertyNamer,g,h,X1,i,j,true,k,l,m");
}
@Test void a02_testEquivalency() {
assertEquals(a2, a1);
- assertNotEqualsAny(a1.hashCode(), 0, -1);
+ assertNotEquals(0, a1.hashCode());
+ assertNotEquals(-1, a1.hashCode());
assertEquals(a1.hashCode(), a2.hashCode());
}
@@ -61,9 +97,9 @@ class MarshalledAnnotation_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
@Test void b01_testEquivalencyInPropertyStores() {
- var bc1 = BeanContext.create().annotations(a1).build();
- var bc2 = BeanContext.create().annotations(a2).build();
- assertSame(bc1, bc2);
+ var b1 = BeanContext.create().annotations(a1).build();
+ var b2 = BeanContext.create().annotations(a2).build();
+ assertSame(b1, b2);
}
//------------------------------------------------------------------------------------------------------------------
@@ -72,16 +108,50 @@ class MarshalledAnnotation_Test extends TestBase {
@Marshalled(
description={ "a" },
+ dictionary=X1.class,
example="b",
- implClass=X1.class
+ excludeProperties="c",
+ findFluentSetters=true,
+ implClass=X1.class,
+ interceptor=X2.class,
+ interfaceClass=X1.class,
+ p="e",
+ properties="f",
+ propertyNamer=BasicPropertyNamer.class,
+ readOnlyProperties="g",
+ ro="h",
+ unsorted=true,
+ stopClass=X1.class,
+ typeName="i",
+ typePropertyName="j",
+ wo="k",
+ writeOnlyProperties="l",
+ xp="m"
)
public static class D1 {}
Marshalled d1 = D1.class.getAnnotationsByType(Marshalled.class)[0];
@Marshalled(
description={ "a" },
+ dictionary=X1.class,
example="b",
- implClass=X1.class
+ excludeProperties="c",
+ findFluentSetters=true,
+ implClass=X1.class,
+ interceptor=X2.class,
+ interfaceClass=X1.class,
+ p="e",
+ properties="f",
+ propertyNamer=BasicPropertyNamer.class,
+ readOnlyProperties="g",
+ ro="h",
+ unsorted=true,
+ stopClass=X1.class,
+ typeName="i",
+ typePropertyName="j",
+ wo="k",
+ writeOnlyProperties="l",
+ xp="m"
)
public static class D2 {}
Marshalled d2 = D2.class.getAnnotationsByType(Marshalled.class)[0];
@@ -91,4 +161,4 @@ class MarshalledAnnotation_Test extends TestBase {
assertNotEqualsAny(a1.hashCode(), 0, -1);
assertEqualsAll(a1.hashCode(), d1.hashCode(), d2.hashCode());
}
-}
+}
\ No newline at end of file
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
similarity index 81%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
index 3382141c55..9e1a24bb16 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/Bean_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
@@ -28,17 +28,17 @@ import org.apache.juneau.svl.*;
import org.junit.jupiter.api.*;
@SuppressWarnings({
- "unused" // Private and package classes required for @Bean visibility testing
+ "unused" // Private and package classes required for @Marshalled visibility testing
})
-class Bean_Test extends TestBase {
+class Marshalled_Test extends TestBase {
static VarResolverSession vr = VarResolver.create().vars(XVar.class).build().createSession();
//------------------------------------------------------------------------------------------------------------------
- // @Bean annotation overrides visibility rules on class and constructor.
+ // @Marshalled annotation overrides visibility rules on class and constructor.
//------------------------------------------------------------------------------------------------------------------
- @Bean
+ @Marshalled
private static class A1 {
public int f1;
@@ -57,9 +57,9 @@ class Bean_Test extends TestBase {
assertEquals("{f1:1}", json);
}
- @BeanApply(on="Dummy1",value=@Bean())
- @BeanApply(on="A2",value=@Bean())
- @BeanApply(on="Dummy2",value=@Bean())
+ @MarshalledApply(on="Dummy1",value=@Marshalled())
+ @MarshalledApply(on="A2",value=@Marshalled())
+ @MarshalledApply(on="Dummy2",value=@Marshalled())
private static class A2Config {}
private static class A2 {
@@ -169,10 +169,10 @@ class Bean_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // @Bean(on=X,properties=) should override @Bean(properties=)
+ // @Marshalled(on=X,properties=) should override @Marshalled(properties=)
//-----------------------------------------------------------------------------------------------------------------
- @Bean(properties="a,b,c", excludeProperties="b")
+ @Marshalled(properties="a,b,c", excludeProperties="b")
static class D1 {
public int a, b, c, d;
@@ -186,7 +186,7 @@ class Bean_Test extends TestBase {
}
}
- @Bean(p="a,b,c", xp="b")
+ @Marshalled(p="a,b,c", xp="b")
static class D2 {
public int a, b, c, d;
@@ -200,9 +200,9 @@ class Bean_Test extends TestBase {
}
}
- @BeanApply(on="Dummy",value=@Bean(p="b,c,d",xp="c"))
- @BeanApply(on="D1",value=@Bean(properties="b,c,d",excludeProperties="c"))
- @BeanApply(on="D2",value=@Bean(p="b,c,d",xp="c"))
+ @MarshalledApply(on="Dummy",value=@Marshalled(p="b,c,d",xp="c"))
+ @MarshalledApply(on="D1",value=@Marshalled(properties="b,c,d",excludeProperties="c"))
+ @MarshalledApply(on="D2",value=@Marshalled(p="b,c,d",xp="c"))
static class DConfig {}
private static ClassInfo dConfig = ClassInfo.of(DConfig.class);
@@ -248,7 +248,7 @@ class Bean_Test extends TestBase {
}
@Test void d05_beanPropertiesExcludePropertiesCombined_beanContextBuilderOverride() throws Exception {
- var ba = BeanApplyAnnotation.create("D1").value(BeanAnnotation.create().properties("b,c,d").excludeProperties("c").build()).build();
+ var ba = MarshalledApplyAnnotation.create("D1").value(MarshalledAnnotation.create().properties("b,c,d").excludeProperties("c").build()).build();
var js = Json5Serializer.create().annotations(ba).build();
var jp = Json5Parser.create().annotations(ba).build();
@@ -260,7 +260,7 @@ class Bean_Test extends TestBase {
}
@Test void d06_beanPXpCombined_beanContextBuilderOverride() throws Exception {
- var ba = BeanApplyAnnotation.create("D2").value(BeanAnnotation.create().p("b,c,d").xp("c").build()).build();
+ var ba = MarshalledApplyAnnotation.create("D2").value(MarshalledAnnotation.create().p("b,c,d").xp("c").build()).build();
var js = Json5Serializer.create().annotations(ba).build();
var jp = Json5Parser.create().annotations(ba).build();
@@ -272,15 +272,15 @@ class Bean_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi/bpx) should override @Bean(bpi/bpx)
+ // @BeanConfig(bpi/bpx) should override @Marshalled(bpi/bpx)
//-----------------------------------------------------------------------------------------------------------------
- @Bean(properties="a,b,c")
+ @Marshalled(properties="a,b,c")
static class E1a {
public int a, b, c, d;
}
- @Bean(excludeProperties="b")
+ @Marshalled(excludeProperties="b")
static class E1 extends E1a {
public static E1 create() {
@@ -293,12 +293,12 @@ class Bean_Test extends TestBase {
}
}
- @Bean(p="a,b,c")
+ @Marshalled(p="a,b,c")
static class E2a {
public int a, b, c, d;
}
- @Bean(xp="b")
+ @Marshalled(xp="b")
static class E2 extends E2a {
public static E2 create() {
@@ -311,14 +311,14 @@ class Bean_Test extends TestBase {
}
}
- @BeanApply(on="Dummy",value=@Bean(p="b,c,d",xp="c"))
- @BeanApply(on="E1",value=@Bean(properties="b,c,d",excludeProperties="c"))
- @BeanApply(on="E2",value=@Bean(p="b,c,d",xp="c"))
+ @MarshalledApply(on="Dummy",value=@Marshalled(p="b,c,d",xp="c"))
+ @MarshalledApply(on="E1",value=@Marshalled(properties="b,c,d",excludeProperties="c"))
+ @MarshalledApply(on="E2",value=@Marshalled(p="b,c,d",xp="c"))
static class EConfig {}
private static ClassInfo eConfig = ClassInfo.of(EConfig.class);
- @Test void e01_beanPropertiesExcludePropertiesCombined_multipleBeanAnnotations_noBeanConfig() throws Exception {
+ @Test void e01_beanPropertiesExcludePropertiesCombined_multipleMarshalledAnnotations_noBeanConfig() throws Exception {
var json = Json5.of(E1.create());
assertEquals("{a:1,c:3}", json);
var e = Json5.DEFAULT.read(json, E1.class);
@@ -326,7 +326,7 @@ class Bean_Test extends TestBase {
assertEquals("{a:1,c:3}", json);
}
- @Test void e02_beanPXpCombined_multipleBeanAnnotations_noBeanConfig() throws Exception {
+ @Test void e02_beanPXpCombined_multipleMarshalledAnnotations_noBeanConfig() throws Exception {
var json = Json5.of(E2.create());
assertEquals("{a:1,c:3}", json);
var e = Json5.DEFAULT.read(json, E2.class);
@@ -334,7 +334,7 @@ class Bean_Test extends TestBase {
assertEquals("{a:1,c:3}", json);
}
- @Test void e03_beanPropertiesExcludePropertiesCombined_multipleBeanAnnotations_beanConfigOverride() throws Exception {
+ @Test void e03_beanPropertiesExcludePropertiesCombined_multipleMarshalledAnnotations_beanConfigOverride() throws Exception {
var al = AnnotationWorkList.of(vr, rstream(eConfig.getAnnotations()));
var js = Json5Serializer.create().apply(al).build();
var jp = Json5Parser.create().apply(al).build();
@@ -346,7 +346,7 @@ class Bean_Test extends TestBase {
assertEquals("{b:2,d:4}", json);
}
- @Test void e04_beanPXpCombined_multipleBeanAnnotations_beanConfigOverride() throws Exception {
+ @Test void e04_beanPXpCombined_multipleMarshalledAnnotations_beanConfigOverride() throws Exception {
var al = AnnotationWorkList.of(vr, rstream(eConfig.getAnnotations()));
var js = Json5Serializer.create().apply(al).build();
var jp = Json5Parser.create().apply(al).build();
@@ -358,8 +358,8 @@ class Bean_Test extends TestBase {
assertEquals("{b:2,d:4}", json);
}
- @Test void e05_beanPropertiersExcludePropertiesCombined_multipleBeanAnnotations_beanContextBuilderOverride() throws Exception {
- var ba = BeanApplyAnnotation.create("E1").value(BeanAnnotation.create().properties("b,c,d").excludeProperties("c").build()).build();
+ @Test void e05_beanPropertiersExcludePropertiesCombined_multipleMarshalledAnnotations_beanContextBuilderOverride() throws Exception {
+ var ba = MarshalledApplyAnnotation.create("E1").value(MarshalledAnnotation.create().properties("b,c,d").excludeProperties("c").build()).build();
var js = Json5Serializer.create().annotations(ba).build();
var jp = Json5Parser.create().annotations(ba).build();
@@ -370,8 +370,8 @@ class Bean_Test extends TestBase {
assertEquals("{b:2,d:4}", json);
}
... 1617 lines suppressed ...