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:12 UTC
(juneau) branch master updated (c24f4004ef -> 75aa50426d)
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
from c24f4004ef test: fill in coverage gaps for inject and builder classes; fix Javadoc links and remove CreatableBeanStore
new 71c08ff1f9 refactor(marshall): merge @Bean/@Marshalled annotation surfaces into unified @Marshalled family
new daad68faf1 refactor(marshall): rename Beanp/Beanc/BeanIgnore to MarshalledProp/MarshalledCtor/MarshalledIgnore; add @Marshalled(as=STRING) strategy
new 05d2cc86da refactor(marshall): rename @BeanConfig/@BeanConfigAnnotation to @MarshalledConfig family
new 8492c65081 refactor(marshall): rename BeanContext/BeanSession engine types to MarshallingContext/MarshallingSession family
new 75aa50426d refactor(inject): introduce commons.inject.@Bean as successor to @RestInject; delete @RestInject
The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
RELEASE-NOTES.txt | 20 +-
docs/src/javadoc/overview.html | 2 +-
.../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 +-
.../org/apache/juneau/bean/html5/HtmlElement.java | 4 +-
.../juneau/bean/html5/HtmlElementContainer.java | 4 +-
.../apache/juneau/bean/html5/HtmlElementMixed.java | 4 +-
.../juneau/bean/html5/HtmlElementRawText.java | 4 +-
.../apache/juneau/bean/html5/HtmlElementText.java | 4 +-
.../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 | 4 +-
.../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 +-
.../org/apache/juneau/bean/html5/package2.html | 6 +-
.../apache/juneau/bean/jsonschema/JsonSchema.java | 70 +-
.../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 | 4 +-
.../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 +-
.../apache/juneau/bean/openapi3/HeaderInfo.java | 8 +-
.../org/apache/juneau/bean/openapi3/Items.java | 4 +-
.../org/apache/juneau/bean/openapi3/MediaType.java | 4 +-
.../juneau/bean/openapi3/OpenApiElement.java | 8 +-
.../apache/juneau/bean/openapi3/SchemaInfo.java | 4 +-
.../apache/juneau/bean/openapi3/ui/OpenApiUI.java | 2 +-
.../org/apache/juneau/bean/swagger/HeaderInfo.java | 4 +-
.../java/org/apache/juneau/bean/swagger/Items.java | 4 +-
.../org/apache/juneau/bean/swagger/SchemaInfo.java | 4 +-
.../apache/juneau/bean/swagger/SwaggerElement.java | 6 +-
.../apache/juneau/bean/swagger/ui/SwaggerUI.java | 2 +-
.../commons/annotation/AnnotationObject.java | 8 +-
.../annotation/AppliedAnnotationObject.java | 4 +-
.../annotation/AppliedOnClassAnnotationObject.java | 8 +-
.../{BeanIgnore.java => MarshalledIgnore.java} | 6 +-
.../juneau/commons/conversion/BasicConverter.java | 2 +-
.../juneau/commons/conversion/Converter.java | 2 +-
.../juneau/commons/function/BeanChannel.java | 2 +-
.../juneau/commons/function/BeanConsumer.java | 2 +-
.../juneau/commons/function/BeanFactory.java | 10 +-
.../juneau/commons/function/BeanSupplier.java | 2 +-
.../juneau/commons/function/ListBeanChannel.java | 2 +-
.../juneau/commons/function/package-info.java | 24 +-
.../apache/juneau/commons/http/MediaRanges.java | 4 +-
.../org/apache/juneau/commons/http/MediaType.java | 4 +-
.../apache/juneau/commons/http/StringRange.java | 4 +-
.../apache/juneau/commons/http/StringRanges.java | 4 +-
.../org/apache/juneau/commons/inject/Bean.java | 190 ++++
.../juneau/commons/inject/BeanAnnotation.java | 46 +-
.../juneau/commons/inject/BeanInstantiator.java | 2 +-
.../apache/juneau/commons/inject/BeanStore.java | 4 +-
.../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 +-
.../apache/juneau/commons/reflect/Visibility.java | 8 +-
.../main/java/org/apache/juneau/config/Config.java | 6 +-
.../main/java/org/apache/juneau/config/Entry.java | 2 +-
.../java/org/apache/juneau/config/Section.java | 4 +-
.../apache/juneau/jena/RdfBeanPropertyMeta.java | 2 +-
.../java/org/apache/juneau/jena/RdfParser.java | 10 +-
.../java/org/apache/juneau/jena/RdfSerializer.java | 10 +-
.../juneau/jena/annotation/RdfAnnotation.java | 2 +-
.../juneau/jena/annotation/RdfApplyAnnotation.java | 2 +-
.../main/java/org/apache/juneau/marshaller/N3.java | 4 +-
.../java/org/apache/juneau/marshaller/NTriple.java | 4 +-
.../java/org/apache/juneau/marshaller/RdfXml.java | 4 +-
.../org/apache/juneau/marshaller/RdfXmlAbbrev.java | 4 +-
.../java/org/apache/juneau/marshaller/Turtle.java | 4 +-
.../java/org/apache/juneau/AnnotationApplier.java | 16 +-
.../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 | 34 +-
.../main/java/org/apache/juneau/BeanMapEntry.java | 2 +-
.../src/main/java/org/apache/juneau/BeanMeta.java | 290 +++---
.../java/org/apache/juneau/BeanMetaFiltered.java | 4 +-
.../java/org/apache/juneau/BeanPropertyMeta.java | 52 +-
.../apache/juneau/BeanProxyInvocationHandler.java | 8 +-
.../main/java/org/apache/juneau/BeanRegistry.java | 12 +-
.../src/main/java/org/apache/juneau/ClassMeta.java | 154 +--
.../src/main/java/org/apache/juneau/Context.java | 36 +-
.../src/main/java/org/apache/juneau/Context.txt | 10 +-
.../java/org/apache/juneau/ContextSession.java | 2 +-
.../main/java/org/apache/juneau/ContextSession.txt | 10 +-
.../java/org/apache/juneau/MarshalledFilter.java | 654 ++++++++++++-
.../{BeanContext.java => MarshallingContext.java} | 464 ++++-----
...ontextable.java => MarshallingContextable.java} | 306 +++---
...ion.java => MarshallingRecursionException.java} | 4 +-
.../{BeanSession.java => MarshallingSession.java} | 130 +--
...ontext.java => MarshallingTraverseContext.java} | 30 +-
...ession.java => MarshallingTraverseSession.java} | 46 +-
.../main/java/org/apache/juneau/PropertyNamer.java | 2 +-
.../main/java/org/apache/juneau/UriContext.java | 4 +-
.../java/org/apache/juneau/annotation/Bean.java | 539 -----------
.../apache/juneau/annotation/BeanAnnotation.java | 492 ----------
.../juneau/annotation/BeanApplyAnnotation.java | 231 -----
.../apache/juneau/annotation/BeanIgnoreApply.java | 99 --
.../juneau/annotation/ExampleAnnotation.java | 2 +-
.../juneau/annotation/ExampleApplyAnnotation.java | 2 +-
.../juneau/annotation/ExternalDocsAnnotation.java | 2 +-
.../apache/juneau/annotation/ItemsAnnotation.java | 2 +-
.../org/apache/juneau/annotation/Marshalled.java | 423 +++++++-
.../juneau/annotation/MarshalledAnnotation.java | 370 ++++++-
.../annotation/MarshalledApplyAnnotation.java | 29 +-
.../MarshalledAs.java} | 30 +-
.../{BeanConfig.java => MarshalledConfig.java} | 106 +--
...tation.java => MarshalledConfigAnnotation.java} | 18 +-
.../annotation/{Beanc.java => MarshalledCtor.java} | 12 +-
...notation.java => MarshalledCtorAnnotation.java} | 28 +-
.../{BeancApply.java => MarshalledCtorApply.java} | 20 +-
...ion.java => MarshalledCtorApplyAnnotation.java} | 50 +-
.../{BeanIgnore.java => MarshalledIgnore.java} | 31 +-
...tation.java => MarshalledIgnoreAnnotation.java} | 28 +-
.../{BeanApply.java => MarshalledIgnoreApply.java} | 20 +-
...n.java => MarshalledIgnoreApplyAnnotation.java} | 50 +-
.../annotation/{Beanp.java => MarshalledProp.java} | 82 +-
...notation.java => MarshalledPropAnnotation.java} | 66 +-
.../{BeanpApply.java => MarshalledPropApply.java} | 20 +-
...ion.java => MarshalledPropApplyAnnotation.java} | 50 +-
.../juneau/annotation/NamePropertyAnnotation.java | 2 +-
.../annotation/NamePropertyApplyAnnotation.java | 2 +-
.../annotation/ParentPropertyAnnotation.java | 2 +-
.../annotation/ParentPropertyApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/SchemaAnnotation.java | 2 +-
.../juneau/annotation/SchemaApplyAnnotation.java | 2 +-
.../juneau/annotation/SubItemsAnnotation.java | 2 +-
.../java/org/apache/juneau/annotation/Swap.java | 4 +-
.../apache/juneau/annotation/SwapAnnotation.java | 2 +-
.../juneau/annotation/SwapApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/UriAnnotation.java | 2 +-
.../juneau/annotation/UriApplyAnnotation.java | 2 +-
.../bson/annotation/BsonApplyAnnotation.java | 2 +-
.../juneau/cbor/annotation/CborAnnotation.java | 2 +-
.../cbor/annotation/CborApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/collections/Args.java | 4 +-
.../org/apache/juneau/collections/JsonList.java | 34 +-
.../org/apache/juneau/collections/JsonMap.java | 40 +-
.../main/java/org/apache/juneau/csv/CsvParser.java | 10 +-
.../java/org/apache/juneau/csv/CsvSerializer.java | 10 +-
.../apache/juneau/hjson/HjsonParserSession.java | 2 +-
.../org/apache/juneau/hjson/HjsonSerializer.java | 2 +-
.../hjson/annotation/HjsonApplyAnnotation.java | 2 +-
.../hocon/annotation/HoconApplyAnnotation.java | 2 +-
.../org/apache/juneau/html/HtmlDocSerializer.java | 12 +-
.../java/org/apache/juneau/html/HtmlParser.java | 10 +-
.../juneau/html/HtmlSchemaDocSerializer.java | 22 +-
.../html/HtmlSchemaDocSerializerSession.java | 2 +-
.../apache/juneau/html/HtmlSchemaSerializer.java | 20 +-
.../juneau/html/HtmlSchemaSerializerSession.java | 2 +-
.../org/apache/juneau/html/HtmlSerializer.java | 12 +-
.../juneau/html/HtmlStrippedDocSerializer.java | 10 +-
.../juneau/html/annotation/HtmlAnnotation.java | 2 +-
.../html/annotation/HtmlApplyAnnotation.java | 2 +-
.../juneau/html/annotation/HtmlLinkAnnotation.java | 2 +-
.../html/annotation/HtmlLinkApplyAnnotation.java | 2 +-
.../apache/juneau/httppart/BaseHttpPartParser.java | 8 +-
.../juneau/httppart/BaseHttpPartSerializer.java | 4 +-
.../org/apache/juneau/httppart/HttpPartParser.java | 4 +-
.../apache/juneau/httppart/HttpPartSerializer.java | 4 +-
.../apache/juneau/ini/IniSerializerSession.java | 2 +-
.../juneau/ini/annotation/IniApplyAnnotation.java | 2 +-
.../org/apache/juneau/internal/ConverterUtils.java | 12 +-
.../apache/juneau/internal/DelegateBeanMap.java | 2 +-
.../org/apache/juneau/internal/DelegateList.java | 2 +-
.../org/apache/juneau/internal/DelegateMap.java | 2 +-
.../java/org/apache/juneau/json/JsonParser.java | 12 +-
.../apache/juneau/json/JsonSchemaSerializer.java | 20 +-
.../juneau/json/JsonSchemaSerializerSession.java | 2 +-
.../org/apache/juneau/json/JsonSerializer.java | 14 +-
.../juneau/json/annotation/JsonAnnotation.java | 2 +-
.../json/annotation/JsonApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/json5/Json5Parser.java | 10 +-
.../org/apache/juneau/json5/Json5Serializer.java | 10 +-
.../juneau/jsonschema/BasicBeanDefMapper.java | 10 +-
.../juneau/jsonschema/JsonSchemaGenerator.java | 48 +-
.../jsonschema/JsonSchemaGeneratorSession.java | 20 +-
...eanDefMapper.java => MarshallingDefMapper.java} | 4 +-
.../jsonschema/annotation/JsonSchemaConfig.java | 18 +-
.../org/apache/juneau/markdown/MarkdownParser.java | 10 +-
.../juneau/markdown/MarkdownParserSession.java | 2 +-
.../apache/juneau/markdown/MarkdownSerializer.java | 10 +-
.../juneau/markdown/MarkdownSerializerSession.java | 2 +-
.../annotation/MarkdownApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/marshaller/Bson.java | 4 +-
.../apache/juneau/marshaller/CharMarshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/Csv.java | 4 +-
.../java/org/apache/juneau/marshaller/Html.java | 4 +-
.../java/org/apache/juneau/marshaller/Jcs.java | 4 +-
.../java/org/apache/juneau/marshaller/Json.java | 4 +-
.../java/org/apache/juneau/marshaller/Json5.java | 4 +-
.../java/org/apache/juneau/marshaller/Jsonl.java | 4 +-
.../org/apache/juneau/marshaller/Markdown.java | 4 +-
.../org/apache/juneau/marshaller/MarkdownDoc.java | 4 +-
.../org/apache/juneau/marshaller/Marshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/MsgPack.java | 4 +-
.../java/org/apache/juneau/marshaller/OpenApi.java | 4 +-
.../java/org/apache/juneau/marshaller/Parquet.java | 2 +-
.../org/apache/juneau/marshaller/PlainText.java | 4 +-
.../apache/juneau/marshaller/StreamMarshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/Uon.java | 4 +-
.../org/apache/juneau/marshaller/UrlEncoding.java | 4 +-
.../java/org/apache/juneau/marshaller/Xml.java | 4 +-
.../java/org/apache/juneau/marshaller/Yaml.java | 4 +-
.../org/apache/juneau/msgpack/MsgPackParser.java | 10 +-
.../apache/juneau/msgpack/MsgPackSerializer.java | 10 +-
.../msgpack/annotation/MsgPackAnnotation.java | 2 +-
.../msgpack/annotation/MsgPackApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/oapi/OpenApiParser.java | 10 +-
.../apache/juneau/oapi/OpenApiParserSession.java | 4 +-
.../org/apache/juneau/oapi/OpenApiSerializer.java | 10 +-
.../juneau/oapi/OpenApiSerializerSession.java | 2 +-
.../juneau/oapi/annotation/OpenApiAnnotation.java | 2 +-
.../oapi/annotation/OpenApiApplyAnnotation.java | 2 +-
.../juneau/objecttools/ObjectIntrospector.java | 2 +-
.../apache/juneau/objecttools/ObjectPaginator.java | 6 +-
.../org/apache/juneau/objecttools/ObjectRest.java | 10 +-
.../apache/juneau/objecttools/ObjectSearcher.java | 12 +-
.../apache/juneau/objecttools/ObjectSorter.java | 8 +-
.../org/apache/juneau/objecttools/ObjectTool.java | 2 +-
.../apache/juneau/objecttools/ObjectViewer.java | 6 +-
.../juneau/parquet/ParquetParserSession.java | 18 +-
.../juneau/parquet/ParquetSchemaBuilder.java | 30 +-
.../juneau/parquet/ParquetSerializerSession.java | 14 +-
.../parquet/annotation/ParquetApplyAnnotation.java | 2 +-
.../apache/juneau/parser/InputStreamParser.java | 10 +-
.../main/java/org/apache/juneau/parser/Parser.java | 18 +-
.../org/apache/juneau/parser/ParserListener.java | 2 +-
.../org/apache/juneau/parser/ParserSession.java | 20 +-
.../java/org/apache/juneau/parser/ParserSet.java | 12 +-
.../org/apache/juneau/parser/ReaderParser.java | 10 +-
.../apache/juneau/plaintext/PlainTextParser.java | 10 +-
.../juneau/plaintext/PlainTextSerializer.java | 10 +-
.../plaintext/annotation/PlainTextAnnotation.java | 2 +-
.../annotation/PlainTextApplyAnnotation.java | 2 +-
.../juneau/proto/annotation/ProtoAnnotation.java | 2 +-
.../proto/annotation/ProtoApplyAnnotation.java | 2 +-
.../juneau/serializer/OutputStreamSerializer.java | 10 +-
.../org/apache/juneau/serializer/Serializer.java | 22 +-
.../juneau/serializer/SerializerSession.java | 16 +-
.../apache/juneau/serializer/SerializerSet.java | 12 +-
.../apache/juneau/serializer/WriterSerializer.java | 10 +-
.../serializer/annotation/SerializerConfig.java | 16 +-
.../org/apache/juneau/soap/SoapXmlSerializer.java | 10 +-
.../org/apache/juneau/svl/ResolvingJsonMap.java | 4 +-
.../java/org/apache/juneau/swap/AutoListSwap.java | 44 +-
.../java/org/apache/juneau/swap/AutoMapSwap.java | 44 +-
.../org/apache/juneau/swap/AutoNumberSwap.java | 70 +-
.../org/apache/juneau/swap/AutoObjectSwap.java | 42 +-
.../AutoStringSwap.java} | 36 +-
.../java/org/apache/juneau/swap/BuilderSwap.java | 8 +-
.../org/apache/juneau/swap/FunctionalSwap.java | 4 +-
.../main/java/org/apache/juneau/swap/MapSwap.java | 4 +-
...nterceptor.java => MarshallingInterceptor.java} | 18 +-
.../java/org/apache/juneau/swap/ObjectSwap.java | 18 +-
.../java/org/apache/juneau/swap/StringSwap.java | 4 +-
.../java/org/apache/juneau/swap/Surrogate.java | 2 +-
.../java/org/apache/juneau/swap/SurrogateSwap.java | 8 +-
.../org/apache/juneau/swaps/ByteArraySwap.java | 12 +-
.../java/org/apache/juneau/swaps/ClassSwap.java | 4 +-
.../org/apache/juneau/swaps/InputStreamSwap.java | 12 +-
.../java/org/apache/juneau/swaps/LocaleSwap.java | 4 +-
...nStringSwap.java => MarshallingStringSwap.java} | 6 +-
.../org/apache/juneau/swaps/MatchResultSwap.java | 2 +-
.../org/apache/juneau/swaps/ParsedReaderSwap.java | 2 +-
.../java/org/apache/juneau/swaps/ReaderSwap.java | 2 +-
.../apache/juneau/swaps/StackTraceElementSwap.java | 4 +-
.../org/apache/juneau/swaps/StringFormatSwap.java | 6 +-
.../apache/juneau/swaps/TemporalCalendarSwap.java | 6 +-
.../org/apache/juneau/swaps/TemporalDateSwap.java | 6 +-
.../java/org/apache/juneau/swaps/TemporalSwap.java | 8 +-
.../java/org/apache/juneau/swaps/TimeZoneSwap.java | 4 +-
.../main/java/org/apache/juneau/swaps/UrlSwap.java | 4 +-
.../juneau/swaps/XMLGregorianCalendarSwap.java | 6 +-
.../java/org/apache/juneau/swaps/ZoneIdSwap.java | 4 +-
.../java/org/apache/juneau/toml/TomlParser.java | 2 +-
.../main/java/org/apache/juneau/uon/UonParser.java | 14 +-
.../java/org/apache/juneau/uon/UonSerializer.java | 10 +-
.../juneau/urlencoding/UrlEncodingParser.java | 10 +-
.../juneau/urlencoding/UrlEncodingSerializer.java | 10 +-
.../annotation/UrlEncodingAnnotation.java | 2 +-
.../annotation/UrlEncodingApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/utils/BeanDiff.java | 12 +-
.../java/org/apache/juneau/utils/ManifestFile.java | 4 +-
...erter.java => MarshallingContextConverter.java} | 24 +-
.../main/java/org/apache/juneau/xml/Namespace.java | 2 +-
.../java/org/apache/juneau/xml/XmlBeanMeta.java | 2 +-
.../org/apache/juneau/xml/XmlBeanPropertyMeta.java | 4 +-
.../main/java/org/apache/juneau/xml/XmlParser.java | 10 +-
.../org/apache/juneau/xml/XmlParserSession.java | 4 +-
.../java/org/apache/juneau/xml/XmlSerializer.java | 10 +-
.../apache/juneau/xml/XmlSerializerSession.java | 4 +-
.../java/org/apache/juneau/xml/annotation/Xml.java | 2 +-
.../juneau/xml/annotation/XmlAnnotation.java | 2 +-
.../juneau/xml/annotation/XmlApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/yaml/YamlParser.java | 10 +-
.../org/apache/juneau/yaml/YamlSerializer.java | 12 +-
.../examples/core/html/HtmlComplexExample.java | 2 +-
.../examples/core/html/HtmlSimpleExample.java | 2 +-
.../examples/core/json/JsonComplexExample.java | 2 +-
.../examples/core/json/JsonSimpleExample.java | 2 +-
.../juneau/examples/core/oapi/OapiExample.java | 2 +-
.../org/apache/juneau/examples/core/pojo/Pojo.java | 2 +-
.../juneau/examples/core/pojo/PojoComplex.java | 2 +-
.../juneau/examples/core/uon/UonExample.java | 2 +-
.../examples/core/xml/XmlComplexExample.java | 2 +-
.../juneau/examples/core/xml/XmlSimpleExample.java | 2 +-
.../examples/rest/springboot/RootResources.java | 2 +-
.../juneau/examples/rest/RequestEchoResource.java | 6 +-
.../apache/juneau/examples/rest/RootResources.java | 2 +-
.../juneau/examples/rest/UtilityBeansResource.java | 2 +-
.../juneau/examples/rest/dto/DtoExamples.java | 2 +-
.../microservice/resources/DirectoryResource.java | 2 +-
.../microservice/resources/LogsResource.java | 2 +-
.../springboot/template/RootResources.java | 2 +-
.../apache/juneau/rest/client/ResponseContent.java | 22 +-
.../org/apache/juneau/rest/client/RestClient.java | 46 +-
.../org/apache/juneau/rest/client/RestRequest.java | 10 +-
.../apache/juneau/rest/client/RestResponse.java | 2 +-
.../juneau/http/annotation/ContactAnnotation.java | 2 +-
.../org/apache/juneau/http/annotation/Header.java | 2 +-
.../juneau/http/annotation/LicenseAnnotation.java | 2 +-
.../juneau/http/annotation/ResponseAnnotation.java | 2 +-
.../juneau/http/annotation/TagAnnotation.java | 2 +-
.../apache/juneau/http/entity/BasicHttpEntity.java | 2 +-
.../org/apache/juneau/http/header/BasicHeader.java | 2 +-
.../org/apache/juneau/http/header/EntityTags.java | 2 +-
.../org/apache/juneau/http/part/BasicPart.java | 2 +-
.../apache/juneau/http/resource/BasicResource.java | 2 +-
.../juneau/http/response/BasicHttpException.java | 2 +-
.../juneau/http/response/BasicHttpResponse.java | 2 +-
.../juneau/httppart/bean/RequestBeanMeta.java | 4 +-
.../juneau/httppart/bean/ResponseBeanMeta.java | 2 +-
.../apache/juneau/rest/mock/MockRestClient.java | 10 +-
.../rest/config/BasicUniversalJenaConfig.java | 4 +-
.../juneau/rest/springboot/SpringRestServlet.java | 3 +-
.../java/org/apache/juneau/rest/RestContext.java | 194 ++--
.../java/org/apache/juneau/rest/RestOpContext.java | 54 +-
.../java/org/apache/juneau/rest/RestRequest.java | 12 +-
.../java/org/apache/juneau/rest/RestResponse.java | 2 +-
.../rest/annotation/OpSwaggerAnnotation.java | 2 +-
.../org/apache/juneau/rest/annotation/Rest.java | 6 +-
.../juneau/rest/annotation/RestAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestDelete.java | 2 +-
.../rest/annotation/RestDeleteAnnotation.java | 2 +-
.../rest/annotation/RestDestroyAnnotation.java | 2 +-
.../rest/annotation/RestEndCallAnnotation.java | 2 +-
.../org/apache/juneau/rest/annotation/RestGet.java | 6 +-
.../juneau/rest/annotation/RestGetAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestInit.java | 8 +-
.../juneau/rest/annotation/RestInitAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestInject.java | 249 -----
.../org/apache/juneau/rest/annotation/RestOp.java | 8 +-
.../juneau/rest/annotation/RestOpAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestOptions.java | 6 +-
.../rest/annotation/RestOptionsAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestPatch.java | 8 +-
.../rest/annotation/RestPatchAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestPost.java | 8 +-
.../juneau/rest/annotation/RestPostAnnotation.java | 2 +-
.../rest/annotation/RestPostCallAnnotation.java | 2 +-
.../rest/annotation/RestPostInitAnnotation.java | 2 +-
.../rest/annotation/RestPreCallAnnotation.java | 2 +-
.../org/apache/juneau/rest/annotation/RestPut.java | 8 +-
.../juneau/rest/annotation/RestPutAnnotation.java | 2 +-
.../rest/annotation/RestStartCallAnnotation.java | 2 +-
.../juneau/rest/annotation/SwaggerAnnotation.java | 2 +-
.../org/apache/juneau/rest/arg/FormDataArg.java | 4 +-
.../org/apache/juneau/rest/arg/HasFormDataArg.java | 2 +-
.../org/apache/juneau/rest/arg/HasQueryArg.java | 2 +-
.../java/org/apache/juneau/rest/arg/HeaderArg.java | 4 +-
.../java/org/apache/juneau/rest/arg/PathArg.java | 2 +-
.../java/org/apache/juneau/rest/arg/QueryArg.java | 4 +-
.../apache/juneau/rest/arg/RestContextArgs.java | 6 +-
.../apache/juneau/rest/beans/BeanDescription.java | 6 +-
.../juneau/rest/beans/ResourceDescription.java | 2 +-
.../juneau/rest/config/BasicJson5Config.java | 4 +-
.../apache/juneau/rest/config/BasicJsonConfig.java | 4 +-
.../juneau/rest/config/BasicJsonHtmlConfig.java | 4 +-
.../juneau/rest/config/BasicOpenApiConfig.java | 4 +-
.../juneau/rest/config/BasicUniversalConfig.java | 4 +-
.../apache/juneau/rest/config/DefaultConfig.java | 2 +-
.../juneau/rest/converter/Introspectable.java | 2 +-
.../apache/juneau/rest/converter/Queryable.java | 2 +-
.../apache/juneau/rest/converter/Traversable.java | 2 +-
.../juneau/rest/httppart/BasicNamedAttribute.java | 2 +-
.../juneau/rest/httppart/RequestAttribute.java | 2 +-
.../juneau/rest/httppart/RequestContent.java | 4 +-
.../juneau/rest/httppart/RequestFormParams.java | 2 +-
.../juneau/rest/httppart/RequestHeaders.java | 2 +-
.../juneau/rest/httppart/RequestHttpPart.java | 4 +-
.../juneau/rest/httppart/RequestPathParams.java | 2 +-
.../juneau/rest/httppart/RequestQueryParams.java | 2 +-
.../rest/processor/PlainTextPojoProcessor.java | 2 +-
.../apache/juneau/rest/rrpc/RrpcRestOpContext.java | 2 +-
.../juneau/rest/servlet/BasicRestOperations.java | 2 +-
.../apache/juneau/rest/stats/RestContextStats.java | 2 +-
.../rest/swagger/BasicSwaggerProviderSession.java | 6 +-
.../org/apache/juneau/rest/widget/Tooltip.java | 2 +-
.../apache/juneau/AnnotationInheritance_Test.java | 44 +-
.../java/org/apache/juneau/Annotations_Test.java | 18 +-
.../java/org/apache/juneau/BasicBeans_Test.java | 4 +-
.../java/org/apache/juneau/BeanMapErrors_Test.java | 40 +-
.../test/java/org/apache/juneau/BeanMap_Test.java | 128 +--
.../org/apache/juneau/BeanPropertyValue_Test.java | 2 +-
.../juneau/BeanProxyInvocationHandler_Test.java | 2 +-
.../java/org/apache/juneau/BeanStreaming_Test.java | 2 +-
.../BeanTraverseProperties_ComboRoundTripTest.java | 12 +-
.../java/org/apache/juneau/ClassMeta_Test.java | 16 +-
.../test/java/org/apache/juneau/ComboInput.java | 4 +-
.../org/apache/juneau/ComboRoundTripTest_Base.java | 2 +-
.../org/apache/juneau/ComboRoundTrip_Tester.java | 12 +-
.../org/apache/juneau/ComboSerialize_Tester.java | 6 +-
.../org/apache/juneau/ContextSession_Test.java | 62 +-
.../org/apache/juneau/DataConversion_Test.java | 2 +-
.../apache/juneau/DynaBean_ComboRoundTripTest.java | 30 +-
.../org/apache/juneau/IgnoredClasses_Test.java | 6 +-
...Config_Test.java => MarshalledConfig_Test.java} | 52 +-
...Filter_Test.java => MarshalledFilter_Test.java} | 26 +-
...text_Test.java => MarshallingContext_Test.java} | 42 +-
.../java/org/apache/juneau/ObjectSwap_Test.java | 4 +-
.../java/org/apache/juneau/PojoExamplesTest.java | 40 +-
.../juneau/ReadWriteOnlyProperties_Test.java | 38 +-
.../SerializerProperties_ComboRoundTripTest.java | 12 +-
.../src/test/java/org/apache/juneau/TestUtils.java | 6 +-
.../src/test/java/org/apache/juneau/a/A1.java | 10 +-
.../juneau/a/rttests/Generics_RoundTripTest.java | 2 +-
.../juneau/a/rttests/JsonMaps_RoundTripTest.java | 2 +-
.../a/rttests/ReadOnlyBeans_RoundTripTest.java | 4 +-
.../juneau/a/rttests/Records_RoundTripTest.java | 36 +-
.../a/rttests/RoundTripAddClassAttrs_Test.java | 12 +-
.../juneau/a/rttests/RoundTripBeanMaps_Test.java | 70 +-
.../a/rttests/RoundTripBeansWithBuilders_Test.java | 14 +-
.../a/rttests/RoundTripTransformBeans_Test.java | 12 +-
.../juneau/annotation/BeanAnnotation_Test.java | 164 ----
.../juneau/annotation/ExampleAnnotation_Test.java | 4 +-
.../annotation/MarshalledAnnotation_Test.java | 92 +-
...t.java => MarshalledConfigAnnotation_Test.java} | 22 +-
...est.java => MarshalledCtorAnnotation_Test.java} | 20 +-
...t.java => MarshalledIgnoreAnnotation_Test.java} | 18 +-
...Ignore_Test.java => MarshalledIgnore_Test.java} | 32 +-
...est.java => MarshalledPropAnnotation_Test.java} | 20 +-
...ava => MarshalledProp_StarPlainField_Test.java} | 20 +-
.../{Bean_Test.java => Marshalled_Test.java} | 84 +-
.../annotation/NamePropertyAnnotation_Test.java | 16 +-
.../annotation/ParentPropertyAnnotation_Test.java | 12 +-
.../juneau/annotation/SwapAnnotation_Test.java | 4 +-
.../juneau/annotation/UriAnnotation_Test.java | 4 +-
.../html5/Html5Template_ComboRoundTripTest.java | 4 +-
.../juneau/bean/html5/HtmlElement_Attr_Test.java | 2 +-
.../juneau/bean/openapi3/ui/OpenApiUI_Test.java | 2 +-
.../juneau/bean/swagger/ui/SwaggerUI_Test.java | 2 +-
.../bson/annotation/BsonAnnotation_Test.java | 4 +-
.../apache/juneau/cbor/CborSerializer_Test.java | 4 +-
.../juneau/commons/collections/Args_Test.java | 2 +-
.../commons/inject/BeanInstantiator_Test.java | 8 +-
.../java/org/apache/juneau/csv/CsvParser_Test.java | 6 +-
.../test/java/org/apache/juneau/csv/Csv_Test.java | 14 +-
.../juneau/csv/annotation/CsvAnnotation_Test.java | 4 +-
.../org/apache/juneau/html/BasicHtml_Test.java | 30 +-
.../org/apache/juneau/html/CommonParser_Test.java | 2 +-
.../java/org/apache/juneau/html/Common_Test.java | 40 +-
.../juneau/html/HtmlSchemaSerializer_Test.java | 4 +-
.../java/org/apache/juneau/html/Html_Test.java | 4 +-
.../html/annotation/HtmlAnnotation_Test.java | 4 +-
.../html/annotation/HtmlLinkAnnotation_Test.java | 4 +-
.../org/apache/juneau/http/HttpParts_Test.java | 12 +-
.../http/annotation/ContactAnnotation_Test.java | 4 +-
.../http/annotation/LicenseAnnotation_Test.java | 4 +-
.../http/annotation/ResponseAnnotation_Test.java | 4 +-
.../juneau/http/annotation/TagAnnotation_Test.java | 4 +-
.../apache/juneau/httppart/UonPartParser_Test.java | 4 +-
.../org/apache/juneau/ini/IniRoundTrip_Test.java | 6 +-
.../org/apache/juneau/jena/RdfParser_Test.java | 10 +-
.../org/apache/juneau/jena/RdfSerializer_Test.java | 20 +-
.../org/apache/juneau/json/CommonParser_Test.java | 2 +-
.../java/org/apache/juneau/json/Common_Test.java | 38 +-
.../json/annotation/JsonAnnotation_Test.java | 4 +-
.../org/apache/juneau/json5/CommonParser_Test.java | 2 +-
.../java/org/apache/juneau/json5/Common_Test.java | 38 +-
.../org/apache/juneau/jsonl/JsonlParser_Test.java | 2 +-
.../apache/juneau/jsonl/JsonlRoundTrip_Test.java | 6 +-
.../java/org/apache/juneau/jsonl/Jsonl_Test.java | 2 +-
.../jsonschema/JsonSchemaConfigAnnotationTest.java | 2 +-
.../juneau/jsonschema/JsonSchemaGeneratorTest.java | 24 +-
.../annotation/ExternalDocsAnnotation_Test.java | 4 +-
.../annotation/ItemsAnnotation_Test.java | 4 +-
.../annotation/SchemaAnnotation_Test.java | 8 +-
.../annotation/SchemaApplyAnnotation_Test.java | 6 +-
.../annotation/SubItemsAnnotation_Test.java | 4 +-
.../juneau/markdown/MarkdownAnnotation_Test.java | 20 +-
.../juneau/markdown/MarkdownParser_Test.java | 6 +-
.../msgpack/annotation/MsgPackAnnotation_Test.java | 4 +-
.../oapi/annotation/OpenApiAnnotation_Test.java | 4 +-
.../juneau/objecttools/ObjectPaginator_Test.java | 2 +-
.../apache/juneau/objecttools/ObjectRest_Test.java | 4 +-
.../juneau/objecttools/ObjectSearcher_Test.java | 2 +-
.../juneau/objecttools/ObjectSorter_Test.java | 2 +-
.../juneau/objecttools/ObjectViewer_Test.java | 2 +-
.../juneau/parquet/ParquetRoundTrip_Test.java | 2 +-
.../org/apache/juneau/parser/ParserSet_Test.java | 14 +-
.../annotation/PlainTextAnnotation_Test.java | 4 +-
.../juneau/rest/RestContext_Builder_Test.java | 16 +-
.../juneau/rest/RestContext_Precedence_Test.java | 76 +-
.../java/org/apache/juneau/rest/Swagger_Test.java | 4 +-
.../juneau/rest/annotation/Content_Test.java | 6 +-
..._Test.java => MarshalledConfig_Swaps_Test.java} | 24 +-
.../rest/annotation/OpSwaggerAnnotation_Test.java | 4 +-
.../rest/annotation/RestAnnotation_Test.java | 4 +-
.../rest/annotation/RestDeleteAnnotation_Test.java | 4 +-
.../annotation/RestDestroyAnnotation_Test.java | 4 +-
.../annotation/RestEndCallAnnotation_Test.java | 4 +-
.../rest/annotation/RestGetAnnotation_Test.java | 4 +-
.../rest/annotation/RestInitAnnotation_Test.java | 4 +-
.../juneau/rest/annotation/RestInit_Test.java | 5 +-
.../rest/annotation/RestOpAnnotation_Test.java | 4 +-
...Test.java => RestOp_MarshalledConfig_Test.java} | 54 +-
.../rest/annotation/RestPostAnnotation_Test.java | 4 +-
.../annotation/RestPostCallAnnotation_Test.java | 4 +-
.../annotation/RestPostInitAnnotation_Test.java | 4 +-
.../annotation/RestPreCallAnnotation_Test.java | 4 +-
.../rest/annotation/RestPutAnnotation_Test.java | 4 +-
.../annotation/RestStartCallAnnotation_Test.java | 4 +-
.../juneau/rest/annotation/Rest_Messages_Test.java | 3 +-
.../rest/annotation/SwaggerAnnotation_Test.java | 4 +-
.../client/RestClient_Config_Context_Test.java | 12 +-
...RestClient_Config_MarshallingContext_Test.java} | 12 +-
.../client/RestClient_Config_Serializer_Test.java | 2 +-
.../rest/client/RestClient_Response_Body_Test.java | 2 +-
.../client/RestClient_Response_Headers_Test.java | 4 +-
.../juneau/serializer/SerializerSet_Test.java | 14 +-
.../java/org/apache/juneau/serializer/TestURI.java | 2 +-
.../org/apache/juneau/serializer/TestURIc.java | 2 +-
.../soap/annotation/SoapXmlAnnotation_Test.java | 4 +-
.../apache/juneau/svl/ResolvingJsonMapTest.java | 2 +-
.../testutils/pojos/ImplicitSwappedObject.java | 2 +-
.../juneau/testutils/pojos/SwappedObjectSwap.java | 4 +-
.../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 +-
.../apache/juneau/transform/AutoListSwapTest.java | 26 +-
.../apache/juneau/transform/AutoMapSwapTest.java | 24 +-
.../juneau/transform/AutoNumberSwapTest.java | 24 +-
.../juneau/transform/AutoObjectSwapTest.java | 24 +-
.../BeanDictionary_ComboRoundTripTest.java | 8 +-
.../org/apache/juneau/transforms/BeanMap_Test.java | 10 +-
.../transforms/Builder_ComboRoundTripTest.java | 2 +-
.../juneau/transforms/DefaultSwaps_Test.java | 58 +-
.../juneau/transforms/FunctionalSwapTest.java | 4 +-
.../InputStreamBase64_OneWayStringSwapTest.java | 4 +-
.../transforms/LocaleSwap_StringSwapTest.java | 2 +-
...Filter_Test.java => MarshalledFilter_Test.java} | 26 +-
.../apache/juneau/transforms/ObjectSwapTest.java | 6 +-
.../juneau/transforms/OneWayStringSwap_Tester.java | 16 +-
.../ReaderObjectSwap_ComboSerializeTest.java | 8 +-
.../apache/juneau/transforms/ReaderSwap_Test.java | 4 +-
.../transforms/RoundTripObjectSwap_Tester.java | 22 +-
.../juneau/transforms/StringSwap_Tester.java | 22 +-
.../SwapsAnnotation_ComboSerializeTest.java | 34 +-
.../TemporalCalendarSwap_StringSwapTest.java | 8 +-
.../TemporalDateSwap_StringSwapTest.java | 8 +-
.../transforms/TemporalSwap_StringSwapTest.java | 8 +-
.../apache/juneau/uon/CommonParser_UonTest.java | 2 +-
.../java/org/apache/juneau/uon/Common_UonTest.java | 20 +-
.../juneau/uon/annotation/UonAnnotation_Test.java | 4 +-
.../urlencoding/CommonParser_UrlEncodingTest.java | 2 +-
.../juneau/urlencoding/Common_UrlEncodingTest.java | 20 +-
.../java/org/apache/juneau/urlencoding/DTOs.java | 6 +-
.../java/org/apache/juneau/urlencoding/DTOs2.java | 6 +-
.../juneau/urlencoding/UrlEncodingParser_Test.java | 2 +-
.../urlencoding/UrlEncodingSerializer_Test.java | 10 +-
.../annotation/UrlEncodingAnnotation_Test.java | 4 +-
.../juneau/utest/utils/FakeReaderParser.java | 4 +-
.../org/apache/juneau/utils/BeanDiff_Test.java | 2 +-
.../org/apache/juneau/utils/FilteredMapTest.java | 4 +-
.../org/apache/juneau/utils/ManifestFile_Test.java | 2 +-
.../java/org/apache/juneau/xml/BasicXml_Test.java | 46 +-
.../java/org/apache/juneau/xml/CommonXml_Test.java | 4 +-
.../java/org/apache/juneau/xml/Common_Test.java | 38 +-
.../org/apache/juneau/xml/XmlCollapsed_Test.java | 6 +-
.../org/apache/juneau/xml/XmlContent_Test.java | 4 +-
.../apache/juneau/xml/XmlIgnoreComments_Test.java | 46 +-
.../test/java/org/apache/juneau/xml/Xml_Test.java | 40 +-
.../juneau/xml/annotation/XmlAnnotation_Test.java | 4 +-
.../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 | 14 +-
scripts/check-fluent-setter-overrides.py | 6 +-
todo/FINISHED-16a-per-setting-inventory.md | 30 +-
todo/FINISHED-29.md | 14 +-
todo/TODO-11-restclient2-transport-abstraction.md | 8 +-
todo/TODO-12-schema-validation.md | 24 +-
...-13-system-properties-to-settings-conversion.md | 4 +-
todo/TODO-9-markdown-remaining-issues.md | 6 +-
todo/TODO.md | 2 +-
746 files changed, 5515 insertions(+), 6598 deletions(-)
rename juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/{BeanIgnore.java => MarshalledIgnore.java} (88%)
create mode 100644 juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/Bean.java
rename juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInjectAnnotation.java => juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanAnnotation.java (78%)
delete mode 100644 juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanFilter.java
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanContext.java => MarshallingContext.java} (88%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanContextable.java => MarshallingContextable.java} (88%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanRecursionException.java => MarshallingRecursionException.java} (90%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanSession.java => MarshallingSession.java} (88%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanTraverseContext.java => MarshallingTraverseContext.java} (95%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{BeanTraverseSession.java => MarshallingTraverseSession.java} (88%)
delete mode 100644 juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Bean.java
delete mode 100644 juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanAnnotation.java
delete mode 100644 juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanApplyAnnotation.java
delete mode 100644 juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApply.java
copy juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{UriResolution.java => annotation/MarshalledAs.java} (57%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanConfig.java => MarshalledConfig.java} (85%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanConfigAnnotation.java => MarshalledConfigAnnotation.java} (84%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{Beanc.java => MarshalledCtor.java} (90%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeancAnnotation.java => MarshalledCtorAnnotation.java} (75%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeancApply.java => MarshalledCtorApply.java} (78%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanpApplyAnnotation.java => MarshalledCtorApplyAnnotation.java} (74%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanIgnore.java => MarshalledIgnore.java} (64%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanIgnoreAnnotation.java => MarshalledIgnoreAnnotation.java} (75%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanApply.java => MarshalledIgnoreApply.java} (78%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeancApplyAnnotation.java => MarshalledIgnoreApplyAnnotation.java} (73%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{Beanp.java => MarshalledProp.java} (81%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanpAnnotation.java => MarshalledPropAnnotation.java} (75%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanpApply.java => MarshalledPropApply.java} (78%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/{BeanIgnoreApplyAnnotation.java => MarshalledPropApplyAnnotation.java} (74%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/{BeanDefMapper.java => MarshallingDefMapper.java} (94%)
copy juneau-core/juneau-marshall/src/main/java/org/apache/juneau/{swaps/StringFormatSwap.java => swap/AutoStringSwap.java} (51%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/{BeanInterceptor.java => MarshallingInterceptor.java} (86%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/{BeanStringSwap.java => MarshallingStringSwap.java} (90%)
rename juneau-core/juneau-marshall/src/main/java/org/apache/juneau/utils/{BeanContextConverter.java => MarshallingContextConverter.java} (85%)
delete mode 100644 juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInject.java
rename juneau-utest/src/test/java/org/apache/juneau/{BeanConfig_Test.java => MarshalledConfig_Test.java} (94%)
rename juneau-utest/src/test/java/org/apache/juneau/{BeanFilter_Test.java => MarshalledFilter_Test.java} (88%)
rename juneau-utest/src/test/java/org/apache/juneau/{BeanContext_Test.java => MarshallingContext_Test.java} (80%)
delete mode 100644 juneau-utest/src/test/java/org/apache/juneau/annotation/BeanAnnotation_Test.java
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{BeanConfigAnnotation_Test.java => MarshalledConfigAnnotation_Test.java} (96%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{BeancAnnotation_Test.java => MarshalledCtorAnnotation_Test.java} (84%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{BeanIgnoreAnnotation_Test.java => MarshalledIgnoreAnnotation_Test.java} (84%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{BeanIgnore_Test.java => MarshalledIgnore_Test.java} (81%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{BeanpAnnotation_Test.java => MarshalledPropAnnotation_Test.java} (86%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{Beanp_StarPlainField_Test.java => MarshalledProp_StarPlainField_Test.java} (81%)
rename juneau-utest/src/test/java/org/apache/juneau/annotation/{Bean_Test.java => Marshalled_Test.java} (77%)
rename juneau-utest/src/test/java/org/apache/juneau/rest/annotation/{BeanConfig_Swaps_Test.java => MarshalledConfig_Swaps_Test.java} (81%)
rename juneau-utest/src/test/java/org/apache/juneau/rest/annotation/{RestOp_BeanConfig_Test.java => RestOp_MarshalledConfig_Test.java} (88%)
rename juneau-utest/src/test/java/org/apache/juneau/rest/client/{RestClient_Config_BeanContext_Test.java => RestClient_Config_MarshallingContext_Test.java} (98%)
rename juneau-utest/src/test/java/org/apache/juneau/transforms/{BeanFilter_Test.java => MarshalledFilter_Test.java} (87%)
(juneau) 01/05: refactor(marshall): merge @Bean/@Marshalled annotation surfaces into unified @Marshalled family
Posted by ja...@apache.org.
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 ...
(juneau) 02/05: refactor(marshall): rename Beanp/Beanc/BeanIgnore to MarshalledProp/MarshalledCtor/MarshalledIgnore; add @Marshalled(as=STRING) strategy
Posted by ja...@apache.org.
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 daad68faf1420f70b32bcd27c6bc2a2330f5cf25
Author: James Bognar <ja...@jamesbog-ltmjqf2.internal.salesforce.com>
AuthorDate: Mon May 11 17:28:15 2026 -0400
refactor(marshall): rename Beanp/Beanc/BeanIgnore to MarshalledProp/MarshalledCtor/MarshalledIgnore; add @Marshalled(as=STRING) strategy
Part A — Mechanical renames (no semantic change):
- @Beanp → @MarshalledProp, BeanpAnnotation → MarshalledPropAnnotation, BeanpApply → MarshalledPropApply, BeanpApplyAnnotation → MarshalledPropApplyAnnotation
- @Beanc → @MarshalledCtor, BeancAnnotation → MarshalledCtorAnnotation, BeancApply → MarshalledCtorApply, BeancApplyAnnotation → MarshalledCtorApplyAnnotation
- @BeanIgnore → @MarshalledIgnore, BeanIgnoreAnnotation → MarshalledIgnoreAnnotation, BeanIgnoreApply → MarshalledIgnoreApply, BeanIgnoreApplyAnnotation → MarshalledIgnoreApplyAnnotation
- git mv on all source and test files; updated all imports, Javadoc @link, string literals, and test class names
Part B — Add as attribute + revised @MarshalledIgnore TYPE semantics:
- New enum MarshalledAs { DETECT, STRING }
- Added as() attribute (default DETECT) to @Marshalled
- @Marshalled(as=STRING): serializes via toString(), deserializes via fromString/valueOf/String-constructor (AutoStringSwap)
- @MarshalledIgnore on TYPE: now skips entirely (serializes as null, parses as null); old "toString fall-through" behavior is replaced by @Marshalled(as=STRING)
- Updated BasicPart, BasicHeader, EntityTags, BasicHttpResponse, BasicHttpException, BasicNamedAttribute from @MarshalledIgnore to @Marshalled(as=STRING) since they serialize via toString()
- Updated ImplicitSwappedObject test POJO to use @Marshalled(as=STRING) instead of @MarshalledIgnore
All 49855 tests pass.
Co-authored-by: Cursor <cu...@cursor.com>
---
.../org/apache/juneau/bean/html5/HtmlElement.java | 4 +-
.../juneau/bean/html5/HtmlElementContainer.java | 4 +-
.../apache/juneau/bean/html5/HtmlElementMixed.java | 4 +-
.../juneau/bean/html5/HtmlElementRawText.java | 4 +-
.../apache/juneau/bean/html5/HtmlElementText.java | 4 +-
.../java/org/apache/juneau/bean/html5/Pre.java | 2 +-
.../apache/juneau/bean/jsonschema/JsonSchema.java | 52 ++++----
.../org/apache/juneau/bean/mcp/JsonSchema.java | 2 +-
.../apache/juneau/bean/openapi3/HeaderInfo.java | 8 +-
.../org/apache/juneau/bean/openapi3/Items.java | 4 +-
.../org/apache/juneau/bean/openapi3/MediaType.java | 4 +-
.../juneau/bean/openapi3/OpenApiElement.java | 6 +-
.../apache/juneau/bean/openapi3/SchemaInfo.java | 4 +-
.../org/apache/juneau/bean/swagger/HeaderInfo.java | 4 +-
.../java/org/apache/juneau/bean/swagger/Items.java | 4 +-
.../org/apache/juneau/bean/swagger/SchemaInfo.java | 4 +-
.../apache/juneau/bean/swagger/SwaggerElement.java | 6 +-
.../{BeanIgnore.java => MarshalledIgnore.java} | 6 +-
.../juneau/commons/function/BeanFactory.java | 2 +-
.../juneau/commons/function/ListBeanChannel.java | 2 +-
.../juneau/commons/function/package-info.java | 6 +-
.../apache/juneau/commons/http/MediaRanges.java | 4 +-
.../org/apache/juneau/commons/http/MediaType.java | 4 +-
.../apache/juneau/commons/http/StringRange.java | 4 +-
.../apache/juneau/commons/http/StringRanges.java | 4 +-
.../juneau/commons/inject/BeanInstantiator.java | 2 +-
.../main/java/org/apache/juneau/BeanContext.java | 42 +++----
.../java/org/apache/juneau/BeanContextable.java | 34 +++---
.../src/main/java/org/apache/juneau/BeanMap.java | 4 +-
.../src/main/java/org/apache/juneau/BeanMeta.java | 134 ++++++++++-----------
.../java/org/apache/juneau/BeanMetaFiltered.java | 2 +-
.../java/org/apache/juneau/BeanPropertyMeta.java | 20 +--
.../src/main/java/org/apache/juneau/ClassMeta.java | 17 +++
.../src/main/java/org/apache/juneau/Context.java | 6 +-
.../java/org/apache/juneau/MarshalledFilter.java | 4 +-
.../main/java/org/apache/juneau/UriContext.java | 2 +-
.../org/apache/juneau/annotation/BeanConfig.java | 6 +-
.../org/apache/juneau/annotation/Marshalled.java | 17 ++-
.../juneau/annotation/MarshalledAnnotation.java | 19 +++
.../org/apache/juneau/annotation/MarshalledAs.java | 39 +++---
.../annotation/{Beanc.java => MarshalledCtor.java} | 10 +-
...notation.java => MarshalledCtorAnnotation.java} | 26 ++--
.../{BeanpApply.java => MarshalledCtorApply.java} | 20 +--
...ion.java => MarshalledCtorApplyAnnotation.java} | 48 ++++----
.../{BeanIgnore.java => MarshalledIgnore.java} | 29 +++--
...tation.java => MarshalledIgnoreAnnotation.java} | 26 ++--
...IgnoreApply.java => MarshalledIgnoreApply.java} | 20 +--
...n.java => MarshalledIgnoreApplyAnnotation.java} | 48 ++++----
.../annotation/{Beanp.java => MarshalledProp.java} | 54 ++++-----
...notation.java => MarshalledPropAnnotation.java} | 64 +++++-----
.../{BeancApply.java => MarshalledPropApply.java} | 20 +--
...ion.java => MarshalledPropApplyAnnotation.java} | 48 ++++----
.../org/apache/juneau/parser/ParserSession.java | 2 +-
.../java/org/apache/juneau/swap/AutoListSwap.java | 12 +-
.../java/org/apache/juneau/swap/AutoMapSwap.java | 12 +-
.../org/apache/juneau/swap/AutoNumberSwap.java | 12 +-
.../org/apache/juneau/swap/AutoObjectSwap.java | 12 +-
.../AutoStringSwap.java} | 36 +++---
.../java/org/apache/juneau/swap/SurrogateSwap.java | 2 +-
.../org/apache/juneau/swaps/StringFormatSwap.java | 2 +-
.../java/org/apache/juneau/xml/annotation/Xml.java | 2 +-
.../examples/core/html/HtmlComplexExample.java | 2 +-
.../examples/core/html/HtmlSimpleExample.java | 2 +-
.../examples/core/json/JsonComplexExample.java | 2 +-
.../examples/core/json/JsonSimpleExample.java | 2 +-
.../juneau/examples/core/oapi/OapiExample.java | 2 +-
.../org/apache/juneau/examples/core/pojo/Pojo.java | 2 +-
.../juneau/examples/core/pojo/PojoComplex.java | 2 +-
.../juneau/examples/core/uon/UonExample.java | 2 +-
.../examples/core/xml/XmlComplexExample.java | 2 +-
.../juneau/examples/core/xml/XmlSimpleExample.java | 2 +-
.../org/apache/juneau/http/annotation/Header.java | 2 +-
.../apache/juneau/http/entity/BasicHttpEntity.java | 2 +-
.../org/apache/juneau/http/header/BasicHeader.java | 2 +-
.../org/apache/juneau/http/header/EntityTags.java | 2 +-
.../org/apache/juneau/http/part/BasicPart.java | 2 +-
.../apache/juneau/http/resource/BasicResource.java | 2 +-
.../juneau/http/response/BasicHttpException.java | 2 +-
.../juneau/http/response/BasicHttpResponse.java | 2 +-
.../juneau/rest/httppart/BasicNamedAttribute.java | 2 +-
.../apache/juneau/AnnotationInheritance_Test.java | 36 +++---
.../java/org/apache/juneau/BasicBeans_Test.java | 2 +-
.../java/org/apache/juneau/BeanConfig_Test.java | 8 +-
.../java/org/apache/juneau/BeanMapErrors_Test.java | 18 +--
.../test/java/org/apache/juneau/BeanMap_Test.java | 64 +++++-----
.../apache/juneau/DynaBean_ComboRoundTripTest.java | 18 +--
.../juneau/ReadWriteOnlyProperties_Test.java | 14 +--
.../src/test/java/org/apache/juneau/TestUtils.java | 6 +-
.../src/test/java/org/apache/juneau/a/A1.java | 10 +-
.../a/rttests/ReadOnlyBeans_RoundTripTest.java | 4 +-
.../juneau/a/rttests/Records_RoundTripTest.java | 26 ++--
.../juneau/a/rttests/RoundTripBeanMaps_Test.java | 10 +-
...est.java => MarshalledCtorAnnotation_Test.java} | 16 +--
...t.java => MarshalledIgnoreAnnotation_Test.java} | 14 +--
...Ignore_Test.java => MarshalledIgnore_Test.java} | 26 ++--
...est.java => MarshalledPropAnnotation_Test.java} | 16 +--
...ava => MarshalledProp_StarPlainField_Test.java} | 14 +--
.../apache/juneau/annotation/Marshalled_Test.java | 18 +--
.../juneau/bean/html5/HtmlElement_Attr_Test.java | 2 +-
.../commons/inject/BeanInstantiator_Test.java | 8 +-
.../java/org/apache/juneau/csv/CsvParser_Test.java | 4 +-
.../org/apache/juneau/html/BasicHtml_Test.java | 8 +-
.../java/org/apache/juneau/html/Common_Test.java | 36 +++---
.../java/org/apache/juneau/json/Common_Test.java | 36 +++---
.../java/org/apache/juneau/json5/Common_Test.java | 36 +++---
.../juneau/markdown/MarkdownParser_Test.java | 4 +-
.../rest/annotation/RestOp_BeanConfig_Test.java | 4 +-
.../testutils/pojos/ImplicitSwappedObject.java | 2 +-
.../apache/juneau/transform/AutoListSwapTest.java | 16 +--
.../apache/juneau/transform/AutoMapSwapTest.java | 16 +--
.../juneau/transform/AutoNumberSwapTest.java | 16 +--
.../juneau/transform/AutoObjectSwapTest.java | 16 +--
.../transforms/Builder_ComboRoundTripTest.java | 2 +-
.../java/org/apache/juneau/uon/Common_UonTest.java | 18 +--
.../juneau/urlencoding/Common_UrlEncodingTest.java | 18 +--
.../urlencoding/UrlEncodingSerializer_Test.java | 8 +-
.../java/org/apache/juneau/xml/BasicXml_Test.java | 14 +--
.../java/org/apache/juneau/xml/Common_Test.java | 36 +++---
.../apache/juneau/xml/XmlIgnoreComments_Test.java | 14 +--
.../test/java/org/apache/juneau/xml/Xml_Test.java | 12 +-
.../test/java/org/apache/juneau/xml/xml1b/T7.java | 12 +-
scripts/check-fluent-setter-overrides.py | 6 +-
122 files changed, 877 insertions(+), 830 deletions(-)
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
index acf62d369d..c1d18ca1a4 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElement.java
@@ -202,7 +202,7 @@ public abstract class HtmlElement {
* @return The attributes of this element.
*/
@Xml(format = ATTRS)
- @Beanp("a")
+ @MarshalledProp("a")
public java.util.Map<String,Object> getAttrs() { return attrs; }
/**
@@ -1046,7 +1046,7 @@ public abstract class HtmlElement {
* @param value The new attributes for this element.
* @return This object.
*/
- @Beanp("a")
+ @MarshalledProp("a")
public HtmlElement setAttrs(java.util.Map<String,Object> value) {
if (nn(value)) {
value.entrySet().forEach(x -> {
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
index fb857cdb60..6e7d18ab77 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementContainer.java
@@ -158,7 +158,7 @@ public class HtmlElementContainer extends HtmlElement {
* @return The children of this element.
*/
@Xml(format = ELEMENTS)
- @Beanp(dictionary = HtmlBeanDictionary.class, name = "c")
+ @MarshalledProp(dictionary = HtmlBeanDictionary.class, name = "c")
public List<Object> getChildren() { return children; }
@Override /* Overridden from HtmlElement */
@@ -485,7 +485,7 @@ public class HtmlElementContainer extends HtmlElement {
* @param children The new children for this container.
* @return This object.
*/
- @Beanp("c")
+ @MarshalledProp("c")
public HtmlElementContainer setChildren(List<Object> children) {
this.children = children;
return this;
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
index ae6ca34707..628f3f3c4d 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementMixed.java
@@ -164,7 +164,7 @@ public class HtmlElementMixed extends HtmlElement {
* @return The children of this element.
*/
@Xml(format = MIXED)
- @Beanp(dictionary = HtmlBeanDictionary.class, name = "c")
+ @MarshalledProp(dictionary = HtmlBeanDictionary.class, name = "c")
public List<Object> getChildren() { return children; }
@Override /* Overridden from HtmlElement */
@@ -491,7 +491,7 @@ public class HtmlElementMixed extends HtmlElement {
* @param children The new children of this element.
* @return This object.
*/
- @Beanp("c")
+ @MarshalledProp("c")
public HtmlElement setChildren(List<Object> children) {
this.children = children;
return this;
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
index 9e8053ae08..4a077e9d91 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementRawText.java
@@ -73,7 +73,7 @@ public class HtmlElementRawText extends HtmlElement {
* @return The inner text of this element, or <jk>null</jk> if no text is set.
*/
@Xml(format = XmlFormat.TEXT_PWS)
- @Beanp("c")
+ @MarshalledProp("c")
public Object getText() { return text; }
@Override /* Overridden from HtmlElement */
@@ -400,7 +400,7 @@ public class HtmlElementRawText extends HtmlElement {
* @param text The inner text of this element, or <jk>null</jk> if no text is set.
* @return This object.
*/
- @Beanp("c")
+ @MarshalledProp("c")
public HtmlElement setText(Object text) {
this.text = text;
return this;
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
index 113ba96a02..451a8338f3 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/HtmlElementText.java
@@ -72,7 +72,7 @@ public class HtmlElementText extends HtmlElement {
* @return The inner text of this element, or <jk>null</jk> if no text is set.
*/
@Xml(format = XmlFormat.TEXT)
- @Beanp("c")
+ @MarshalledProp("c")
public Object getText() { return text; }
@Override /* Overridden from HtmlElement */
@@ -399,7 +399,7 @@ public class HtmlElementText extends HtmlElement {
* @param text The inner text of this element, or <jk>null</jk> if no text is set.
* @return This object.
*/
- @Beanp("c")
+ @MarshalledProp("c")
public HtmlElement setText(Object text) {
this.text = text;
return this;
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 1f0b7730ea..3182401132 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
@@ -166,7 +166,7 @@ public class Pre extends HtmlElementMixed {
}
@Xml(format = MIXED_PWS)
- @Beanp(dictionary = HtmlBeanDictionary.class, name = "c")
+ @MarshalledProp(dictionary = HtmlBeanDictionary.class, name = "c")
@Override
public List<Object> getChildren() { return super.getChildren(); }
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 56f0a89657..3750851ee5 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
@@ -686,7 +686,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonSchemaArray}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public Boolean getAdditionalItemsAsBoolean() { return additionalItemsBoolean; }
/**
@@ -698,7 +698,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link Boolean}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public List<JsonSchema> getAdditionalItemsAsSchemaArray() { return additionalItemsSchemaArray; }
/**
@@ -725,7 +725,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonSchema}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public Boolean getAdditionalPropertiesAsBoolean() { return additionalPropertiesBoolean; }
/**
@@ -737,7 +737,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link Boolean}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonSchema getAdditionalPropertiesAsSchema() { return additionalPropertiesSchema; }
/**
@@ -807,7 +807,7 @@ public class JsonSchema {
*
* @return The value of the <property>$defs</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("$defs")
+ @MarshalledProp("$defs")
public Map<String,JsonSchema> getDefs() {
return defs; // Return only defs, not definitions (to avoid double serialization)
}
@@ -855,7 +855,7 @@ public class JsonSchema {
*
* @return The value of the <property>else</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("else")
+ @MarshalledProp("else")
public JsonSchema getElse() { return else_; }
/**
@@ -927,7 +927,7 @@ public class JsonSchema {
*
* @return The value of the <property>$id</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("$id")
+ @MarshalledProp("$id")
public URI getIdUri() {
return idUri; // Return only idUri, not id (to avoid double serialization)
}
@@ -940,7 +940,7 @@ public class JsonSchema {
*
* @return The value of the <property>if</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("if")
+ @MarshalledProp("if")
public JsonSchema getIf() { return if_; }
/**
@@ -965,7 +965,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonSchemaArray}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonSchema getItemsAsSchema() { return itemsSchema; }
/**
@@ -976,7 +976,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonSchema}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonSchemaArray getItemsAsSchemaArray() { return itemsSchemaArray; }
/**
@@ -1052,7 +1052,7 @@ public class JsonSchema {
*
* @return The value of the <property>name</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @BeanIgnore
+ @MarshalledIgnore
public String getName() { return name; }
/**
@@ -1155,7 +1155,7 @@ public class JsonSchema {
*
* @return The value of the <property>$ref</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public URI getRef() { return ref; }
/**
@@ -1170,7 +1170,7 @@ public class JsonSchema {
*
* @return The value of the <property>$schema</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("$schema")
+ @MarshalledProp("$schema")
public URI getSchemaVersionUri() { return schemaVersion; }
/**
@@ -1181,7 +1181,7 @@ public class JsonSchema {
*
* @return The value of the <property>then</property> property on this bean, or <jk>null</jk> if it is not set.
*/
- @Beanp("then")
+ @MarshalledProp("then")
public JsonSchema getThen() { return then_; }
/**
@@ -1214,7 +1214,7 @@ public class JsonSchema {
* @return
* The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonTypeArray}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonType getTypeAsJsonType() { return typeJsonType; }
/**
@@ -1225,7 +1225,7 @@ public class JsonSchema {
*
* @return The currently set value, or <jk>null</jk> if the property is not set, or is set as a {@link JsonType}.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonTypeArray getTypeAsJsonTypeArray() { return typeJsonTypeArray; }
/**
@@ -1319,7 +1319,7 @@ public class JsonSchema {
* @return This object.
* @throws BeanRuntimeException If invalid object type passed in.
*/
- @Beanp(dictionary = { JsonSchema.class })
+ @MarshalledProp(dictionary = { JsonSchema.class })
public JsonSchema setAdditionalProperties(Object value) {
this.additionalPropertiesBoolean = null;
this.additionalPropertiesSchema = null;
@@ -1424,7 +1424,7 @@ public class JsonSchema {
* @param value The new value for the <property>$defs</property> property on this bean.
* @return This object.
*/
- @Beanp("$defs")
+ @MarshalledProp("$defs")
public JsonSchema setDefs(Map<String,JsonSchema> value) {
this.defs = value;
if (nn(value))
@@ -1495,7 +1495,7 @@ public class JsonSchema {
* @param value The new value for the <property>else</property> property on this bean.
* @return This object.
*/
- @Beanp("else")
+ @MarshalledProp("else")
public JsonSchema setElse(JsonSchema value) {
this.else_ = value;
setMasterOn(value);
@@ -1600,7 +1600,7 @@ public class JsonSchema {
* @param value The new value for the <property>$id</property> property on this bean.
* @return This object.
*/
- @Beanp("$id")
+ @MarshalledProp("$id")
public JsonSchema setIdUri(Object value) {
this.idUri = toUri(value);
return this;
@@ -1615,7 +1615,7 @@ public class JsonSchema {
* @param value The new value for the <property>if</property> property on this bean.
* @return This object.
*/
- @Beanp("if")
+ @MarshalledProp("if")
public JsonSchema setIf(JsonSchema value) {
this.if_ = value;
setMasterOn(value);
@@ -1756,7 +1756,7 @@ public class JsonSchema {
* @param value The new value for the <property>name</property> property on this bean.
* @return This object.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonSchema setName(String value) {
this.name = value;
return this;
@@ -1875,7 +1875,7 @@ public class JsonSchema {
* @param value The new value for the <property>$ref</property> property on this bean.
* @return This object.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public JsonSchema setRef(Object value) {
this.ref = toUri(value);
return this;
@@ -1899,7 +1899,7 @@ public class JsonSchema {
* @param value The schema map to associate with this schema. Can be <jk>null</jk>.
* @return This object.
*/
- @BeanIgnore
+ @MarshalledIgnore
public JsonSchema setSchemaMap(JsonSchemaMap value) {
this.schemaMap = value;
return this;
@@ -1918,7 +1918,7 @@ public class JsonSchema {
* @param value The new value for the <property>schemaVersion</property> property on this bean.
* @return This object.
*/
- @Beanp("$schema")
+ @MarshalledProp("$schema")
public JsonSchema setSchemaVersionUri(Object value) {
this.schemaVersion = toUri(value);
return this;
@@ -1933,7 +1933,7 @@ public class JsonSchema {
* @param value The new value for the <property>then</property> property on this bean.
* @return This object.
*/
- @Beanp("then")
+ @MarshalledProp("then")
public JsonSchema setThen(JsonSchema value) {
this.then_ = value;
setMasterOn(value);
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 606c136d13..64f1896423 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
@@ -32,7 +32,7 @@ public class JsonSchema {
private Object additionalProperties;
private JsonSchema items;
- @Beanp(name = "$defs")
+ @MarshalledProp(name = "$defs")
private Map<String, JsonSchema> defs;
/**
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
index c0418a49d1..b11f15daac 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/HeaderInfo.java
@@ -219,7 +219,7 @@ public class HeaderInfo extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("x-example")
+ @MarshalledProp("x-example")
public Object getExample() { return example; }
/**
@@ -247,7 +247,7 @@ public class HeaderInfo extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -406,7 +406,7 @@ public class HeaderInfo extends OpenApiElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object
*/
- @Beanp("x-example")
+ @MarshalledProp("x-example")
public HeaderInfo setExample(Object value) {
example = value;
return this;
@@ -454,7 +454,7 @@ public class HeaderInfo extends OpenApiElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public HeaderInfo setRef(String value) {
ref = value;
return this;
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
index aae9dc9098..32c1709d59 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/Items.java
@@ -347,7 +347,7 @@ public class Items extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -724,7 +724,7 @@ public class Items extends OpenApiElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public Items setRef(Object value) {
ref = s(value);
return this;
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
index e159f817d7..434563dfc0 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/MediaType.java
@@ -173,7 +173,7 @@ public class MediaType extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("x-example")
+ @MarshalledProp("x-example")
public Object getExample() { return example; }
/**
@@ -244,7 +244,7 @@ public class MediaType extends OpenApiElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object
*/
- @Beanp("x-example")
+ @MarshalledProp("x-example")
public MediaType setExample(Object value) {
example = value;
return this;
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 5949406eaa..b8cb759bf7 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
@@ -72,7 +72,7 @@ public abstract class OpenApiElement {
* All the non-standard keys on this element.
* <br>Never <jk>null</jk>.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public Set<String> extraKeys() {
return extra == null ? Collections.emptySet() : extra.keySet();
}
@@ -86,7 +86,7 @@ public abstract class OpenApiElement {
* @param property The property name to retrieve. Must not be <jk>null</jk>.
* @return The property value, or <jk>null</jk> if the property does not exist or is not set.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public Object get(String property) {
assertArgNotNull(ARG_property, property);
return opt(extra).map(x -> x.get(property)).orElse(null);
@@ -130,7 +130,7 @@ public abstract class OpenApiElement {
* @return This object
* @throws RuntimeException if strict mode is enabled.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public OpenApiElement set(String property, Object value) {
assertArgNotNull(ARG_property, property);
if (strict)
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
index 87ba2ad980..7a26938037 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/SchemaInfo.java
@@ -651,7 +651,7 @@ public class SchemaInfo extends OpenApiElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -1245,7 +1245,7 @@ public class SchemaInfo extends OpenApiElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public SchemaInfo setRef(Object value) {
ref = s(value);
return this;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
index e201d0a676..5f2f9afe4b 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/HeaderInfo.java
@@ -367,7 +367,7 @@ public class HeaderInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -753,7 +753,7 @@ public class HeaderInfo extends SwaggerElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public HeaderInfo setRef(String value) {
ref = value;
return this;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
index ace226f3ec..5e9eceaee4 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/Items.java
@@ -344,7 +344,7 @@ public class Items extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -697,7 +697,7 @@ public class Items extends SwaggerElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public Items setRef(String value) {
ref = value;
return this;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
index 9b4b51434f..5509982b37 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SchemaInfo.java
@@ -563,7 +563,7 @@ public class SchemaInfo extends SwaggerElement {
*
* @return The property value, or <jk>null</jk> if it is not set.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public String getRef() { return ref; }
/**
@@ -1103,7 +1103,7 @@ public class SchemaInfo extends SwaggerElement {
* <br>Can be <jk>null</jk> to unset the property.
* @return This object.
*/
- @Beanp("$ref")
+ @MarshalledProp("$ref")
public SchemaInfo setRef(String value) {
ref = value;
return this;
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
index af9555fa3d..d0e013e1c5 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/SwaggerElement.java
@@ -75,7 +75,7 @@ public abstract class SwaggerElement {
* All the non-standard keys on this element.
* <br>Never <jk>null</jk>.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public Set<String> extraKeys() {
return extra == null ? Collections.emptySet() : extra.keySet();
}
@@ -89,7 +89,7 @@ public abstract class SwaggerElement {
* @param property The property name to retrieve. Must not be <jk>null</jk>.
* @return The property value, or <jk>null</jk> if the property does not exist or is not set.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public Object get(String property) {
assertArgNotNull(ARG_property, property);
return opt(extra).map(x -> x.get(property)).orElse(null);
@@ -132,7 +132,7 @@ public abstract class SwaggerElement {
* @param value The new value for the property.
* @return This object.
*/
- @Beanp("*")
+ @MarshalledProp("*")
public SwaggerElement set(String property, Object value) {
assertArgNotNull(ARG_property, property);
if (strict)
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/BeanIgnore.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/MarshalledIgnore.java
similarity index 88%
rename from juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/BeanIgnore.java
rename to juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/MarshalledIgnore.java
index 3adb32d2f6..f0116e9fa9 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/BeanIgnore.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/annotation/MarshalledIgnore.java
@@ -26,19 +26,19 @@ import java.lang.annotation.*;
* serialized as strings).
*
* <p>
- * Marshall's {@code org.apache.juneau.annotation.BeanIgnore} is the full-featured annotation (repeatable, dynamically
+ * Marshall's {@code org.apache.juneau.annotation.MarshalledIgnore} is the full-featured annotation (repeatable, dynamically
* applied, and so on). This annotation is recognized alongside it when classes are analyzed in juneau-marshall.
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanIgnoreAnnotation">@BeanIgnore Annotation</a>
+ * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshalledIgnoreAnnotation">@MarshalledIgnore Annotation</a>
* </ul>
*/
@Documented
@Target({ FIELD, METHOD, TYPE, CONSTRUCTOR })
@Retention(RUNTIME)
@Inherited
-public @interface BeanIgnore {
+public @interface MarshalledIgnore {
/**
* Optional description for the exposed API.
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 5d74b76ae0..8f77f76cae 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
@@ -75,7 +75,7 @@ public interface BeanFactory<T> {
/**
* Sentinel class used as the default value for {@code @Marshalled(factory=...)} and
- * {@code @Beanp(factory=...)} when no factory is specified.
+ * {@code @MarshalledProp(factory=...)} when no factory is specified.
*/
@SuppressWarnings({
"rawtypes" // Raw type required for use as annotation sentinel
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ListBeanChannel.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ListBeanChannel.java
index 97e79792fc..56f5e50b00 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ListBeanChannel.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/function/ListBeanChannel.java
@@ -36,7 +36,7 @@ import java.util.*;
* <jk>public class</jk> ItemCollection {
* <jk>private final</jk> ListBeanChannel<Item> <jv>items</jv> = <jk>new</jk> ListBeanChannel<>();
*
- * <ja>@Beanp</ja>(elementType=Item.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(elementType=Item.<jk>class</jk>)
* <jk>public</jk> ListBeanChannel<Item> getItems() { <jk>return</jk> <jv>items</jv>; }
* <jc>// No setter needed — parser calls acceptThrows() on the existing instance</jc>
* }
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 7e8db1149c..3a47d13dce 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
@@ -287,7 +287,7 @@
* <jk>private final</jk> ListBeanChannel<Employee> <jv>employees</jv> = <jk>new</jk> ListBeanChannel<>();
*
* <jc>// No setter needed — parser calls acceptThrows() on the existing instance.</jc>
- * <ja>@Beanp</ja>(elementType=Employee.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(elementType=Employee.<jk>class</jk>)
* <jk>public</jk> ListBeanChannel<Employee> getEmployees() { <jk>return</jk> <jv>employees</jv>; }
* }
*
@@ -448,12 +448,12 @@
* <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>
* <tr>
- * <td>{@code @Beanp(factory=X.class)}</td>
+ * <td>{@code @MarshalledProp(factory=X.class)}</td>
* <td>Bean property</td>
* <td>Specifies a property-level factory for instantiating the value of a specific bean property.</td>
* </tr>
* <tr>
- * <td>{@code @Beanp(elementType=Y.class)}</td>
+ * <td>{@code @MarshalledProp(elementType=Y.class)}</td>
* <td>Bean property</td>
* <td>Declares the element type for generic streaming properties ({@code Stream<Y>}, {@code BeanSupplier<Y>}, etc.) overcoming Java type erasure. Also supports narrowing to concrete implementation types.</td>
* </tr>
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaRanges.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaRanges.java
index 6064d0423b..f6647abdf5 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaRanges.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaRanges.java
@@ -23,7 +23,7 @@ import static org.apache.juneau.commons.utils.Utils.*;
import java.util.*;
import java.util.function.*;
-import org.apache.juneau.commons.annotation.BeanIgnore;
+import org.apache.juneau.commons.annotation.MarshalledIgnore;
import org.apache.juneau.commons.collections.*;
/**
@@ -53,7 +53,7 @@ import org.apache.juneau.commons.collections.*;
* <li class='extlink'><a class="doclink" href="https://www.w3.org/Protocols/rfc2616/rfc2616.html">Hypertext Transfer Protocol -- HTTP/1.1</a>
* </ul>
*/
-@BeanIgnore
+@MarshalledIgnore
public class MediaRanges {
/** Represents an empty media ranges object. */
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaType.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaType.java
index 499922fa85..9f5c5c5b61 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaType.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/MediaType.java
@@ -23,7 +23,7 @@ import static org.apache.juneau.commons.utils.Utils.*;
import java.util.*;
import java.util.function.*;
-import org.apache.juneau.commons.annotation.BeanIgnore;
+import org.apache.juneau.commons.annotation.MarshalledIgnore;
import org.apache.juneau.commons.collections.*;
import org.apache.juneau.commons.utils.*;
@@ -36,7 +36,7 @@ import org.apache.juneau.commons.utils.*;
* <li class='extlink'><a class="doclink" href="https://www.w3.org/Protocols/rfc2616/rfc2616.html">Hypertext Transfer Protocol -- HTTP/1.1</a>
* </ul>
*/
-@BeanIgnore
+@MarshalledIgnore
@SuppressWarnings({
"java:S1700", // Field 'mediaType' intentionally shares the class name; it holds the canonical string form of this MediaType instance
"java:S1845" // Field name intentionally matches method name
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRange.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRange.java
index f59c568606..a1cc5d8ba3 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRange.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRange.java
@@ -23,7 +23,7 @@ import static org.apache.juneau.commons.utils.Utils.*;
import java.util.*;
import java.util.function.*;
-import org.apache.juneau.commons.annotation.BeanIgnore;
+import org.apache.juneau.commons.annotation.MarshalledIgnore;
/**
* Represents a single value in a comma-delimited header value that optionally contains a quality metric for
@@ -42,7 +42,7 @@ import org.apache.juneau.commons.annotation.BeanIgnore;
* </ul>
*/
-@BeanIgnore
+@MarshalledIgnore
public class StringRange {
private static HeaderElement parse(String value) {
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRanges.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRanges.java
index 853dcd9802..8e8b0e0d8c 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRanges.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/http/StringRanges.java
@@ -23,7 +23,7 @@ import static org.apache.juneau.commons.utils.Utils.*;
import java.util.*;
import java.util.function.*;
-import org.apache.juneau.commons.annotation.BeanIgnore;
+import org.apache.juneau.commons.annotation.MarshalledIgnore;
import org.apache.juneau.commons.collections.*;
/**
@@ -59,7 +59,7 @@ import org.apache.juneau.commons.collections.*;
* <li class='extlink'><a class="doclink" href="https://www.w3.org/Protocols/rfc2616/rfc2616.html">Hypertext Transfer Protocol -- HTTP/1.1</a>
* </ul>
*/
-@BeanIgnore
+@MarshalledIgnore
public class StringRanges {
/** Represents an empty string ranges object. */
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
index 30c79ba452..85d903f269 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanInstantiator.java
@@ -174,7 +174,7 @@ import org.apache.juneau.commons.reflect.*;
* <li class='note'>All constructors and methods except {@link Optional} and {@link List} parameters
* must have beans available in the store.
* <li class='note'>If multiple constructors/methods are found, the one with the most matching parameters is used.
- * <li class='note'>Deprecated and <a class="doclink" href="https://juneau.apache.org/site/apidocs/org/apache/juneau/annotation/BeanIgnore.html">@BeanIgnore</a>-annotated methods/constructors are ignored.
+ * <li class='note'>Deprecated and <a class="doclink" href="https://juneau.apache.org/site/apidocs/org/apache/juneau/annotation/MarshalledIgnore.html">@MarshalledIgnore</a>-annotated methods/constructors are ignored.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
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 74c70b3738..72d185ae92 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
@@ -435,7 +435,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Notes:</h5><ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -483,8 +483,8 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanc @Beanc} annotation can also be used to expose a non-public constructor.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean constructor to ignore it.
+ * <li class='note'>The {@link MarshalledCtor @MarshalledCtor} annotation can also be used to expose a non-public constructor.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean constructor to ignore it.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -609,7 +609,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <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.MarshalledProp#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(ClassInfo...)}
@@ -679,8 +679,8 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used to expose a non-public field.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean field to ignore it as a bean property.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used to expose a non-public field.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean field to ignore it as a bean property.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -829,8 +829,8 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used to expose a non-public method.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean getter/setter to ignore it as a bean property.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used to expose a non-public method.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean getter/setter to ignore it as a bean property.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1591,7 +1591,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Notes:</h5><ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1648,7 +1648,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>Notes:</h5><ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1702,8 +1702,8 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can be used on the getter to override this setting.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on getters to ignore them as bean properties.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can be used on the getter to override this setting.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on getters to ignore them as bean properties.
* </ul>
*
* @return This object.
@@ -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>@Marshalled</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>@MarshalledProp</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.
*
@@ -1912,7 +1912,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on getters and fields to ignore them.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on getters and fields to ignore them.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1960,7 +1960,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used on transient fields to keep them from being ignored.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used on transient fields to keep them from being ignored.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -2191,7 +2191,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <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 MarshalledProp @MarshalledProp} annotation can also be used on methods to individually identify them as 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>
*
@@ -2801,11 +2801,11 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on classes to prevent them from being recognized as beans.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on classes to prevent them from being recognized as beans.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanIgnore}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledIgnore}
* <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#notBeanClasses()}
* </ul>
*
@@ -4842,7 +4842,7 @@ public class BeanContext extends Context implements ConversionFinder {
}
/**
- * Used for determining the class type on a method or field where a {@code @Beanp} annotation may be present.
+ * Used for determining the class type on a method or field where a {@code @MarshalledProp} annotation may be present.
*
* @param <T> The class type we're wrapping.
* @param p The property annotation info on the type if there is one.
@@ -4856,7 +4856,7 @@ public class BeanContext extends Context implements ConversionFinder {
@SuppressWarnings({
"java:S3776" // Cognitive complexity acceptable for ClassMeta resolution with property annotations
})
- protected final <T> ClassMeta<T> resolveClassMeta(AnnotationInfo<Beanp> p, ClassInfo ci, TypeVariables typeVarImpls) {
+ protected final <T> ClassMeta<T> resolveClassMeta(AnnotationInfo<MarshalledProp> p, ClassInfo ci, TypeVariables typeVarImpls) {
var cm = resolveClassMeta(ci, typeVarImpls);
var cm2 = cm;
@@ -4896,7 +4896,7 @@ public class BeanContext extends Context implements ConversionFinder {
return new ClassMeta<>(cm2, null, null, elementType);
}
- // Handle @Beanp(elementType=) for BeanSupplier, BeanConsumer, BeanChannel, and Stream properties.
+ // Handle @MarshalledProp(elementType=) for BeanSupplier, BeanConsumer, BeanChannel, and Stream properties.
if (isNotVoid(beanp.elementType()) && (cm2.isIterable() || cm2.isStream())) {
var elementType = resolveClassMeta(beanp.elementType(), typeVarImpls);
if (! elementType.isObject())
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 e332d84ebd..5719e4b785 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
@@ -166,7 +166,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>Notes:</h5>
* <ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5>
@@ -215,8 +215,8 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanc @Beanc} annotation can also be used to expose a non-public constructor.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean constructor to ignore it.
+ * <li class='note'>The {@link MarshalledCtor @MarshalledCtor} annotation can also be used to expose a non-public constructor.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean constructor to ignore it.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -370,7 +370,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
- * <li class='ja'>{@link Beanp#dictionary()}
+ * <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link BeanConfig#dictionary()}
* <li class='ja'>{@link BeanConfig#dictionary_replace()}
* </ul>
@@ -425,8 +425,8 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used to expose a non-public field.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean field to ignore it as a bean property.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used to expose a non-public field.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean field to ignore it as a bean property.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -565,8 +565,8 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used to expose a non-public method.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on a public bean getter/setter to ignore it as a bean property.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used to expose a non-public method.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a public bean getter/setter to ignore it as a bean property.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1317,7 +1317,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Notes:</h5><ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1365,7 +1365,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>Notes:</h5><ul>
* <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.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on a class to ignore it as a bean.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1410,8 +1410,8 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can be used on the getter to override this setting.
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on getters to ignore them as bean properties.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can be used on the getter to override this setting.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on getters to ignore them as bean properties.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1563,7 +1563,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on getters and fields to ignore them.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on getters and fields to ignore them.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1602,7 +1602,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link Beanp @Beanp} annotation can also be used on transient fields to keep them from being ignored.
+ * <li class='note'>The {@link MarshalledProp @MarshalledProp} annotation can also be used on transient fields to keep them from being ignored.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1808,7 +1808,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <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 MarshalledProp @MarshalledProp} annotation can also be used on methods to individually identify them as 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>
*
@@ -2313,11 +2313,11 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>The {@link BeanIgnore @BeanIgnore} annotation can also be used on classes to prevent them from being recognized as beans.
+ * <li class='note'>The {@link MarshalledIgnore @MarshalledIgnore} annotation can also be used on classes to prevent them from being recognized as beans.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanIgnore}
+ * <li class='ja'>{@link MarshalledIgnore}
* <li class='ja'>{@link BeanConfig#notBeanClasses()}
* <li class='jf'>{@link BeanContext.Builder#notBeanClasses()}
* </ul>
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 7ac4d22bb0..1b647484f9 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
@@ -368,7 +368,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
*
* <p>
* Triggers bean creation if bean has read-only properties set through a constructor defined by the
- * {@link Beanc @Beanc} annotation.
+ * {@link MarshalledCtor @MarshalledCtor} annotation.
*
* @return The inner bean object.
*/
@@ -409,7 +409,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
*
* <p>
* If <c>create</c> is <jk>false</jk>, then this method may return <jk>null</jk> if the bean has read-only
- * properties set through a constructor defined by the {@link Beanc @Beanc} annotation.
+ * properties set through a constructor defined by the {@link MarshalledCtor @MarshalledCtor} annotation.
*
* <p>
* This method does NOT always return the bean in it's final state.
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 6efc8e06b3..8082d63efb 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
@@ -60,7 +60,7 @@ import org.apache.juneau.commons.inject.*;
* <ul>
* <li>Public fields (same order as {@code Class.getFields()}).
* <li>Properties returned by {@code BeanInfo.getPropertyDescriptors()}.
- * <li>Non-standard getters/setters with {@link Beanp @Beanp} annotation defined on them.
+ * <li>Non-standard getters/setters with {@link MarshalledProp @MarshalledProp} annotation defined on them.
* </ul>
* </ul>
*
@@ -224,8 +224,8 @@ public class BeanMeta<T> {
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 (ap.has(MarshalledIgnore.class, cm) || ap.has(org.apache.juneau.commons.annotation.MarshalledIgnore.class, cm))
+ return notABean("Class is annotated with @MarshalledIgnore");
if ((! bc.getBeanClassVisibility().isVisible(cm.getModifiers()) || cm.isAnonymousClass()) && ! ap.has(Marshalled.class, cm))
return notABean("Class is not public");
@@ -242,18 +242,18 @@ public class BeanMeta<T> {
}
/*
- * Extracts the property name from {@link Beanp @Beanp} or {@link Name @Name} annotations.
+ * Extracts the property name from {@link MarshalledProp @MarshalledProp} or {@link Name @Name} annotations.
*
* <p>
* If {@link Name @Name} annotations are present, returns the value from the last one.
- * Otherwise, searches through {@link Beanp @Beanp} annotations and returns the first non-empty
- * {@link Beanp#value() value()} or {@link Beanp#name() name()} found.
+ * Otherwise, searches through {@link MarshalledProp @MarshalledProp} annotations and returns the first non-empty
+ * {@link MarshalledProp#value() value()} or {@link MarshalledProp#name() name()} found.
*
- * @param p List of {@link Beanp @Beanp} annotations.
+ * @param p List of {@link MarshalledProp @MarshalledProp} annotations.
* @param n List of {@link Name @Name} annotations.
* @return The property name, or <jk>null</jk> if no name is found.
*/
- private static String bpName(List<Beanp> p, List<Name> n) {
+ private static String bpName(List<MarshalledProp> p, List<Name> n) {
if (p.isEmpty() && n.isEmpty())
return null;
if (! n.isEmpty())
@@ -307,13 +307,13 @@ public class BeanMeta<T> {
}
/*
- * Extracts the property name from a single {@link Beanp @Beanp} or {@link Name @Name} annotation.
+ * Extracts the property name from a single {@link MarshalledProp @MarshalledProp} or {@link Name @Name} annotation.
*
* <p>
- * For {@link Beanp @Beanp} annotations, returns the first non-empty value found in the following order:
+ * For {@link MarshalledProp @MarshalledProp} annotations, returns the first non-empty value found in the following order:
* <ol>
- * <li>{@link Beanp#name() name()}
- * <li>{@link Beanp#value() value()}
+ * <li>{@link MarshalledProp#name() name()}
+ * <li>{@link MarshalledProp#value() value()}
* </ol>
*
* <p>
@@ -323,13 +323,13 @@ public class BeanMeta<T> {
* This method is used to extract property names from individual annotations, typically when processing
* annotation lists in stream operations.
*
- * @param ai The annotation info containing either a {@link Beanp @Beanp} or {@link Name @Name} annotation.
+ * @param ai The annotation info containing either a {@link MarshalledProp @MarshalledProp} or {@link Name @Name} annotation.
* @return The property name extracted from the annotation, or <jk>null</jk> if no name is found.
* @see #bpName(List, List)
*/
private static String name(AnnotationInfo<?> ai) {
- if (ai.isType(Beanp.class)) {
- var p = ai.cast(Beanp.class).inner();
+ if (ai.isType(MarshalledProp.class)) {
+ var p = ai.cast(MarshalledProp.class).inner();
if (ne(p.name()))
return p.name();
if (ne(p.value()))
@@ -453,7 +453,7 @@ public class BeanMeta<T> {
findBeanFields().forEach(x -> {
var name = ap.find(x).stream()
- .filter(x2 -> x2.isType(Beanp.class) || x2.isType(Name.class))
+ .filter(x2 -> x2.isType(MarshalledProp.class) || x2.isType(Name.class))
.map(BeanMeta::name)
.filter(Objects::nonNull)
.findFirst()
@@ -476,9 +476,9 @@ public class BeanMeta<T> {
if (x.methodType == GETTER) {
// Two getters. Pick the best.
if (nn(bpm.getter)
- && ((! ap.has(Beanp.class, mi) && ap.has(Beanp.class, bpm.getter))
+ && ((! ap.has(MarshalledProp.class, mi) && ap.has(MarshalledProp.class, bpm.getter))
|| (m.getName().startsWith("is") && bpm.getter.getNameSimple().startsWith("get")))) {
- // @Beanp on existing getter takes precedence; else getX() overrides isX().
+ // @MarshalledProp on existing getter takes precedence; else getX() overrides isX().
m = bpm.getter.inner();
}
bpm.setGetter(info(m));
@@ -535,7 +535,7 @@ public class BeanMeta<T> {
for (var fp : beanConstructor.args()) {
var m = normalProps.get(fp);
if (m == null)
- throw bex(c, "The property ''{0}'' was defined on the @Beanc(properties=X) annotation but was not found on the class definition.", fp);
+ throw bex(c, "The property ''{0}'' was defined on the @MarshalledCtor(properties=X) annotation but was not found on the class definition.", fp);
m.setAsConstructorArg();
}
@@ -813,7 +813,7 @@ public class BeanMeta<T> {
* <p>
* The constructor is determined by {@link #findBeanConstructor()} and may be:
* <ul>
- * <li>A constructor annotated with {@link Beanc @Beanc}
+ * <li>A constructor annotated with {@link MarshalledCtor @MarshalledCtor}
* <li>An implementation class constructor (if provided)
* <li>A no-argument constructor
* <li><jk>null</jk> if no suitable constructor was found
@@ -837,7 +837,7 @@ public class BeanMeta<T> {
* <p>
* The property names are determined from:
* <ul>
- * <li>The {@link Beanc#properties() properties()} value in the {@link Beanc @Beanc} annotation (if present)
+ * <li>The {@link MarshalledCtor#properties() properties()} value in the {@link MarshalledCtor @MarshalledCtor} annotation (if present)
* <li>Otherwise, the parameter names from the constructor (if available in bytecode)
* </ul>
*
@@ -901,7 +901,7 @@ public class BeanMeta<T> {
* A bean has a constructor if {@link #findBeanConstructor()} was able to find a suitable constructor,
* which may be:
* <ul>
- * <li>A constructor annotated with {@link Beanc @Beanc}
+ * <li>A constructor annotated with {@link MarshalledCtor @MarshalledCtor}
* <li>An implementation class constructor (if provided)
* <li>A no-argument constructor
* </ul>
@@ -982,13 +982,13 @@ public class BeanMeta<T> {
* <p>
* This method searches for a constructor in the following order of precedence:
* <ol>
- * <li><b>{@link Beanc @Beanc} annotated constructor:</b> If a constructor is annotated with {@link Beanc @Beanc},
+ * <li><b>{@link MarshalledCtor @MarshalledCtor} annotated constructor:</b> If a constructor is annotated with {@link MarshalledCtor @MarshalledCtor},
* it is used. The property names are determined from:
* <ul>
- * <li>The {@link Beanc#properties() properties()} value in the annotation, if specified
+ * <li>The {@link MarshalledCtor#properties() properties()} value in the annotation, if specified
* <li>Otherwise, the parameter names from the constructor (if available in bytecode)
* </ul>
- * If multiple constructors are annotated with {@link Beanc @Beanc}, an exception is thrown.
+ * If multiple constructors are annotated with {@link MarshalledCtor @MarshalledCtor}, an exception is thrown.
* <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
@@ -1008,8 +1008,8 @@ public class BeanMeta<T> {
* </ul>
*
* @return A {@link BeanConstructor} containing the found constructor and its associated property names.
- * @throws BeanRuntimeException If multiple constructors are annotated with {@link Beanc @Beanc}, or if
- * the number of properties specified in {@link Beanc @Beanc} doesn't match the number of constructor parameters,
+ * @throws BeanRuntimeException If multiple constructors are annotated with {@link MarshalledCtor @MarshalledCtor}, or if
+ * the number of properties specified in {@link MarshalledCtor @MarshalledCtor} doesn't match the number of constructor parameters,
* or if parameter names cannot be determined from the bytecode.
*/
@SuppressWarnings({
@@ -1020,17 +1020,17 @@ public class BeanMeta<T> {
var vis = beanContext.getBeanConstructorVisibility();
var ci = classMeta;
- var l = ci.getPublicConstructors().stream().filter(x -> ap.has(Beanc.class, x)).toList();
+ var l = ci.getPublicConstructors().stream().filter(x -> ap.has(MarshalledCtor.class, x)).toList();
if (l.isEmpty())
- l = ci.getDeclaredConstructors().stream().filter(x -> ap.has(Beanc.class, x)).toList();
+ l = ci.getDeclaredConstructors().stream().filter(x -> ap.has(MarshalledCtor.class, x)).toList();
if (l.size() > 1)
- throw bex(ci, "Multiple instances of '@Beanc' found.");
+ throw bex(ci, "Multiple instances of '@MarshalledCtor' found.");
if (l.size() == 1) {
var con = first(l).orElseThrow(() -> bex(ci, "No constructor found.")).accessible();
- var args = ap.find(Beanc.class, con).stream().map(x -> x.inner().properties()).filter(StringUtils::isNotBlank).map(x -> split(x)).findFirst().orElse(liste());
+ var args = ap.find(MarshalledCtor.class, con).stream().map(x -> x.inner().properties()).filter(StringUtils::isNotBlank).map(x -> split(x)).findFirst().orElse(liste());
if (! con.hasNumParameters(args.size())) {
if (ne(args))
- throw bex(ci, "Number of properties defined in '@Beanc' annotation does not match number of parameters in constructor.");
+ throw bex(ci, "Number of properties defined in '@MarshalledCtor' annotation does not match number of parameters in constructor.");
args = con.getParameters().stream().map(x -> x.getName()).toList();
for (int i = 0; i < args.size(); i++) {
if (isBlank(args.get(i)))
@@ -1060,17 +1060,17 @@ public class BeanMeta<T> {
}
/**
- * Resolves the bean property name for a field when {@link Beanp @Beanp} or {@link Name @Name} supplies
+ * Resolves the bean property name for a field when {@link MarshalledProp @MarshalledProp} or {@link Name @Name} supplies
* <js>"*"</js>.
*
* <p>
* On a {@link Map} field, <js>"*"</js> remains the dyna-property name. On any other field type, <js>"*"</js> is
- * treated like an unnamed {@code @Beanp} (apply other attributes) but the property name is taken from the field
+ * treated like an unnamed {@code @MarshalledProp} (apply other attributes) but the property name is taken from the field
* (via {@link PropertyNamer#getPropertyName(String)}).
* </p>
*
* @param x Field being registered.
- * @param nameFromAnnotations Name from {@code @Beanp}/{@code @Name}, or already-resolved default from the field name.
+ * @param nameFromAnnotations Name from {@code @MarshalledProp}/{@code @Name}, or already-resolved default from the field name.
* @param propertyNamer Namer for raw field names.
* @return Property key to use in {@link BeanMeta}.
*/
@@ -1092,8 +1092,8 @@ public class BeanMeta<T> {
* <li>Not static
* <li>Not transient (unless transient fields are not ignored)
* <li>Not annotated with {@link Transient @Transient} (unless transient fields are not ignored)
- * <li>Not annotated with {@link BeanIgnore @BeanIgnore}
- * <li>Visible according to the specified visibility level, or annotated with {@link Beanp @Beanp}
+ * <li>Not annotated with {@link MarshalledIgnore @MarshalledIgnore}
+ * <li>Visible according to the specified visibility level, or annotated with {@link MarshalledProp @MarshalledProp}
* </ul>
*
* @return A collection of all bean fields found in the class hierarchy.
@@ -1112,8 +1112,8 @@ public class BeanMeta<T> {
.filter(x -> x.isNotStatic()
&& (x.isNotTransient() || noIgnoreTransients)
&& (! x.hasAnnotation(Transient.class) || noIgnoreTransients)
- && ! ap.has(BeanIgnore.class, x)
- && (v.isVisible(x.inner()) || ap.has(Beanp.class, x)
+ && ! ap.has(MarshalledIgnore.class, x)
+ && (v.isVisible(x.inner()) || ap.has(MarshalledProp.class, x)
|| (isRecord && recordComponentNames.contains(x.getName()))))
.toList();
// @formatter:on
@@ -1130,18 +1130,18 @@ public class BeanMeta<T> {
* <ul>
* <li><c>getX()</c> - standard getter pattern
* <li><c>isX()</c> - boolean getter pattern (returns boolean or Boolean)
- * <li>Methods annotated with {@link Beanp @Beanp} or {@link Name @Name}
- * <li>Methods with {@link Beanp @Beanp} annotation with value <js>"*"</js> that return a Map
+ * <li>Methods annotated with {@link MarshalledProp @MarshalledProp} or {@link Name @Name}
+ * <li>Methods with {@link MarshalledProp @MarshalledProp} annotation with value <js>"*"</js> that return a Map
* </ul>
* <li><b>Setters:</b> Methods with one parameter that match patterns like:
* <ul>
* <li><c>setX(value)</c> - standard setter pattern
* <li><c>withX(value)</c> - fluent setter pattern (returns the bean type)
- * <li>Methods annotated with {@link Beanp @Beanp} or {@link Name @Name}
- * <li>Methods with {@link Beanp @Beanp} annotation with value <js>"*"</js> that accept a Map
+ * <li>Methods annotated with {@link MarshalledProp @MarshalledProp} or {@link Name @Name}
+ * <li>Methods with {@link MarshalledProp @MarshalledProp} annotation with value <js>"*"</js> that accept a Map
* <li>Fluent setters (if enabled) - methods that return the bean type and accept one parameter
* </ul>
- * <li><b>ExtraKeys:</b> Methods with {@link Beanp @Beanp} annotation with value <js>"*"</js> that return a Collection
+ * <li><b>ExtraKeys:</b> Methods with {@link MarshalledProp @MarshalledProp} annotation with value <js>"*"</js> that return a Collection
* </ul>
*
* <p>
@@ -1149,15 +1149,15 @@ public class BeanMeta<T> {
* <ul>
* <li>Not static, not bridge methods
* <li>Parameter count ≤ 2
- * <li>Not annotated with {@link BeanIgnore @BeanIgnore}
+ * <li>Not annotated with {@link MarshalledIgnore @MarshalledIgnore}
* <li>Not annotated with {@link Transient @Transient}
- * <li>Visible according to the specified visibility level, or annotated with {@link Beanp @Beanp} or {@link Name @Name}
+ * <li>Visible according to the specified visibility level, or annotated with {@link MarshalledProp @MarshalledProp} or {@link Name @Name}
* </ul>
*
* <p>
* Property names are determined from:
* <ul>
- * <li>{@link Beanp @Beanp} or {@link Name @Name} annotations (if present)
+ * <li>{@link MarshalledProp @MarshalledProp} or {@link Name @Name} annotations (if present)
* <li>Otherwise, derived from the method name using the provided {@link PropertyNamer}
* </ul>
*
@@ -1172,16 +1172,16 @@ public class BeanMeta<T> {
var ci = classMeta;
var v = beanContext.getBeanMethodVisibility();
var pn = opt(beanFilter).map(x -> x.getPropertyNamer()).orElse(beanContext.getPropertyNamer());
- var suppressedFromBeanIgnoredFields = findSuppressedPropertyNamesFromIgnoredFields(pn);
+ var suppressedFromMarshalledIgnoredFields = findSuppressedPropertyNamesFromIgnoredFields(pn);
classHierarchy.get().stream().forEach(c2 -> {
for (var m : c2.getDeclaredMethods()) {
var mm = m.getMatchingMethods();
- var beanps = ap.find(Beanp.class, m).stream().map(AnnotationInfo::inner).toList();
+ var beanps = ap.find(MarshalledProp.class, m).stream().map(AnnotationInfo::inner).toList();
var names = ap.find(Name.class, m).stream().map(AnnotationInfo::inner).toList();
// Skip static, bridge, or methods with >2 params; skip if ignored, transient, or not visible
if (m.isStatic() || m.isBridge() || m.getParameterCount() > 2
- || mm.stream().anyMatch(m2 -> ap.has(BeanIgnore.class, m2, SELF))
+ || mm.stream().anyMatch(m2 -> ap.has(MarshalledIgnore.class, m2, SELF))
|| mm.stream().anyMatch(m2 -> ap.find(Transient.class, m2, SELF).stream().map(x -> x.inner().value()).findFirst().orElse(false))
|| ! (m.isVisible(v) || ne(beanps) || ne(names)))
continue;
@@ -1259,12 +1259,12 @@ public class BeanMeta<T> {
n = pn.getPropertyName(n);
if ("*".equals(bpName) && methodType == UNKNOWN)
- throw bex(ci, "Found @Beanp(\"*\") but could not determine method type on method ''{0}''.", m.getNameSimple());
+ throw bex(ci, "Found @MarshalledProp(\"*\") but could not determine method type on method ''{0}''.", m.getNameSimple());
if (methodType != UNKNOWN) {
if (nn(bpName) && ! bpName.isEmpty())
n = bpName;
- if (nn(n) && ! suppressedFromBeanIgnoredFields.contains(n))
+ if (nn(n) && ! suppressedFromMarshalledIgnoredFields.contains(n))
l.add(new BeanMethod(n, methodType, m.inner()));
}
}
@@ -1439,18 +1439,18 @@ public class BeanMeta<T> {
/*
* Merges standard JavaBeans {@link BeanInfo} property descriptors into {@code normalProps}, skipping the class
- * pseudo-property and logical names suppressed when {@link BeanIgnore#ignoreAccessors()} is <jk>true</jk> on a field.
+ * pseudo-property and logical names suppressed when {@link MarshalledIgnore#ignoreAccessors()} is <jk>true</jk> on a field.
*/
@SuppressWarnings({
- "java:S135" // Two continues: skip class pseudo-property and names suppressed via @BeanIgnore(ignoreAccessors)
+ "java:S135" // Two continues: skip class pseudo-property and names suppressed via @MarshalledIgnore(ignoreAccessors)
})
private void mergeJavaBeanPropertyDescriptorsIntoNormalProps(BeanInfo bi, Map<String,BeanPropertyMeta.Builder> normalProps,
PropertyNamer propertyNamer) {
- var suppressedFromBeanIgnoredFields = findSuppressedPropertyNamesFromIgnoredFields(propertyNamer);
+ var suppressedFromMarshalledIgnoredFields = findSuppressedPropertyNamesFromIgnoredFields(propertyNamer);
for (var pd : bi.getPropertyDescriptors()) {
if (PROP_class.equals(pd.getName()))
continue;
- if (suppressedFromBeanIgnoredFields.contains(pd.getName()))
+ if (suppressedFromMarshalledIgnoredFields.contains(pd.getName()))
continue;
var builder = normalProps.computeIfAbsent(pd.getName(), n -> BeanPropertyMeta.builder(this, n));
if (pd.getReadMethod() != null)
@@ -1462,27 +1462,27 @@ public class BeanMeta<T> {
/*
* Property names suppressed from getter/setter discovery because a non-static field with that logical name is
- * annotated with {@link BeanIgnore @BeanIgnore} and {@link BeanIgnore#ignoreAccessors()} is <jk>true</jk>.
+ * annotated with {@link MarshalledIgnore @MarshalledIgnore} and {@link MarshalledIgnore#ignoreAccessors()} is <jk>true</jk>.
*
* <p>
- * When {@link BeanIgnore#ignoreAccessors()} is <jk>false</jk> (the default), ignored fields do not suppress
- * JavaBean accessors so patterns such as {@code @BeanIgnore} on a private field with a public {@code getX()} still
+ * When {@link MarshalledIgnore#ignoreAccessors()} is <jk>false</jk> (the default), ignored fields do not suppress
+ * JavaBean accessors so patterns such as {@code @MarshalledIgnore} on a private field with a public {@code getX()} still
* expose {@code x} when field visibility excludes the field.
*/
@SuppressWarnings({
- "java:S135" // Two continues in inner loop: skip fields without @BeanIgnore or without ignoreAccessors
+ "java:S135" // Two continues in inner loop: skip fields without @MarshalledIgnore or without ignoreAccessors
})
private Set<String> findSuppressedPropertyNamesFromIgnoredFields(PropertyNamer propertyNamer) {
var s = new HashSet<String>();
var ap = beanContext.getAnnotationProvider();
for (var c2 : classHierarchy.get()) {
for (var x : c2.getDeclaredFields()) {
- if (! x.isNotStatic() || ! ap.has(BeanIgnore.class, x))
+ if (! x.isNotStatic() || ! ap.has(MarshalledIgnore.class, x))
continue;
- if (! fieldBeanIgnoreIgnoresAccessors(x))
+ if (! fieldMarshalledIgnoreIgnoresAccessors(x))
continue;
var name = ap.find(x).stream()
- .filter(x2 -> x2.isType(Beanp.class) || x2.isType(Name.class))
+ .filter(x2 -> x2.isType(MarshalledProp.class) || x2.isType(Name.class))
.map(BeanMeta::name)
.filter(Objects::nonNull)
.findFirst()
@@ -1495,8 +1495,8 @@ public class BeanMeta<T> {
return s;
}
- private static boolean fieldBeanIgnoreIgnoresAccessors(FieldInfo x) {
- for (var bi : x.inner().getAnnotationsByType(BeanIgnore.class))
+ private static boolean fieldMarshalledIgnoreIgnoresAccessors(FieldInfo x) {
+ for (var bi : x.inner().getAnnotationsByType(MarshalledIgnore.class))
if (bi.ignoreAccessors())
return true;
return false;
@@ -1517,7 +1517,7 @@ public class BeanMeta<T> {
* <li>Is not static
* <li>Is not transient (unless transient fields are not ignored)
* <li>Is not annotated with {@link Transient @Transient} (unless transient fields are not ignored)
- * <li>Is not annotated with {@link BeanIgnore @BeanIgnore}
+ * <li>Is not annotated with {@link MarshalledIgnore @MarshalledIgnore}
* </ul>
*
* <p>
@@ -1539,7 +1539,7 @@ public class BeanMeta<T> {
x -> x.isNotStatic()
&& (x.isNotTransient() || noIgnoreTransients)
&& (! x.hasAnnotation(Transient.class) || noIgnoreTransients)
- && ! ap.has(BeanIgnore.class, x)
+ && ! ap.has(MarshalledIgnore.class, x)
&& x.hasName(name)
).stream())
.findFirst();
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 878644eacb..0112e90c82 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
@@ -21,7 +21,7 @@ import java.util.*;
import org.apache.juneau.annotation.*;
/**
- * Same as {@link BeanMeta}, except the list of bean properties are limited by a {@link Beanp#properties() @Beanp(properties)} annotation.
+ * Same as {@link BeanMeta}, except the list of bean properties are limited by a {@link MarshalledProp#properties() @MarshalledProp(properties)} annotation.
*
*
* @param <T> The class type that this metadata applies to.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index b00a792e90..b41941d586 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -165,7 +165,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
return this;
}
- private static ObjectSwap beanpSwap(AnnotationInfo<Beanp> ai) {
+ private static ObjectSwap beanpSwap(AnnotationInfo<MarshalledProp> ai) {
var p = ai.inner();
if (! p.format().isEmpty())
return BeanInstantiator.of(ObjectSwap.class).type(StringFormatSwap.class).addBean(String.class, p.format()).run();
@@ -321,9 +321,9 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
var si = setter;
if (nn(innerField)) {
- var lp = ap.find(Beanp.class, ifi);
+ var lp = ap.find(MarshalledProp.class, ifi);
if (nn(field) || ne(lp)) {
- // Only use field type if it's a bean property or has @Beanp annotation.
+ // Only use field type if it's a bean property or has @MarshalledProp annotation.
// Otherwise, we want to infer the type from the getter or setter.
rawTypeMeta = bc.resolveClassMeta(opt(last(lp)).orElse(null), innerField.getFieldType(), typeVarImpls);
isUri |= (rawTypeMeta.isUri());
@@ -345,7 +345,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
}
if (nn(getter)) {
- var lp = ap.find(Beanp.class, gi);
+ var lp = ap.find(MarshalledProp.class, gi);
if (rawTypeMeta == null)
rawTypeMeta = bc.resolveClassMeta(opt(last(lp)).orElse(null), getter.getReturnType(), typeVarImpls);
isUri |= (rawTypeMeta.isUri() || ap.has(Uri.class, gi));
@@ -365,7 +365,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
}
if (nn(setter)) {
- var lp = ap.find(Beanp.class, si);
+ var lp = ap.find(MarshalledProp.class, si);
if (rawTypeMeta == null)
rawTypeMeta = bc.resolveClassMeta(opt(last(lp)).orElse(null), setter.getParameterTypes().get(0), typeVarImpls);
isUri |= (rawTypeMeta.isUri() || ap.has(Uri.class, si));
@@ -490,11 +490,11 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
private final boolean isUri; // True if this is a URL/URI or annotated with @URI.
private final String name; // The name of the property.
private final Object overrideValue; // The bean property value (if it's an overridden delegate).
- private final List<String> properties; // The value of the @Beanp(properties) annotation (unmodifiable).
+ private final List<String> properties; // The value of the @MarshalledProp(properties) annotation (unmodifiable).
private final ClassMeta<?> rawTypeMeta; // The real class type of the bean property.
private final boolean readOnly; // True if this property is read-only.
private final MethodInfo setter; // The bean property setter.
- private final ObjectSwap swap; // ObjectSwap defined only via @Beanp annotation.
+ private final ObjectSwap swap; // ObjectSwap defined only via @MarshalledProp annotation.
private final ClassMeta<?> typeMeta; // The transformed class type of the bean property.
private final boolean writeOnly; // True if this property is write-only.
@@ -819,7 +819,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
* <p>
* The order of lookup for the dictionary is as follows:
* <ol>
- * <li>Dictionary defined via {@link Beanp#dictionary() @Beanp(dictionary)}.
+ * <li>Dictionary defined via {@link MarshalledProp#dictionary() @MarshalledProp(dictionary)}.
* <li>Dictionary defined via {@link BeanContext.Builder#beanDictionary(Class...)}.
* </ol>
*
@@ -907,7 +907,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
public String getName() { return name; }
/**
- * Returns the override list of properties defined through a {@link Beanp#properties() @Beanp(properties)} annotation
+ * Returns the override list of properties defined through a {@link MarshalledProp#properties() @MarshalledProp(properties)} annotation
* on this property.
*
* @return An unmodifiable list of override properties, or <jk>null</jk> if annotation not specified.
@@ -1344,7 +1344,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
private Object swap(BeanSession session, Object o) throws SerializeException {
try {
- // First use swap defined via @Beanp.
+ // First use swap defined via @MarshalledProp.
if (nn(swap))
return swap.swap(session, o);
if (o == null)
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 65429839a0..62dda51aad 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
@@ -1513,6 +1513,23 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
var ap = beanContext.getAnnotationProvider();
ap.find(Swap.class, this).stream().map(AnnotationInfo::inner).forEach(x -> list.add(createSwap(x)));
+
+ // @Marshalled(as=STRING) installs an AutoStringSwap before any auto-detection.
+ if (list.isEmpty()) {
+ var marshalledList = ap.find(Marshalled.class, this);
+ if (marshalledList.stream().anyMatch(x -> x.inner().as() == MarshalledAs.STRING))
+ list.add(new AutoStringSwap<>(this));
+ }
+
+ // @MarshalledIgnore on TYPE — skip entirely: serialize as null, parse as null.
+ // Use String.class (not Object.class) as swapClass so sType.isObject() stays false
+ // and the serializer correctly emits "null" when swap() returns null.
+ if (list.isEmpty() && ap.has(MarshalledIgnore.class, this))
+ list.add(new ObjectSwap<T,String>(inner(), String.class) {
+ @Override public String swap(BeanSession session, T o) { return null; }
+ @Override public T unswap(BeanSession session, String s, ClassMeta<?> hint) { return null; }
+ });
+
var ds = DefaultSwaps.find(this);
if (ds == null && !isStreamable()) {
ds = AutoObjectSwap.find(beanContext, this);
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 1d0bddddd8..1b4046a920 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
@@ -206,9 +206,9 @@ public abstract class Context {
* and passed into the builder class:
* <ul class='javatreec'>
* <li class='ja'>{@link MarshalledAnnotation}
- * <li class='ja'>{@link BeancAnnotation}
- * <li class='ja'>{@link BeanIgnoreAnnotation}
- * <li class='ja'>{@link BeanpAnnotation}
+ * <li class='ja'>{@link MarshalledCtorAnnotation}
+ * <li class='ja'>{@link MarshalledIgnoreAnnotation}
+ * <li class='ja'>{@link MarshalledPropAnnotation}
* <li class='ja'>{@link ExampleAnnotation}
* <li class='ja'>{@link NamePropertyAnnotation}
* <li class='ja'>{@link ParentPropertyAnnotation}
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 896fc18c1f..50c2b05358 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
@@ -432,7 +432,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#readOnlyProperties()}
- * <li class='ja'>{@link Beanp#ro()}
+ * <li class='ja'>{@link MarshalledProp#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)}
@@ -542,7 +542,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#writeOnlyProperties()}
- * <li class='ja'>{@link Beanp#wo()}
+ * <li class='ja'>{@link MarshalledProp#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)}
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 87c80e7a7c..40b2f332d7 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
@@ -190,7 +190,7 @@ public class UriContext {
* @param pathInfo
* The path info (e.g. <js>"/path-info"</js>, or <js>"path-info"</js>)
*/
- @Beanc
+ @MarshalledCtor
public UriContext(@Name("authority") String authority, @Name("contextRoot") String contextRoot, @Name("servletPath") String servletPath, @Name("pathInfo") String pathInfo) {
this.authority = nullIfEmpty(trimSlashes(authority));
this.contextRoot = nullIfEmpty(trimSlashes(contextRoot));
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 d0b21690be..6a012fa21e 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
@@ -331,7 +331,7 @@ public @interface BeanConfig {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
- * <li class='ja'>{@link Beanp#dictionary()}
+ * <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link BeanConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanDictionaryBasics">Bean Dictionary Basics</a>
@@ -349,7 +349,7 @@ public @interface BeanConfig {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
- * <li class='ja'>{@link Beanp#dictionary()}
+ * <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link BeanConfig#dictionary()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* </ul>
@@ -707,7 +707,7 @@ public @interface BeanConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanIgnore}
+ * <li class='ja'>{@link MarshalledIgnore}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#notBeanClasses(Class...)}
* </ul>
*
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 0e06826605..ecb45f35b4 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
@@ -50,6 +50,19 @@ import org.apache.juneau.swap.*;
})
public @interface Marshalled {
+ /**
+ * Specifies the marshalling strategy for this type.
+ *
+ * <p>
+ * Defaults to {@link MarshalledAs#DETECT} (auto-detection).
+ * Use {@link MarshalledAs#STRING} to serialize via {@code toString()} and deserialize via
+ * {@code fromString}/{@code valueOf}/single-String constructor — equivalent to the former
+ * {@code BeanStringSwap} pattern.
+ *
+ * @return The marshalling strategy.
+ */
+ MarshalledAs as() default MarshalledAs.DETECT;
+
/**
* Optional description for the exposed API.
*
@@ -65,7 +78,7 @@ public @interface Marshalled {
* 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 MarshalledProp#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...)}
@@ -157,7 +170,7 @@ public @interface Marshalled {
*
* <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='ja'>{@link MarshalledProp#factory()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
* </ul>
*
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 b3d4626857..4d2354a105 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
@@ -45,6 +45,7 @@ public class MarshalledAnnotation {
*/
public static class Builder extends AnnotationObject.Builder {
+ private MarshalledAs as = MarshalledAs.DETECT;
private String[] description = {};
private Class<?>[] dictionary = new Class[0];
private Class<?> implClass = void.class;
@@ -84,6 +85,17 @@ public class MarshalledAnnotation {
return new Object(this);
}
+ /**
+ * Sets the {@link Marshalled#as()} property on this annotation.
+ *
+ * @param value The new value for this property.
+ * @return This object.
+ */
+ public Builder as(MarshalledAs value) {
+ as = value;
+ return this;
+ }
+
/**
* Sets the description property on this annotation.
*
@@ -323,6 +335,7 @@ public class MarshalledAnnotation {
})
private static class Object extends AnnotationObject implements Marshalled {
+ private final MarshalledAs as;
private final String[] description;
private final boolean findFluentSetters;
private final boolean unsorted;
@@ -348,6 +361,7 @@ public class MarshalledAnnotation {
Object(MarshalledAnnotation.Builder b) {
super(b);
+ as = b.as;
description = copyOf(b.description);
dictionary = copyOf(b.dictionary);
example = b.example;
@@ -371,6 +385,11 @@ public class MarshalledAnnotation {
xp = b.xp;
}
+ @Override /* Overridden from Marshalled */
+ public MarshalledAs as() {
+ return as;
+ }
+
@Override /* Overridden from Marshalled */
public Class<?>[] dictionary() {
return dictionary;
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
similarity index 56%
copy from juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
copy to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
index d675152cb8..39be624e80 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
@@ -14,35 +14,28 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.examples.core.pojo;
-
-import org.apache.juneau.annotation.*;
+package org.apache.juneau.annotation;
/**
- * Sample pojo class.
- *
+ * Specifies the marshalling strategy for a type annotated with {@link Marshalled @Marshalled}.
*/
-public class Pojo {
- private final String id;
- private final String name;
-
- /**
- * @param id The <bc>id</bc> property value.
- * @param name The <bc>name</bc> property value.
- */
- @Beanc
- public Pojo(@Name("id") String id, @Name("name") String name) {
- this.id = id;
- this.name = name;
- }
+public enum MarshalledAs {
/**
- * @return The <bc>id</bc> property value.
+ * Auto-detect the marshalling strategy (default).
+ *
+ * <p>
+ * The marshalling engine inspects the type and selects the best strategy
+ * (bean, map, collection, string swap, etc.).
*/
- public String getId() { return id; }
+ DETECT,
/**
- * @return The <bc>name</bc> property value.
+ * Serialize using {@link Object#toString()} and deserialize using a {@code fromString(String)},
+ * {@code valueOf(String)}, or single-{@code String}-argument constructor.
+ *
+ * <p>
+ * Replaces the common {@code BeanStringSwap} use case without requiring a separate swap class.
*/
- public String getName() { return name; }
-}
\ No newline at end of file
+ STRING
+}
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/MarshalledCtor.java
similarity index 92%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanc.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtor.java
index f65f311015..9cd030452d 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/MarshalledCtor.java
@@ -30,7 +30,7 @@ import org.apache.juneau.*;
* Can be used in the following locations:
* <ul>
* <li>Bean constructors.
- * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link BeancApply @BeancApply}.
+ * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link MarshalledCtorApply @MarshalledCtorApply}.
* </ul>
* <p>
@@ -61,14 +61,14 @@ import org.apache.juneau.*;
* Multiple calls to {@link BeanMap#getBean()} will return the same bean instance.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeancAnnotation">@Beanc Annotation</a>
+ * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshalledCtorAnnotation">@MarshalledCtor Annotation</a>
* </ul>
*/
@Documented
@Target({ CONSTRUCTOR })
@Retention(RUNTIME)
@Inherited
-public @interface Beanc {
+public @interface MarshalledCtor {
/**
* Optional description for the exposed API.
@@ -82,7 +82,7 @@ public @interface Beanc {
* The names of the properties of the constructor arguments.
*
* <p>
- * The {@link org.apache.juneau.annotation.Beanc @Beanc} annotation is used to map constructor arguments to property
+ * The {@link org.apache.juneau.annotation.MarshalledCtor @MarshalledCtor} annotation is used to map constructor arguments to property
* names on bean with read-only properties.
* <br>Since method parameter names are lost during compilation, this annotation essentially redefines them so that
* they are available at runtime.
@@ -95,7 +95,7 @@ public @interface Beanc {
* <jk>private final</jk> String <jf>name</jf>;
* <jk>private final int</jk> <jf>age</jf>;
*
- * <ja>@Beanc</ja>(properties=<js>"name,age"</js>)
+ * <ja>@MarshalledCtor</ja>(properties=<js>"name,age"</js>)
* <jk>public</jk> Person(String <jv>name</jv>, <jk>int</jk> <jv>age</jv>) {
* <jk>this</jk>.<jf>name</jf> = <jv>name</jv>;
* <jk>this</jk>.<jf>age</jf> = <jv>age</jv>;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
similarity index 78%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
index 03392b5d96..544dbfe26e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
@@ -23,15 +23,15 @@ import java.lang.annotation.*;
import org.apache.juneau.commons.annotation.*;
/**
- * Utility classes and methods for the {@link Beanc @Beanc} annotation.
+ * Utility classes and methods for the {@link MarshalledCtor @MarshalledCtor} annotation.
*
*/
-public class BeancAnnotation {
+public class MarshalledCtorAnnotation {
/**
* Prevents instantiation.
*/
- private BeancAnnotation() {}
+ private MarshalledCtorAnnotation() {}
/**
* Builder class.
@@ -49,15 +49,15 @@ public class BeancAnnotation {
* Constructor.
*/
protected Builder() {
- super(Beanc.class);
+ super(MarshalledCtor.class);
}
/**
- * Instantiates a new {@link Beanc @Beanc} object initialized with this builder.
+ * Instantiates a new {@link MarshalledCtor @MarshalledCtor} object initialized with this builder.
*
- * @return A new {@link Beanc @Beanc} object.
+ * @return A new {@link MarshalledCtor @MarshalledCtor} object.
*/
- public Beanc build() {
+ public MarshalledCtor build() {
return new Object(this);
}
@@ -73,7 +73,7 @@ public class BeancAnnotation {
}
/**
- * Sets the {@link Beanc#properties()} property on this annotation.
+ * Sets the {@link MarshalledCtor#properties()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -88,30 +88,30 @@ public class BeancAnnotation {
@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 Beanc {
+ private static class Object extends AnnotationObject implements MarshalledCtor {
private final String[] description;
private final String properties;
- Object(BeancAnnotation.Builder b) {
+ Object(MarshalledCtorAnnotation.Builder b) {
super(b);
description = copyOf(b.description);
properties = b.properties;
}
- @Override /* Overridden from Beanc */
+ @Override /* Overridden from MarshalledCtor */
public String[] description() {
return description;
}
- @Override /* Overridden from Beanc */
+ @Override /* Overridden from MarshalledCtor */
public String properties() {
return properties;
}
}
/** Default value */
- public static final Beanc DEFAULT = create().build();
+ public static final MarshalledCtor DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApply.java
similarity index 78%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApply.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApply.java
index 55206c9ca7..885c650b4b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApply.java
@@ -22,16 +22,16 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
- * Dynamically applies a {@link Beanp @Beanp} annotation to specified classes, methods, or fields.
+ * Dynamically applies a {@link MarshalledCtor @MarshalledCtor} 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 Beanp @Beanp} to be a pure data annotation
+ * <b>content</b> concern ({@link #value()}), enabling {@link MarshalledCtor @MarshalledCtor} to be a pure data annotation
* without marshall-specific application machinery.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <ja>@BeanpApply</ja>(on=<js>"com.example.Foo.bar"</js>, value=<ja>@Beanp</ja>(ro=<js>"true"</js>))
+ * <ja>@MarshalledCtorApply</ja>(on=<js>"Person(String,int)"</js>, value=<ja>@MarshalledCtor</ja>(properties=<js>"name,age"</js>))
* <jk>public class</jk> MyConfig {}
* </p>
*
@@ -42,16 +42,16 @@ import java.lang.annotation.*;
@Documented
@Target({ TYPE, METHOD })
@Retention(RUNTIME)
-@Repeatable(BeanpApply.Array.class)
-@ContextApply(BeanpApplyAnnotation.Applier.class)
-public @interface BeanpApply {
+@Repeatable(MarshalledCtorApply.Array.class)
+@ContextApply(MarshalledCtorApplyAnnotation.Applier.class)
+public @interface MarshalledCtorApply {
/**
- * The {@link Beanp @Beanp} annotation to apply.
+ * The {@link MarshalledCtor @MarshalledCtor} annotation to apply.
*
* @return The annotation value.
*/
- Beanp value();
+ MarshalledCtor value();
/**
* Dynamically apply this annotation to the specified classes/methods/fields.
@@ -79,7 +79,7 @@ public @interface BeanpApply {
Class<?>[] onClass() default {};
/**
- * A collection of {@link BeanpApply @BeanpApply annotations}.
+ * A collection of {@link MarshalledCtorApply @MarshalledCtorApply annotations}.
*/
@Documented
@Target({ TYPE, METHOD })
@@ -91,6 +91,6 @@ public @interface BeanpApply {
*
* @return The annotation value.
*/
- BeanpApply[] value();
+ MarshalledCtorApply[] value();
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
similarity index 76%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApplyAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
index 72d0bb6c60..82b84a9341 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
@@ -27,20 +27,20 @@ import org.apache.juneau.commons.reflect.*;
import org.apache.juneau.svl.*;
/**
- * Utility classes and methods for the {@link BeanpApply @BeanpApply} annotation.
+ * Utility classes and methods for the {@link MarshalledCtorApply @MarshalledCtorApply} annotation.
*
*/
-public class BeanpApplyAnnotation {
+public class MarshalledCtorApplyAnnotation {
/**
* Prevents instantiation.
*/
- private BeanpApplyAnnotation() {}
+ private MarshalledCtorApplyAnnotation() {}
/**
- * Applies targeted {@link BeanpApply} annotations to a {@link org.apache.juneau.Context.Builder}.
+ * Applies targeted {@link MarshalledCtorApply} annotations to a {@link org.apache.juneau.Context.Builder}.
*/
- public static class Applier extends AnnotationApplier<BeanpApply,Context.Builder> {
+ public static class Applier extends AnnotationApplier<MarshalledCtorApply,Context.Builder> {
/**
* Constructor.
@@ -48,12 +48,12 @@ public class BeanpApplyAnnotation {
* @param vr The resolver for resolving values in annotations.
*/
public Applier(VarResolverSession vr) {
- super(BeanpApply.class, Context.Builder.class, vr);
+ super(MarshalledCtorApply.class, Context.Builder.class, vr);
}
@Override
- public void apply(AnnotationInfo<BeanpApply> ai, Context.Builder b) {
- BeanpApply a = ai.inner();
+ public void apply(AnnotationInfo<MarshalledCtorApply> ai, Context.Builder b) {
+ MarshalledCtorApply a = ai.inner();
if (isEmptyArray(a.on()) && isEmptyArray(a.onClass()))
return;
b.annotations(a);
@@ -69,22 +69,22 @@ public class BeanpApplyAnnotation {
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
- Beanp value = BeanpAnnotation.DEFAULT;
+ MarshalledCtor value = MarshalledCtorAnnotation.DEFAULT;
/**
* Constructor.
*/
protected Builder() {
- super(BeanpApply.class);
+ super(MarshalledCtorApply.class);
}
/**
- * Sets the {@link BeanpApply#value()} property on this annotation.
+ * Sets the {@link MarshalledCtorApply#value()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
*/
- public Builder value(Beanp value) {
+ public Builder value(MarshalledCtor value) {
this.value = value;
return this;
}
@@ -144,11 +144,11 @@ public class BeanpApplyAnnotation {
}
/**
- * Instantiates a new {@link BeanpApply @BeanpApply} object initialized with this builder.
+ * Instantiates a new {@link MarshalledCtorApply @MarshalledCtorApply} object initialized with this builder.
*
- * @return A new {@link BeanpApply} object.
+ * @return A new {@link MarshalledCtorApply} object.
*/
- public BeanpApply build() {
+ public MarshalledCtorApply build() {
return new Object(this);
}
}
@@ -156,33 +156,33 @@ public class BeanpApplyAnnotation {
@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 BeanpApply {
+ private static class Object extends AppliedOnClassAnnotationObject implements MarshalledCtorApply {
- private final Beanp value;
+ private final MarshalledCtor value;
- Object(BeanpApplyAnnotation.Builder b) {
+ Object(MarshalledCtorApplyAnnotation.Builder b) {
super(b);
value = b.value;
}
- @Override /* Overridden from BeanpApply */
- public Beanp value() {
+ @Override /* Overridden from MarshalledCtorApply */
+ public MarshalledCtor value() {
return value;
}
- @Override /* Overridden from BeanpApply */
+ @Override /* Overridden from MarshalledCtorApply */
public String[] on() {
return super.on();
}
- @Override /* Overridden from BeanpApply */
+ @Override /* Overridden from MarshalledCtorApply */
public Class<?>[] onClass() {
return super.onClass();
}
}
/** Default value */
- public static final BeanpApply DEFAULT = create().build();
+ public static final MarshalledCtorApply DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
@@ -219,7 +219,7 @@ public class BeanpApplyAnnotation {
* @param a The annotation to check.
* @return <jk>true</jk> if the specified annotation contains all default values.
*/
- public static boolean empty(BeanpApply a) {
+ public static boolean empty(MarshalledCtorApply a) {
return a == null || DEFAULT.equals(a);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
similarity index 68%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
index c1751cfaa1..3bd402f0df 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnore.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
@@ -24,18 +24,22 @@ import java.lang.annotation.*;
import org.apache.juneau.commons.reflect.Visibility;
/**
- * Ignore classes, fields, and methods from being interpreted as bean or bean components.
+ * Ignore classes, fields, methods, and constructors from being interpreted as bean components, or skip a type
+ * entirely during serialization and parsing.
*
* <p>
- * Can be used in the following locations:
+ * Behavior depends on the target:
* <ul>
- * <li>Classes - Forces bean-like classes to be treated as non-beans.
- * <li>Methods - Forces getters/setters to be ignored.
- * <li>Fields - Forces bean fields to be ignored.
- * <li>
- * Fields — Use {@link #ignoreAccessors()} to also exclude matching JavaBean accessors from bean metadata (see
- * {@link #ignoreAccessors()}).
- * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link BeanIgnoreApply @BeanIgnoreApply}.
+ * <li><b>TYPE (class)</b> — Skip this type entirely: serializers output {@code null} and parsers return
+ * {@code null}. Previously {@code @BeanIgnore} on a type meant "force non-bean, fall through to
+ * {@code toString()}". The "use toString" case is now handled by
+ * {@link Marshalled @Marshalled}{@code (as=STRING)}.
+ * <li><b>FIELD</b> — Exclude the field from bean property discovery. Use {@link #ignoreAccessors()} to also
+ * suppress matching JavaBean accessors.
+ * <li><b>METHOD</b> — Force getters/setters to be ignored.
+ * <li><b>CONSTRUCTOR</b> — Exclude the constructor from constructor detection.
+ * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with
+ * {@link MarshalledIgnoreApply @MarshalledIgnoreApply}.
* </ul>
*
* <h5 class='section'>Java Records:</h5>
@@ -46,15 +50,14 @@ import org.apache.juneau.commons.reflect.Visibility;
* output, but the parser will be unable to instantiate the record if the component value is missing from the input.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanIgnoreAnnotation">@BeanIgnore Annotation</a>
-
+ * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshalledIgnoreAnnotation">@MarshalledIgnore Annotation</a>
* </ul>
*/
@Documented
@Target({ FIELD, METHOD, TYPE, CONSTRUCTOR })
@Retention(RUNTIME)
@Inherited
-public @interface BeanIgnore {
+public @interface MarshalledIgnore {
/**
* Optional description for the exposed API.
@@ -69,7 +72,7 @@ public @interface BeanIgnore {
* <c>isX</c>) for the same logical property are also excluded from bean metadata.
*
* <p>
- * Default is <jk>false</jk>: {@code @BeanIgnore} on a field only excludes the field from field-based discovery;
+ * Default is <jk>false</jk>: {@code @MarshalledIgnore} on a field only excludes the field from field-based discovery;
* accessors can still expose the property (for example when {@link org.apache.juneau.BeanContext.Builder#beanFieldVisibility(Visibility) beanFieldVisibility} is {@link Visibility#NONE NONE}). Set to <jk>true</jk> to
* omit the property from serialization and parsing while keeping accessors for other frameworks.
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
similarity index 78%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
index e9949feb84..8c0126ed0b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
@@ -23,15 +23,15 @@ import java.lang.annotation.*;
import org.apache.juneau.commons.annotation.*;
/**
- * Utility classes and methods for the {@link BeanIgnore @BeanIgnore} annotation.
+ * Utility classes and methods for the {@link MarshalledIgnore @MarshalledIgnore} annotation.
*
*/
-public class BeanIgnoreAnnotation {
+public class MarshalledIgnoreAnnotation {
/**
* Prevents instantiation.
*/
- private BeanIgnoreAnnotation() {}
+ private MarshalledIgnoreAnnotation() {}
/**
* Builder class.
@@ -49,15 +49,15 @@ public class BeanIgnoreAnnotation {
* Constructor.
*/
protected Builder() {
- super(BeanIgnore.class);
+ super(MarshalledIgnore.class);
}
/**
- * Instantiates a new {@link BeanIgnore @BeanIgnore} object initialized with this builder.
+ * Instantiates a new {@link MarshalledIgnore @MarshalledIgnore} object initialized with this builder.
*
- * @return A new {@link BeanIgnore @BeanIgnore} object.
+ * @return A new {@link MarshalledIgnore @MarshalledIgnore} object.
*/
- public BeanIgnore build() {
+ public MarshalledIgnore build() {
return new Object(this);
}
@@ -73,7 +73,7 @@ public class BeanIgnoreAnnotation {
}
/**
- * Sets {@link BeanIgnore#ignoreAccessors()}.
+ * Sets {@link MarshalledIgnore#ignoreAccessors()}.
*
* @param value The new value.
* @return This object.
@@ -88,30 +88,30 @@ public class BeanIgnoreAnnotation {
@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 BeanIgnore {
+ private static class Object extends AnnotationObject implements MarshalledIgnore {
private final String[] description;
private final boolean ignoreAccessors;
- Object(BeanIgnoreAnnotation.Builder b) {
+ Object(MarshalledIgnoreAnnotation.Builder b) {
super(b);
this.description = copyOf(b.description);
this.ignoreAccessors = b.ignoreAccessors;
}
- @Override /* Overridden from BeanIgnore */
+ @Override /* Overridden from MarshalledIgnore */
public String[] description() {
return description;
}
- @Override /* Overridden from BeanIgnore */
+ @Override /* Overridden from MarshalledIgnore */
public boolean ignoreAccessors() {
return ignoreAccessors;
}
}
/** Default value */
- public static final BeanIgnore DEFAULT = create().build();
+ public static final MarshalledIgnore DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApply.java
similarity index 78%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApply.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApply.java
index 952ad469df..04bc1a117b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApply.java
@@ -22,16 +22,16 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
- * Dynamically applies a {@link BeanIgnore @BeanIgnore} annotation to specified classes, methods, or fields.
+ * Dynamically applies a {@link MarshalledIgnore @MarshalledIgnore} 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 BeanIgnore @BeanIgnore} to be a pure data annotation
+ * <b>content</b> concern ({@link #value()}), enabling {@link MarshalledIgnore @MarshalledIgnore} to be a pure data annotation
* without marshall-specific application machinery.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <ja>@BeanIgnoreApply</ja>(on=<js>"com.example.Foo"</js>, value=<ja>@BeanIgnore</ja>())
+ * <ja>@MarshalledIgnoreApply</ja>(on=<js>"com.example.Foo"</js>, value=<ja>@MarshalledIgnore</ja>())
* <jk>public class</jk> MyConfig {}
* </p>
*
@@ -42,16 +42,16 @@ import java.lang.annotation.*;
@Documented
@Target({ TYPE, METHOD })
@Retention(RUNTIME)
-@Repeatable(BeanIgnoreApply.Array.class)
-@ContextApply(BeanIgnoreApplyAnnotation.Applier.class)
-public @interface BeanIgnoreApply {
+@Repeatable(MarshalledIgnoreApply.Array.class)
+@ContextApply(MarshalledIgnoreApplyAnnotation.Applier.class)
+public @interface MarshalledIgnoreApply {
/**
- * The {@link BeanIgnore @BeanIgnore} annotation to apply.
+ * The {@link MarshalledIgnore @MarshalledIgnore} annotation to apply.
*
* @return The annotation value.
*/
- BeanIgnore value();
+ MarshalledIgnore value();
/**
* Dynamically apply this annotation to the specified classes/methods/fields.
@@ -82,7 +82,7 @@ public @interface BeanIgnoreApply {
Class<?>[] onClass() default {};
/**
- * A collection of {@link BeanIgnoreApply @BeanIgnoreApply annotations}.
+ * A collection of {@link MarshalledIgnoreApply @MarshalledIgnoreApply annotations}.
*/
@Documented
@Target({ TYPE, METHOD })
@@ -94,6 +94,6 @@ public @interface BeanIgnoreApply {
*
* @return The annotation value.
*/
- BeanIgnoreApply[] value();
+ MarshalledIgnoreApply[] value();
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
similarity index 75%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApplyAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
index bf2bb57fd0..fb1f05a025 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanIgnoreApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
@@ -27,20 +27,20 @@ import org.apache.juneau.commons.reflect.*;
import org.apache.juneau.svl.*;
/**
- * Utility classes and methods for the {@link BeanIgnoreApply @BeanIgnoreApply} annotation.
+ * Utility classes and methods for the {@link MarshalledIgnoreApply @MarshalledIgnoreApply} annotation.
*
*/
-public class BeanIgnoreApplyAnnotation {
+public class MarshalledIgnoreApplyAnnotation {
/**
* Prevents instantiation.
*/
- private BeanIgnoreApplyAnnotation() {}
+ private MarshalledIgnoreApplyAnnotation() {}
/**
- * Applies targeted {@link BeanIgnoreApply} annotations to a {@link org.apache.juneau.Context.Builder}.
+ * Applies targeted {@link MarshalledIgnoreApply} annotations to a {@link org.apache.juneau.Context.Builder}.
*/
- public static class Applier extends AnnotationApplier<BeanIgnoreApply,Context.Builder> {
+ public static class Applier extends AnnotationApplier<MarshalledIgnoreApply,Context.Builder> {
/**
* Constructor.
@@ -48,12 +48,12 @@ public class BeanIgnoreApplyAnnotation {
* @param vr The resolver for resolving values in annotations.
*/
public Applier(VarResolverSession vr) {
- super(BeanIgnoreApply.class, Context.Builder.class, vr);
+ super(MarshalledIgnoreApply.class, Context.Builder.class, vr);
}
@Override
- public void apply(AnnotationInfo<BeanIgnoreApply> ai, Context.Builder b) {
- BeanIgnoreApply a = ai.inner();
+ public void apply(AnnotationInfo<MarshalledIgnoreApply> ai, Context.Builder b) {
+ MarshalledIgnoreApply a = ai.inner();
if (isEmptyArray(a.on()) && isEmptyArray(a.onClass()))
return;
b.annotations(a);
@@ -69,22 +69,22 @@ public class BeanIgnoreApplyAnnotation {
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
- BeanIgnore value = BeanIgnoreAnnotation.DEFAULT;
+ MarshalledIgnore value = MarshalledIgnoreAnnotation.DEFAULT;
/**
* Constructor.
*/
protected Builder() {
- super(BeanIgnoreApply.class);
+ super(MarshalledIgnoreApply.class);
}
/**
- * Sets the {@link BeanIgnoreApply#value()} property on this annotation.
+ * Sets the {@link MarshalledIgnoreApply#value()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
*/
- public Builder value(BeanIgnore value) {
+ public Builder value(MarshalledIgnore value) {
this.value = value;
return this;
}
@@ -144,11 +144,11 @@ public class BeanIgnoreApplyAnnotation {
}
/**
- * Instantiates a new {@link BeanIgnoreApply @BeanIgnoreApply} object initialized with this builder.
+ * Instantiates a new {@link MarshalledIgnoreApply @MarshalledIgnoreApply} object initialized with this builder.
*
- * @return A new {@link BeanIgnoreApply} object.
+ * @return A new {@link MarshalledIgnoreApply} object.
*/
- public BeanIgnoreApply build() {
+ public MarshalledIgnoreApply build() {
return new Object(this);
}
}
@@ -156,33 +156,33 @@ public class BeanIgnoreApplyAnnotation {
@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 BeanIgnoreApply {
+ private static class Object extends AppliedOnClassAnnotationObject implements MarshalledIgnoreApply {
- private final BeanIgnore value;
+ private final MarshalledIgnore value;
- Object(BeanIgnoreApplyAnnotation.Builder b) {
+ Object(MarshalledIgnoreApplyAnnotation.Builder b) {
super(b);
value = b.value;
}
- @Override /* Overridden from BeanIgnoreApply */
- public BeanIgnore value() {
+ @Override /* Overridden from MarshalledIgnoreApply */
+ public MarshalledIgnore value() {
return value;
}
- @Override /* Overridden from BeanIgnoreApply */
+ @Override /* Overridden from MarshalledIgnoreApply */
public String[] on() {
return super.on();
}
- @Override /* Overridden from BeanIgnoreApply */
+ @Override /* Overridden from MarshalledIgnoreApply */
public Class<?>[] onClass() {
return super.onClass();
}
}
/** Default value */
- public static final BeanIgnoreApply DEFAULT = create().build();
+ public static final MarshalledIgnoreApply DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
@@ -219,7 +219,7 @@ public class BeanIgnoreApplyAnnotation {
* @param a The annotation to check.
* @return <jk>true</jk> if the specified annotation contains all default values.
*/
- public static boolean empty(BeanIgnoreApply a) {
+ public static boolean empty(MarshalledIgnoreApply a) {
return a == null || DEFAULT.equals(a);
}
}
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/MarshalledProp.java
similarity index 90%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Beanp.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
index 52908cc792..ddf8812c9b 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/MarshalledProp.java
@@ -32,13 +32,13 @@ import org.apache.juneau.commons.reflect.Visibility;
* Can be used in the following locations:
* <ul>
* <li>Methods/Fields - Bean getters/setters and properties.
- * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link BeanpApply @BeanpApply}.
+ * <li><ja>@Rest</ja>-annotated classes and <ja>@RestOp</ja>-annotated methods when used with {@link MarshalledPropApply @MarshalledPropApply}.
* </ul>
* <p>
* This annotation is applied to public fields and public getter/setter methods of beans.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanpAnnotation">@Beanp Annotation</a>
+ * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/MarshalledPropAnnotation">@MarshalledProp Annotation</a>
* </ul>
*/
@@ -46,7 +46,7 @@ import org.apache.juneau.commons.reflect.Visibility;
@Target({ FIELD, METHOD, PARAMETER })
@Retention(RUNTIME)
@Inherited
-public @interface Beanp {
+public @interface MarshalledProp {
/**
* Optional description for the exposed API.
@@ -97,11 +97,11 @@ public @interface Beanp {
* <p class='bjava'>
* <jk>public class</jk> OrderCollection {
* <jc>// Stream property - element type cannot be inferred at runtime due to erasure</jc>
- * <ja>@Beanp</ja>(elementType=Order.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(elementType=Order.<jk>class</jk>)
* <jk>public</jk> Stream<Order> getOrders() { ... }
*
* <jc>// BeanChannel with concrete impl specified instead of abstract element type</jc>
- * <ja>@Beanp</ja>(elementType=ConcreteItem.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(elementType=ConcreteItem.<jk>class</jk>)
* <jk>public</jk> BeanChannel<AbstractItem> getItems() { ... }
* }
* </p>
@@ -134,7 +134,7 @@ public @interface Beanp {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jk>public class</jk> MyBean {
- * <ja>@Beanp</ja>(factory=ItemChannelFactory.<jk>class</jk>, elementType=Item.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(factory=ItemChannelFactory.<jk>class</jk>, elementType=Item.<jk>class</jk>)
* <jk>public</jk> BeanChannel<Item> getItems() { ... }
* }
* </p>
@@ -164,7 +164,7 @@ public @interface Beanp {
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <ja>@Beanp</ja>(format=<js>"$%.2f"</js>)
+ * <ja>@MarshalledProp</ja>(format=<js>"$%.2f"</js>)
* <jk>public float</jk> <jf>price</jf>;
* </p>
*
@@ -175,7 +175,7 @@ public @interface Beanp {
* <p class='bjava'>
* <jk>public class</jk> MyBean {
*
- * <ja>@Beanp</ja>(format=<js>"$%.2f"</js>)
+ * <ja>@MarshalledProp</ja>(format=<js>"$%.2f"</js>)
* <jk>private float</jk> <jf>price</jf>;
*
* <jk>public float</jk> getPrice() {
@@ -220,7 +220,7 @@ public @interface Beanp {
* // The field name can be anything.</jc>
* <jk>public class</jk> BeanWithDynaField {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Map<String,Object> <jf>extraStuff</jf> = <jk>new</jk> LinkedHashMap<>();
* }
*
@@ -230,12 +230,12 @@ public @interface Beanp {
* // Setter must take in two arguments.</jc>
* <jk>public class</jk> BeanWithDynaMethods {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Map<String,Object> getMyExtraStuff() {
* ...
* }
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public void</jk> setAnExtraField(String <jv>name</jv>, Object <jv>value</jv>) {
* ...
* }
@@ -245,7 +245,7 @@ public @interface Beanp {
* // Properties will be added through the getter.</jc>
* <jk>public class</jk> BeanWithDynaGetterOnly {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Map<String,Object> getMyExtraStuff() {
* ...
* }
@@ -255,17 +255,17 @@ public @interface Beanp {
* // Define a method that returns a Collection<String> with currently-set property names.</jc>
* <jk>public class</jk> BeanWithDynaExtraKeys {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Object get(String <jv>name</jv>) {
* ...
* }
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public void</jk> set(String <jv>name</jv>, Object <jv>value</jv>) {
* ...
* }
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Collection<String> extraKeys() {
* ...
* }
@@ -279,7 +279,7 @@ public @interface Beanp {
* <jc>// A serializable type other than Object.</jc>
* <jk>public class</jk> BeanWithDynaFieldWithListValues {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>)
* <jk>public</jk> Map<String,List<String>> getMyExtraStuff() {
* ...
* }
@@ -288,7 +288,7 @@ public @interface Beanp {
* <jc>// A swapped value.</jc>
* <jk>public class</jk> BeanWithDynaFieldWithSwappedValues {
*
- * <ja>@Beanp</ja>(name=<js>"*"</js>, swap=TemporalCalendarSwap.IsoLocalDateTime.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(name=<js>"*"</js>, swap=TemporalCalendarSwap.IsoLocalDateTime.<jk>class</jk>)
* <jk>public</jk> Map<String,Calendar> getMyExtraStuff() {
* ...
* }
@@ -317,7 +317,7 @@ public @interface Beanp {
* <jk>public class</jk> MyBean {
*
* <jc>// Identify concrete map type with String keys and Integer values.</jc>
- * <ja>@Beanp</ja>(type=HashMap.<jk>class</jk>, params={String.<jk>class</jk>,Integer.<jk>class</jk>})
+ * <ja>@MarshalledProp</ja>(type=HashMap.<jk>class</jk>, params={String.<jk>class</jk>,Integer.<jk>class</jk>})
* <jk>public</jk> Map <jf>p1</jf>;
* }
* </p>
@@ -329,7 +329,7 @@ public @interface Beanp {
* <p class='bjava'>
* <jk>public class</jk> MyBean {
*
- * <ja>@Beanp</ja>(type=HashMap.<jk>class</jk>, params={String.<jk>class</jk>,Integer.<jk>class</jk>})
+ * <ja>@MarshalledProp</ja>(type=HashMap.<jk>class</jk>, params={String.<jk>class</jk>,Integer.<jk>class</jk>})
* <jk>private</jk> Map <jf>p1</jf>;
*
* <jk>public</jk> Map getP1() {
@@ -359,7 +359,7 @@ public @interface Beanp {
* <jk>public class</jk> MyClass {
*
* <jc>// Only render 'f1' when serializing this bean property.</jc>
- * <ja>@Beanp</ja>(properties=<js>"f1"</js>)
+ * <ja>@MarshalledProp</ja>(properties=<js>"f1"</js>)
* <jk>public</jk> MyChildClass <jf>x1</jf> = <jk>new</jk> MyChildClass();
* }
*
@@ -379,7 +379,7 @@ public @interface Beanp {
* <p class='bjava'>
* <jk>public class</jk> MyBean {
*
- * <ja>@Beanp</ja>(properties=<js>"f1"</js>)
+ * <ja>@MarshalledProp</ja>(properties=<js>"f1"</js>)
* <jk>private</jk> MyChildClass <jf>x1</jf>;
*
* <jk>public</jk> MyChildClass getX1() {
@@ -401,7 +401,7 @@ public @interface Beanp {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jk>public class</jk> MyBean {
- * <ja>@Beanp</ja>(ro=<js>"true"</js>)
+ * <ja>@MarshalledProp</ja>(ro=<js>"true"</js>)
* <jk>public float</jk> <jf>price</jf>;
* }
* </p>
@@ -441,7 +441,7 @@ public @interface Beanp {
* <jk>public class</jk> MyBean {
*
* <jc>// Identify concrete map type.</jc>
- * <ja>@Beanp</ja>(type=HashMap.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(type=HashMap.<jk>class</jk>)
* <jk>public</jk> Map <jf>p1</jf>;
* }
* </p>
@@ -453,7 +453,7 @@ public @interface Beanp {
* <p class='bjava'>
* <jk>public class</jk> MyBean {
*
- * <ja>@Beanp</ja>(type=HashMap.<jk>class</jk>)
+ * <ja>@MarshalledProp</ja>(type=HashMap.<jk>class</jk>)
* <jk>private</jk> Map <jf>p1</jf>;
*
* <jk>public</jk> Map getP1() {
@@ -473,9 +473,9 @@ public @interface Beanp {
* The following annotations are equivalent:
*
* <p class='bjava'>
- * <ja>@Beanp</ja>(name=<js>"foo"</js>)
+ * <ja>@MarshalledProp</ja>(name=<js>"foo"</js>)
*
- * <ja>@Beanp</ja>(<js>"foo"</js>)
+ * <ja>@MarshalledProp</ja>(<js>"foo"</js>)
* </p>
*
* @return The annotation value.
@@ -491,7 +491,7 @@ public @interface Beanp {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jk>public class</jk> MyBean {
- * <ja>@Beanp</ja>(wo=<js>"true"</js>)
+ * <ja>@MarshalledProp</ja>(wo=<js>"true"</js>)
* <jk>public float</jk> <jf>price</jf>;
* }
* </p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
similarity index 76%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
index a2bae2f15b..c1cf0892b1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanpAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
@@ -24,15 +24,15 @@ import org.apache.juneau.commons.annotation.*;
import org.apache.juneau.commons.function.*;
/**
- * Utility classes and methods for the {@link Beanp @Beanp} annotation.
+ * Utility classes and methods for the {@link MarshalledProp @MarshalledProp} annotation.
*
*/
-public class BeanpAnnotation {
+public class MarshalledPropAnnotation {
/**
* Prevents instantiation.
*/
- private BeanpAnnotation() {}
+ private MarshalledPropAnnotation() {}
/**
* Builder class.
@@ -61,15 +61,15 @@ public class BeanpAnnotation {
* Constructor.
*/
protected Builder() {
- super(Beanp.class);
+ super(MarshalledProp.class);
}
/**
- * Instantiates a new {@link Beanp @Beanp} object initialized with this builder.
+ * Instantiates a new {@link MarshalledProp @MarshalledProp} object initialized with this builder.
*
- * @return A new {@link Beanp @Beanp} object.
+ * @return A new {@link MarshalledProp @MarshalledProp} object.
*/
- public Beanp build() {
+ public MarshalledProp build() {
return new Object(this);
}
@@ -85,7 +85,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#dictionary()} property on this annotation.
+ * Sets the {@link MarshalledProp#dictionary()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -96,7 +96,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#elementType()} property on this annotation.
+ * Sets the {@link MarshalledProp#elementType()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -107,7 +107,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#factory()} property on this annotation.
+ * Sets the {@link MarshalledProp#factory()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -119,7 +119,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#format()} property on this annotation.
+ * Sets the {@link MarshalledProp#format()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -130,7 +130,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#name()} property on this annotation.
+ * Sets the {@link MarshalledProp#name()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -141,7 +141,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#params()} property on this annotation.
+ * Sets the {@link MarshalledProp#params()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -152,7 +152,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#properties()} property on this annotation.
+ * Sets the {@link MarshalledProp#properties()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -163,7 +163,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#ro()} property on this annotation.
+ * Sets the {@link MarshalledProp#ro()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -174,7 +174,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#type()} property on this annotation.
+ * Sets the {@link MarshalledProp#type()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -185,7 +185,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#value()} property on this annotation.
+ * Sets the {@link MarshalledProp#value()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -196,7 +196,7 @@ public class BeanpAnnotation {
}
/**
- * Sets the {@link Beanp#wo()} property on this annotation.
+ * Sets the {@link MarshalledProp#wo()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -211,7 +211,7 @@ public class BeanpAnnotation {
@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 Beanp {
+ private static class Object extends AnnotationObject implements MarshalledProp {
private final String[] description;
private final Class<?> type;
@@ -227,7 +227,7 @@ public class BeanpAnnotation {
private final String ro;
private final String wo;
- Object(BeanpAnnotation.Builder b) {
+ Object(MarshalledPropAnnotation.Builder b) {
super(b);
description = copyOf(b.description);
dictionary = copyOf(b.dictionary);
@@ -243,58 +243,58 @@ public class BeanpAnnotation {
wo = b.wo;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public Class<?>[] dictionary() {
return dictionary;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public Class<?> elementType() {
return elementType;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
@SuppressWarnings("rawtypes")
public Class<? extends BeanFactory> factory() {
return factory;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String format() {
return format;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String name() {
return name;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public Class<?>[] params() {
return params;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String properties() {
return properties;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String ro() {
return ro;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public Class<?> type() {
return type;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String value() {
return value;
}
- @Override /* Overridden from Beanp */
+ @Override /* Overridden from MarshalledProp */
public String wo() {
return wo;
}
@@ -306,7 +306,7 @@ public class BeanpAnnotation {
}
/** Default value */
- public static final Beanp DEFAULT = create().build();
+ public static final MarshalledProp DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApply.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApply.java
similarity index 78%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApply.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApply.java
index 9723852926..61c7ae810f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApply.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApply.java
@@ -22,16 +22,16 @@ import static java.lang.annotation.RetentionPolicy.*;
import java.lang.annotation.*;
/**
- * Dynamically applies a {@link Beanc @Beanc} annotation to specified classes, methods, or fields.
+ * Dynamically applies a {@link MarshalledProp @MarshalledProp} 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 Beanc @Beanc} to be a pure data annotation
+ * <b>content</b> concern ({@link #value()}), enabling {@link MarshalledProp @MarshalledProp} to be a pure data annotation
* without marshall-specific application machinery.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
- * <ja>@BeancApply</ja>(on=<js>"Person(String,int)"</js>, value=<ja>@Beanc</ja>(properties=<js>"name,age"</js>))
+ * <ja>@MarshalledPropApply</ja>(on=<js>"com.example.Foo.bar"</js>, value=<ja>@MarshalledProp</ja>(ro=<js>"true"</js>))
* <jk>public class</jk> MyConfig {}
* </p>
*
@@ -42,16 +42,16 @@ import java.lang.annotation.*;
@Documented
@Target({ TYPE, METHOD })
@Retention(RUNTIME)
-@Repeatable(BeancApply.Array.class)
-@ContextApply(BeancApplyAnnotation.Applier.class)
-public @interface BeancApply {
+@Repeatable(MarshalledPropApply.Array.class)
+@ContextApply(MarshalledPropApplyAnnotation.Applier.class)
+public @interface MarshalledPropApply {
/**
- * The {@link Beanc @Beanc} annotation to apply.
+ * The {@link MarshalledProp @MarshalledProp} annotation to apply.
*
* @return The annotation value.
*/
- Beanc value();
+ MarshalledProp value();
/**
* Dynamically apply this annotation to the specified classes/methods/fields.
@@ -79,7 +79,7 @@ public @interface BeancApply {
Class<?>[] onClass() default {};
/**
- * A collection of {@link BeancApply @BeancApply annotations}.
+ * A collection of {@link MarshalledPropApply @MarshalledPropApply annotations}.
*/
@Documented
@Target({ TYPE, METHOD })
@@ -91,6 +91,6 @@ public @interface BeancApply {
*
* @return The annotation value.
*/
- BeancApply[] value();
+ MarshalledPropApply[] value();
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
similarity index 76%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApplyAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
index c6566146be..ca920b77ed 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeancApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
@@ -27,20 +27,20 @@ import org.apache.juneau.commons.reflect.*;
import org.apache.juneau.svl.*;
/**
- * Utility classes and methods for the {@link BeancApply @BeancApply} annotation.
+ * Utility classes and methods for the {@link MarshalledPropApply @MarshalledPropApply} annotation.
*
*/
-public class BeancApplyAnnotation {
+public class MarshalledPropApplyAnnotation {
/**
* Prevents instantiation.
*/
- private BeancApplyAnnotation() {}
+ private MarshalledPropApplyAnnotation() {}
/**
- * Applies targeted {@link BeancApply} annotations to a {@link org.apache.juneau.Context.Builder}.
+ * Applies targeted {@link MarshalledPropApply} annotations to a {@link org.apache.juneau.Context.Builder}.
*/
- public static class Applier extends AnnotationApplier<BeancApply,Context.Builder> {
+ public static class Applier extends AnnotationApplier<MarshalledPropApply,Context.Builder> {
/**
* Constructor.
@@ -48,12 +48,12 @@ public class BeancApplyAnnotation {
* @param vr The resolver for resolving values in annotations.
*/
public Applier(VarResolverSession vr) {
- super(BeancApply.class, Context.Builder.class, vr);
+ super(MarshalledPropApply.class, Context.Builder.class, vr);
}
@Override
- public void apply(AnnotationInfo<BeancApply> ai, Context.Builder b) {
- BeancApply a = ai.inner();
+ public void apply(AnnotationInfo<MarshalledPropApply> ai, Context.Builder b) {
+ MarshalledPropApply a = ai.inner();
if (isEmptyArray(a.on()) && isEmptyArray(a.onClass()))
return;
b.annotations(a);
@@ -69,22 +69,22 @@ public class BeancApplyAnnotation {
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
- Beanc value = BeancAnnotation.DEFAULT;
+ MarshalledProp value = MarshalledPropAnnotation.DEFAULT;
/**
* Constructor.
*/
protected Builder() {
- super(BeancApply.class);
+ super(MarshalledPropApply.class);
}
/**
- * Sets the {@link BeancApply#value()} property on this annotation.
+ * Sets the {@link MarshalledPropApply#value()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
*/
- public Builder value(Beanc value) {
+ public Builder value(MarshalledProp value) {
this.value = value;
return this;
}
@@ -144,11 +144,11 @@ public class BeancApplyAnnotation {
}
/**
- * Instantiates a new {@link BeancApply @BeancApply} object initialized with this builder.
+ * Instantiates a new {@link MarshalledPropApply @MarshalledPropApply} object initialized with this builder.
*
- * @return A new {@link BeancApply} object.
+ * @return A new {@link MarshalledPropApply} object.
*/
- public BeancApply build() {
+ public MarshalledPropApply build() {
return new Object(this);
}
}
@@ -156,33 +156,33 @@ public class BeancApplyAnnotation {
@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 BeancApply {
+ private static class Object extends AppliedOnClassAnnotationObject implements MarshalledPropApply {
- private final Beanc value;
+ private final MarshalledProp value;
- Object(BeancApplyAnnotation.Builder b) {
+ Object(MarshalledPropApplyAnnotation.Builder b) {
super(b);
value = b.value;
}
- @Override /* Overridden from BeancApply */
- public Beanc value() {
+ @Override /* Overridden from MarshalledPropApply */
+ public MarshalledProp value() {
return value;
}
- @Override /* Overridden from BeancApply */
+ @Override /* Overridden from MarshalledPropApply */
public String[] on() {
return super.on();
}
- @Override /* Overridden from BeancApply */
+ @Override /* Overridden from MarshalledPropApply */
public Class<?>[] onClass() {
return super.onClass();
}
}
/** Default value */
- public static final BeancApply DEFAULT = create().build();
+ public static final MarshalledPropApply DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
@@ -219,7 +219,7 @@ public class BeancApplyAnnotation {
* @param a The annotation to check.
* @return <jk>true</jk> if the specified annotation contains all default values.
*/
- public static boolean empty(BeancApply a) {
+ public static boolean empty(MarshalledPropApply a) {
return a == null || DEFAULT.equals(a);
}
}
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 7a720ede61..320ddc2892 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
@@ -1077,7 +1077,7 @@ public class ParserSession extends BeanSession {
protected final ClassMeta<?> getClassMeta(String typeName, BeanPropertyMeta pMeta, ClassMeta<?> eType) {
BeanRegistry br = null;
- // Resolve via @Beanp(dictionary={})
+ // Resolve via @MarshalledProp(dictionary={})
if (nn(pMeta)) {
br = pMeta.getBeanRegistry();
if (nn(br) && br.hasName(typeName))
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
index 9e22edd1a4..c627447aa3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
@@ -65,14 +65,14 @@ import org.apache.juneau.serializer.*;
* <p>
* Classes are ignored if any of the following are true:
* <ul>
- * <li>Classes annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Classes annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Non-static member classes.
* </ul>
*
* <p>
* Members/constructors are ignored if any of the following are true:
* <ul>
- * <li>Members/constructors annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Members/constructors annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Deprecated members/constructors.
* </ul>
*
@@ -133,7 +133,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasReturnTypeParent(List.class)
&& mi.hasParameterTypesLenient(BeanSession.class)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
@@ -143,7 +143,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
cs.isNotDeprecated()
&& cs.isVisible(bc.getBeanConstructorVisibility())
&& cs.hasParameterTypeParents(rt)
- && ! bc.getAnnotationProvider().has(BeanIgnore.class, cs);
+ && ! bc.getAnnotationProvider().has(MarshalledIgnore.class, cs);
// @formatter:on
}
@@ -156,12 +156,12 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
- return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(BeanIgnore.class, ci);
+ return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
index 336a4e1545..1c6b4c7d9a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
@@ -65,14 +65,14 @@ import org.apache.juneau.serializer.*;
* <p>
* Classes are ignored if any of the following are true:
* <ul>
- * <li>Classes annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Classes annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Non-static member classes.
* </ul>
*
* <p>
* Members/constructors are ignored if any of the following are true:
* <ul>
- * <li>Members/constructors annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Members/constructors annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Deprecated members/constructors.
* </ul>
*
@@ -133,7 +133,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasReturnTypeParent(Map.class)
&& mi.hasParameterTypesLenient(BeanSession.class)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
@@ -143,7 +143,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
cs.isNotDeprecated()
&& cs.isVisible(bc.getBeanConstructorVisibility())
&& cs.hasParameterTypeParents(rt)
- && ! bc.getAnnotationProvider().has(BeanIgnore.class, cs);
+ && ! bc.getAnnotationProvider().has(MarshalledIgnore.class, cs);
// @formatter:on
}
@@ -156,12 +156,12 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
- return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(BeanIgnore.class, ci);
+ return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
index 3f47b3fd63..a6cbb59543 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
@@ -88,14 +88,14 @@ import org.apache.juneau.serializer.*;
* <p>
* Classes are ignored if any of the following are true:
* <ul>
- * <li>Classes annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Classes annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Non-static member classes.
* </ul>
*
* <p>
* Members/constructors are ignored if any of the following are true:
* <ul>
- * <li>Members/constructors annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Members/constructors annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Deprecated members/constructors.
* </ul>
*
@@ -159,7 +159,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
&& (rt.isAssignableTo(Number.class) || (rt.isPrimitive() && rt.isAny(int.class, short.class, long.class, float.class, double.class, byte.class)))
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
@@ -169,7 +169,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
cs.isNotDeprecated()
&& cs.isVisible(bc.getBeanConstructorVisibility())
&& cs.hasParameterTypeParents(rt)
- && ! bc.getAnnotationProvider().has(BeanIgnore.class, cs);
+ && ! bc.getAnnotationProvider().has(MarshalledIgnore.class, cs);
// @formatter:on
}
@@ -182,7 +182,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
@@ -192,7 +192,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
ci.isNonStaticMemberClass()
|| ci.isPrimitive()
|| ci.isAssignableTo(Number.class)
- || bc.getAnnotationProvider().has(BeanIgnore.class, ci);
+ || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
// @formatter:on
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
index 5fae05035e..fc3ee8ff95 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
@@ -67,14 +67,14 @@ import org.apache.juneau.serializer.*;
* <p>
* Classes are ignored if any of the following are true:
* <ul>
- * <li>Classes annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Classes annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Non-static member classes.
* </ul>
*
* <p>
* Members/constructors are ignored if any of the following are true:
* <ul>
- * <li>Members/constructors annotated with {@link BeanIgnore @BeanIgnore}.
+ * <li>Members/constructors annotated with {@link MarshalledIgnore @MarshalledIgnore}.
* <li>Deprecated members/constructors.
* </ul>
*
@@ -134,7 +134,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
@@ -144,7 +144,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
cs.isNotDeprecated()
&& cs.isVisible(bc.getBeanConstructorVisibility())
&& cs.hasParameterTypeParents(rt)
- && ! bc.getAnnotationProvider().has(BeanIgnore.class, cs);
+ && ! bc.getAnnotationProvider().has(MarshalledIgnore.class, cs);
// @formatter:on
}
@@ -157,12 +157,12 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
&& mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
- && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(BeanIgnore.class, m2));
+ && mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
- return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(BeanIgnore.class, ci);
+ return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
//------------------------------------------------------------------------------------------------------------------
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
similarity index 52%
copy from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java
copy to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
index 10d1ddb061..e7f128bbe4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
@@ -14,39 +14,41 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.swaps;
+package org.apache.juneau.swap;
import org.apache.juneau.*;
-import org.apache.juneau.annotation.*;
-import org.apache.juneau.swap.*;
/**
- * Built-in object swap implementation class for the {@link Beanp#format() @Beanp(format)} annotation.
+ * A dynamic string swap that serializes objects via {@link Object#toString()} and deserializes via
+ * {@code fromString(String)}, {@code valueOf(String)}, or a single-{@code String}-argument constructor.
*
- * <h5 class='section'>See Also:</h5><ul>
- * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SwapBasics">Swap Basics</a>
- * </ul>
+ * <p>
+ * Installed automatically when a class is annotated with
+ * {@link org.apache.juneau.annotation.Marshalled @Marshalled}{@code (as=STRING)}.
+ *
+ * @param <T> The normal class type.
*/
-public class StringFormatSwap extends StringSwap<Object> {
+public class AutoStringSwap<T> extends StringSwap<T> {
- private final String format;
+ private final ClassMeta<T> classMeta;
/**
* Constructor.
*
- * @param format The string format string.
+ * @param classMeta The class meta for the normal class.
*/
- public StringFormatSwap(String format) {
- this.format = format;
+ public AutoStringSwap(ClassMeta<T> classMeta) {
+ super(classMeta.inner());
+ this.classMeta = classMeta;
}
@Override /* Overridden from ObjectSwap */
- public String swap(BeanSession session, Object o) throws Exception {
- return String.format(format, o);
+ public String swap(BeanSession session, T o) {
+ return o.toString();
}
@Override /* Overridden from ObjectSwap */
- public Object unswap(BeanSession session, String f, ClassMeta<?> hint) throws Exception {
- return session.convertToType(f, hint);
+ public T unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception {
+ return classMeta.newInstanceFromString(null, s);
}
-}
\ No newline at end of file
+}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
index 1e1e36bbe5..bffd21bad3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
@@ -59,7 +59,7 @@ public class SurrogateSwap<T,F> extends ObjectSwap<T,F> {
public static List<SurrogateSwap<?,?>> findObjectSwaps(Class<?> c, BeanContext bc) {
List<SurrogateSwap<?,?>> l = new LinkedList<>();
var ci = info(c);
- ci.getPublicConstructors().stream().filter(x -> ! bc.getAnnotationProvider().has(BeanIgnore.class, x) && x.hasNumParameters(1) && x.isPublic()).forEach(x -> {
+ ci.getPublicConstructors().stream().filter(x -> ! bc.getAnnotationProvider().has(MarshalledIgnore.class, x) && x.hasNumParameters(1) && x.isPublic()).forEach(x -> {
var pt = x.getParameter(0).getParameterType().inner();
if (! pt.equals(c.getDeclaringClass())) {
// Find the unswap method if there is one.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java
index 10d1ddb061..fd7ef2edb5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/StringFormatSwap.java
@@ -21,7 +21,7 @@ import org.apache.juneau.annotation.*;
import org.apache.juneau.swap.*;
/**
- * Built-in object swap implementation class for the {@link Beanp#format() @Beanp(format)} annotation.
+ * Built-in object swap implementation class for the {@link MarshalledProp#format() @MarshalledProp(format)} annotation.
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SwapBasics">Swap Basics</a>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
index c16c821cbb..5f664c0f9d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/xml/annotation/Xml.java
@@ -111,7 +111,7 @@ public @interface Xml {
*
* <jc>// Normally, bean URL properties would be rendered as XML attributes on the bean element.</jc>
* <jc>// Override so that it's rendered as an <href>http://foo</href> child element instead.</jc>
- * <ja>@Beanp</ja>(uri=<jk>true</jk>)
+ * <ja>@MarshalledProp</ja>(uri=<jk>true</jk>)
* <ja>@Xml</ja>(format=XmlFormat.<jsf>ELEMENT</jsf>}
* <jk>public</jk> URL <jf>href</jf> = <jk>new</jk> URL(<js>"http://foo"</js>);
*
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
index af4da49f60..b82d9636fc 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlComplexExample.java
@@ -76,7 +76,7 @@ public class HtmlComplexExample {
assert parse.getInnerPojo().getName().equals(pojoc.getInnerPojo().getName());
assert parse.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @MarshalledCtor(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
\ No newline at end of file
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
index dfffd1508c..623f709713 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/html/HtmlSimpleExample.java
@@ -63,7 +63,7 @@ public class HtmlSimpleExample {
var docSerialized = HtmlDocSerializer.DEFAULT.serialize(pojo);
Logger.getLogger(HtmlSimpleExample.class).info(docSerialized);
- // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @MarshalledCtor(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
\ No newline at end of file
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
index e8ea6efa48..5dad6bf691 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonComplexExample.java
@@ -72,7 +72,7 @@ public class JsonComplexExample {
assert parse.getInnerPojo().getName().equals(pojoc.getInnerPojo().getName());
assert parse.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @MarshalledCtor(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
\ No newline at end of file
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
index b51a81173f..eef94f7208 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/json/JsonSimpleExample.java
@@ -77,7 +77,7 @@ public class JsonSimpleExample {
var l3 = jsonParser.parse(json, Long.class);
var f3 = jsonParser.parse(json, Float.class);
- // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @MarshalledCtor(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
\ No newline at end of file
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
index ec9388a221..d378f6ac9a 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/oapi/OapiExample.java
@@ -79,7 +79,7 @@ public class OapiExample {
var p = OpenApiParser.DEFAULT;
pojo = p.getPartSession().parse(HEADER, schemab, httpPart, oapiParser.getClassMeta(Pojo.class));
- // The object above can be parsed thanks to the @Beanc(properties = id,name) annotation on Pojo
+ // The object above can be parsed thanks to the @MarshalledCtor(properties = id,name) annotation on Pojo
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
}
\ No newline at end of file
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
index d675152cb8..4ffb2c205a 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/Pojo.java
@@ -30,7 +30,7 @@ public class Pojo {
* @param id The <bc>id</bc> property value.
* @param name The <bc>name</bc> property value.
*/
- @Beanc
+ @MarshalledCtor
public Pojo(@Name("id") String id, @Name("name") String name) {
this.id = id;
this.name = name;
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
index 694b4a472c..7e56e4bc54 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/pojo/PojoComplex.java
@@ -37,7 +37,7 @@ public class PojoComplex {
* @param innerPojo The <bc>innerPojo</bc> property value.
* @param values The <bc>values</bc> property value.
*/
- @Beanc
+ @MarshalledCtor
public PojoComplex(@Name("id") String id, @Name("innerPojo") Pojo innerPojo, @Name("values") Map<String,List<Pojo>> values) {
this.id = id;
this.innerPojo = innerPojo;
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UonExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UonExample.java
index 89136fa318..4a3f2f7ad9 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UonExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/uon/UonExample.java
@@ -52,7 +52,7 @@ public class UonExample {
assert obj.getId().equals(pojo.getId());
assert obj.getName().equals(pojo.getName());
- // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
+ // The object above can be parsed thanks to the @MarshalledCtor annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
index 3a4b7de8b8..cad13e88d4 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlComplexExample.java
@@ -60,7 +60,7 @@ public class XmlComplexExample {
assert obj.getClass().equals(pojoc.getClass());
assert obj.getInnerPojo().getId().equals(pojoc.getInnerPojo().getId());
- // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
+ // The object above can be parsed thanks to the @MarshalledCtor annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
diff --git a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
index 091e2094cd..879289a405 100644
--- a/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
+++ b/juneau-examples/juneau-examples-core/src/main/java/org/apache/juneau/examples/core/xml/XmlSimpleExample.java
@@ -55,7 +55,7 @@ public class XmlSimpleExample {
assert obj.getId().equals(pojo.getId());
assert obj.getName().equals(pojo.getName());
- // The object above can be parsed thanks to the @Beanc annotation on PojoComplex
+ // The object above can be parsed thanks to the @MarshalledCtor annotation on PojoComplex
// Using this approach, you can keep your POJOs immutable, and still serialize and deserialize them.
}
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/annotation/Header.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/annotation/Header.java
index 8229aad01a..00b90288f0 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/annotation/Header.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/annotation/Header.java
@@ -150,7 +150,7 @@ public @interface Header {
*
* <jc>// Equivalent to @Header("Foo")</jc>
* <ja>@Header</ja>
- * <ja>@Beanp</ja>(<js>"Foo"</js>)
+ * <ja>@MarshalledProp</ja>(<js>"Foo"</js>)
* String getFoo();
* }
* </p>
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/entity/BasicHttpEntity.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/entity/BasicHttpEntity.java
index 02a9c539ac..3573f1db59 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/entity/BasicHttpEntity.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/entity/BasicHttpEntity.java
@@ -48,7 +48,7 @@ import org.apache.juneau.http.header.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestCommonBasics">juneau-rest-common Basics</a>
* </ul>
*/
-@BeanIgnore
+@MarshalledIgnore
@SuppressWarnings({
"resource", // Content may be streams; value equality not practical
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/BasicHeader.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/BasicHeader.java
index 4052a102a3..44559080c3 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/BasicHeader.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/BasicHeader.java
@@ -53,7 +53,7 @@ import org.apache.juneau.commons.utils.*;
*
* @serial exclude
*/
-@BeanIgnore
+@Marshalled(as=MarshalledAs.STRING)
public class BasicHeader implements Header, Serializable {
private static final long serialVersionUID = 1L;
private static final HeaderElement[] EMPTY_HEADER_ELEMENTS = {};
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/EntityTags.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/EntityTags.java
index 94345367ed..125e9c6c88 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/EntityTags.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/header/EntityTags.java
@@ -28,7 +28,7 @@ import org.apache.juneau.commons.collections.*;
/**
* A list of {@link EntityTag} beans.
*/
-@BeanIgnore
+@Marshalled(as=MarshalledAs.STRING)
public class EntityTags {
/** Represents an empty entity tags object. */
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/BasicPart.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/BasicPart.java
index 5e57308592..98337e40fc 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/BasicPart.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/part/BasicPart.java
@@ -48,7 +48,7 @@ import org.apache.juneau.http.header.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestCommonBasics">juneau-rest-common Basics</a>
* </ul>
*/
-@BeanIgnore
+@Marshalled(as=MarshalledAs.STRING)
@SuppressWarnings({
"java:S115", // Constants use UPPER_snakeCase convention (e.g., PROP_value)
"java:S3740" // Raw Supplier/Object types used where HTTP part value type cannot be parameterized at this abstraction level
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/resource/BasicResource.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/resource/BasicResource.java
index 0b4dad3b16..3336f35c47 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/resource/BasicResource.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/resource/BasicResource.java
@@ -47,7 +47,7 @@ import org.apache.juneau.http.header.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestCommonBasics">juneau-rest-common Basics</a>
* </ul>
*/
-@BeanIgnore /* Use toString() to serialize */
+@MarshalledIgnore /* Use toString() to serialize */
@SuppressWarnings({
"resource", // Depends on entity (streams); value equality not practical
"java:S1206", // equals/hashCode not overridden; value equality not practical for this class
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpException.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpException.java
index 9326883803..a86b0b3dd2 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpException.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpException.java
@@ -54,7 +54,7 @@ import org.apache.juneau.http.header.*;
*
* @serial exclude
*/
-@BeanIgnore /* Use toString() to serialize */
+@Marshalled(as=MarshalledAs.STRING)
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_status)
})
diff --git a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpResponse.java b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpResponse.java
index 1dc8f05216..c07d409bf5 100644
--- a/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpResponse.java
+++ b/juneau-rest/juneau-rest-common/src/main/java/org/apache/juneau/http/response/BasicHttpResponse.java
@@ -50,7 +50,7 @@ import org.apache.juneau.http.header.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauRestCommonBasics">juneau-rest-common Basics</a>
* </ul>
*/
-@BeanIgnore /* Use toString() to serialize */
+@Marshalled(as=MarshalledAs.STRING)
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_status)
})
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/BasicNamedAttribute.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/BasicNamedAttribute.java
index f0d2d05884..9702f5781b 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/BasicNamedAttribute.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/httppart/BasicNamedAttribute.java
@@ -34,7 +34,7 @@ import org.apache.juneau.http.part.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/HttpParts">HTTP Parts</a>
* </ul>
*/
-@BeanIgnore
+@Marshalled(as=MarshalledAs.STRING)
public class BasicNamedAttribute implements NamedAttribute {
/**
diff --git a/juneau-utest/src/test/java/org/apache/juneau/AnnotationInheritance_Test.java b/juneau-utest/src/test/java/org/apache/juneau/AnnotationInheritance_Test.java
index b7800f86ce..2bd5d8ca38 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/AnnotationInheritance_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/AnnotationInheritance_Test.java
@@ -31,13 +31,13 @@ import org.junit.jupiter.api.*;
* Tests for annotation inheritance on overridden methods in bean properties.
*
* <p>Validates that when a child class overrides a parent method, annotations like
- * {@link Beanp}, {@link Xml}, {@link Name}, etc. are properly inherited from the parent method.
+ * {@link MarshalledProp}, {@link Xml}, {@link Name}, etc. are properly inherited from the parent method.
* This ensures consistent property names and serialization behavior across inheritance hierarchies.
*/
class AnnotationInheritance_Test extends TestBase {
//====================================================================================================
- // @Beanp annotation inheritance
+ // @MarshalledProp annotation inheritance
//====================================================================================================
public static class A1_Parent {
@@ -47,7 +47,7 @@ class AnnotationInheritance_Test extends TestBase {
return value;
}
- @Beanp("v")
+ @MarshalledProp("v")
public A1_Parent setValue(String value) {
this.value = value;
return this;
@@ -55,7 +55,7 @@ class AnnotationInheritance_Test extends TestBase {
}
public static class A1_Child extends A1_Parent {
- // Override without @Beanp - should inherit property name "v" from parent
+ // Override without @MarshalledProp - should inherit property name "v" from parent
@Override
public A1_Child setValue(String value) {
super.setValue(value);
@@ -67,11 +67,11 @@ class AnnotationInheritance_Test extends TestBase {
void a01_beanp_propertyName_inheritance() {
var bc = BeanContext.DEFAULT;
- // Property should be named "v" (from parent's @Beanp), inherited via BeanMeta.inheritParentAnnotations
+ // Property should be named "v" (from parent's @MarshalledProp), inherited via BeanMeta.inheritParentAnnotations
var bm = bc.getBeanMeta(A1_Child.class);
var prop = bm.getPropertyMeta("v");
- assertNotNull(prop, "Property 'v' should exist (inherited from @Beanp in parent)");
+ assertNotNull(prop, "Property 'v' should exist (inherited from @MarshalledProp in parent)");
}
@Test
@@ -92,7 +92,7 @@ class AnnotationInheritance_Test extends TestBase {
return items;
}
- @Beanp("i")
+ @MarshalledProp("i")
@Xml(format=XmlFormat.COLLAPSED, childName="item")
public B1_Parent setItems(List<String> items) {
this.items = items;
@@ -101,7 +101,7 @@ class AnnotationInheritance_Test extends TestBase {
}
public static class B1_Child extends B1_Parent {
- // Override without annotations - should inherit BOTH @Beanp AND @Xml
+ // Override without annotations - should inherit BOTH @MarshalledProp AND @Xml
@Override
public B1_Child setItems(List<String> items) {
super.setItems(items);
@@ -115,7 +115,7 @@ class AnnotationInheritance_Test extends TestBase {
var bm = bc.getBeanMeta(B1_Child.class);
var prop = bm.getPropertyMeta("i");
- assertNotNull(prop, "Property 'i' should exist (inherited from @Beanp)");
+ assertNotNull(prop, "Property 'i' should exist (inherited from @MarshalledProp)");
}
//====================================================================================================
@@ -129,7 +129,7 @@ class AnnotationInheritance_Test extends TestBase {
return name;
}
- @Beanp(name="n", ro="false")
+ @MarshalledProp(name="n", ro="false")
public C1_Parent setName(String name) {
this.name = name;
return this;
@@ -164,7 +164,7 @@ class AnnotationInheritance_Test extends TestBase {
return count;
}
- @Beanp("c")
+ @MarshalledProp("c")
public D1_GrandParent setCount(int count) {
this.count = count;
return this;
@@ -194,7 +194,7 @@ class AnnotationInheritance_Test extends TestBase {
public static class E1_Parent {
private String data;
- @Beanp("d")
+ @MarshalledProp("d")
public String getData() {
return data;
}
@@ -205,7 +205,7 @@ class AnnotationInheritance_Test extends TestBase {
}
public static class E1_Child extends E1_Parent {
- // Override getter without @Beanp
+ // Override getter without @MarshalledProp
@Override
public String getData() {
return super.getData();
@@ -218,7 +218,7 @@ class AnnotationInheritance_Test extends TestBase {
var bm = bc.getBeanMeta(E1_Child.class);
var prop = bm.getPropertyMeta("d");
- assertNotNull(prop, "Property 'd' should exist (inherited from getter's @Beanp)");
+ assertNotNull(prop, "Property 'd' should exist (inherited from getter's @MarshalledProp)");
var bean = new E1_Child();
bean.setData("test");
@@ -237,7 +237,7 @@ class AnnotationInheritance_Test extends TestBase {
return tags;
}
- @Beanp("t")
+ @MarshalledProp("t")
public F1_Parent setTags(List<String> tags) {
this.tags = tags;
return this;
@@ -265,12 +265,12 @@ class AnnotationInheritance_Test extends TestBase {
private List<Object> children;
@Xml(format=XmlFormat.ELEMENTS)
- @Beanp(name="c")
+ @MarshalledProp(name="c")
public List<Object> getChildren() {
return children;
}
- @Beanp("c")
+ @MarshalledProp("c")
public G1_Parent setChildren(List<Object> children) {
this.children = children;
return this;
@@ -279,7 +279,7 @@ class AnnotationInheritance_Test extends TestBase {
public static class G1_Child extends G1_Parent {
// This override previously caused "ELEMENTS and ELEMENT properties cannot be mixed" error
- // Now it should work because @Beanp("c") is inherited, keeping the same property name
+ // Now it should work because @MarshalledProp("c") is inherited, keeping the same property name
@Override
public G1_Child setChildren(List<Object> children) {
super.setChildren(children);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
index b6a08683c1..fc341701a3 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
@@ -82,7 +82,7 @@ class BasicBeans_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
public static class B {
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Map<String,Integer> f1 = new TreeMap<>();
public static B create() {
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 9afa4b4f62..575c61ae38 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
@@ -321,7 +321,7 @@ class BeanConfig_Test extends TestBase {
public static class ReadOnlyPerson {
private final int age;
- @Beanc(properties="name,age")
+ @MarshalledCtor(properties="name,age")
public ReadOnlyPerson(String name, int age) {
this.name = name;
this.age = age;
@@ -370,9 +370,9 @@ class BeanConfig_Test extends TestBase {
@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"))
+ @MarshalledCtorApply(on="Dummy1",value=@MarshalledCtor(properties="dummy"))
+ @MarshalledCtorApply(on="ReadOnlyPerson2(String,int)",value=@MarshalledCtor(properties="name,age"))
+ @MarshalledCtorApply(on="Dummy2",value=@MarshalledCtor(properties="dummy"))
private static class ReadOnlyPerson2Config {}
//====================================================================================================
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 4367bb0f48..af084ee692 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 @Marshalled(properties)
+ // @MarshalledProp(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() {
@@ -49,7 +49,7 @@ class BeanMapErrors_Test extends TestBase {
public int f1;
private int f2 = -1;
- @Beanp("f2") public int f2() { return f2; }
+ @MarshalledProp("f2") public int f2() { return f2; }
public void setF2(int v) { f2 = v; }
}
@@ -67,20 +67,20 @@ class BeanMapErrors_Test extends TestBase {
@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"))
+ @MarshalledPropApply(on="Dummy",value=@MarshalledProp("dummy"))
+ @MarshalledPropApply(on="B1.f2",value=@MarshalledProp("f2"))
private static class B1Config {}
public static class B1 {
public int f1;
private int f2 = -1;
- @Beanp("f2") public int f2() { return f2; }
+ @MarshalledProp("f2") public int f2() { return f2; }
public void setF2(int v) { f2 = v; }
}
//-----------------------------------------------------------------------------------------------------------------
- // @Beanp(name) on field not in @Marshalled(properties)
+ // @MarshalledProp(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() {
@@ -99,7 +99,7 @@ class BeanMapErrors_Test extends TestBase {
public static class A2 {
public int f1;
- @Beanp("f2")
+ @MarshalledProp("f2")
public int f2 = -1;
}
@@ -117,8 +117,8 @@ class BeanMapErrors_Test extends TestBase {
@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"))
+ @MarshalledPropApply(on="Dummy",value=@MarshalledProp("dummy"))
+ @MarshalledPropApply(on="B2.f2",value=@MarshalledProp("f2"))
private static class B2Config {}
public static class B2 {
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 81c5b06396..d9c806efe8 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
@@ -555,7 +555,7 @@ class BeanMap_Test extends TestBase {
}
//====================================================================================================
- // @Beanp tests
+ // @MarshalledProp tests
//====================================================================================================
@Test void a09_beanPropertyAnnotation() {
var t6 = new G1();
@@ -594,10 +594,10 @@ class BeanMap_Test extends TestBase {
public List<G> l2 = new LinkedList<>();
- @Beanp(type=List.class,params={G.class})
+ @MarshalledProp(type=List.class,params={G.class})
public List<G> l3;
- @Beanp(type=LinkedList.class,params={G.class})
+ @MarshalledProp(type=LinkedList.class,params={G.class})
public List<G> l4;
private List<G> m1;
@@ -609,16 +609,16 @@ class BeanMap_Test extends TestBase {
public void setM2(List<G> v) { m2 = v; }
private List<G> m3;
- @Beanp(type=List.class,params={G.class})
+ @MarshalledProp(type=List.class,params={G.class})
public List<G> getM3() { return m3; }
public void setM3(List<G> v) { m3 = v; }
private List<G> m4;
- @Beanp(type=LinkedList.class,params={G.class})
+ @MarshalledProp(type=LinkedList.class,params={G.class})
public List<G> getM4() { return m4; }
public void setM4(List<G> v) { m4 = v; }
- @Beanp(type=LinkedList.class,params={G.class})
+ @MarshalledProp(type=LinkedList.class,params={G.class})
private List<G> m5;
public List<G> getM5() { return m5; }
public void setM5(List<G> v) { m5 = v; }
@@ -706,12 +706,12 @@ class BeanMap_Test extends TestBase {
}
public static class J {
- @Beanp(params={Float.class}) public List<String> p1;
- @Beanp(params={Float.class}) public List<Integer> getP2() { return null; }
- @Beanp(params={Float.class}) public List<? extends Integer> p3;
- @Beanp(params={Object.class, Float.class}) public Map<String,Integer> p4;
- @Beanp(params={Object.class, Float.class}) public Map<String,Integer> getP5() { return null; }
- @Beanp(params={String.class, Float.class}) public Map<String,? extends Integer> p6;
+ @MarshalledProp(params={Float.class}) public List<String> p1;
+ @MarshalledProp(params={Float.class}) public List<Integer> getP2() { return null; }
+ @MarshalledProp(params={Float.class}) public List<? extends Integer> p3;
+ @MarshalledProp(params={Object.class, Float.class}) public Map<String,Integer> p4;
+ @MarshalledProp(params={Object.class, Float.class}) public Map<String,Integer> getP5() { return null; }
+ @MarshalledProp(params={String.class, Float.class}) public Map<String,? extends Integer> p6;
}
//====================================================================================================
@@ -731,12 +731,12 @@ class BeanMap_Test extends TestBase {
}
public static class K {
- @Beanp(params=Float.class) public List<String> p1;
- @Beanp(params=Float.class) public List<Integer> getP2() { return null; }
- @Beanp(params=Float.class) public List<? extends Integer> p3;
- @Beanp(params={String.class,Float.class}) public Map<String,Integer> p4;
- @Beanp(params={String.class,Float.class}) public Map<String,Integer> getP5() { return null; }
- @Beanp(params={String.class,Float.class}) public Map<String,? extends Integer> p6;
+ @MarshalledProp(params=Float.class) public List<String> p1;
+ @MarshalledProp(params=Float.class) public List<Integer> getP2() { return null; }
+ @MarshalledProp(params=Float.class) public List<? extends Integer> p3;
+ @MarshalledProp(params={String.class,Float.class}) public Map<String,Integer> p4;
+ @MarshalledProp(params={String.class,Float.class}) public Map<String,Integer> getP5() { return null; }
+ @MarshalledProp(params={String.class,Float.class}) public Map<String,? extends Integer> p6;
}
//====================================================================================================
@@ -1597,13 +1597,13 @@ class BeanMap_Test extends TestBase {
public void setA(String v) { a = v; }
public String b;
- @BeanIgnore public String getB() { return b; }
+ @MarshalledIgnore public String getB() { return b; }
public void setB(String v) { this.b = v+"(setter)"; }
- @BeanIgnore public String c;
+ @MarshalledIgnore public String c;
- @BeanIgnore public String getD() { return null; }
- @BeanIgnore public void setD(String v) {}
+ @MarshalledIgnore public String getD() { return null; }
+ @MarshalledIgnore public void setD(String v) {}
}
@Test void a34_hiddenProperties_usingConfig() {
@@ -1625,9 +1625,9 @@ class BeanMap_Test extends TestBase {
assertEquals("b(setter)", t.b);
}
- @BeanIgnoreApply(on="Dummy1",value=@BeanIgnore())
- @BeanIgnoreApply(on="Uc.getB,Uc.c,Uc.getD,Uc.setD",value=@BeanIgnore())
- @BeanIgnoreApply(on="Dummy2",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="Dummy1",value=@MarshalledIgnore())
+ @MarshalledIgnoreApply(on="Uc.getB,Uc.c,Uc.getD,Uc.setD",value=@MarshalledIgnore())
+ @MarshalledIgnoreApply(on="Dummy2",value=@MarshalledIgnore())
private static class UcConfig {}
public static class Uc {
@@ -1636,13 +1636,13 @@ class BeanMap_Test extends TestBase {
public void setA(String v) { a = v; }
public String b;
- @BeanIgnore public String getB() { return b; }
+ @MarshalledIgnore public String getB() { return b; }
public void setB(String b) { this.b = b+"(setter)"; }
- @BeanIgnore public String c;
+ @MarshalledIgnore public String c;
- @BeanIgnore public String getD() { return null; }
- @BeanIgnore public void setD(String v) {}
+ @MarshalledIgnore public String getD() { return null; }
+ @MarshalledIgnore public void setD(String v) {}
}
//====================================================================================================
@@ -1794,7 +1794,7 @@ class BeanMap_Test extends TestBase {
}
//====================================================================================================
- // containsKey with plain beans vs @Beanp(name="*") dyna/extras map
+ // containsKey with plain beans vs @MarshalledProp(name="*") dyna/extras map
//====================================================================================================
@Test void z01_containsKey_plainBean_unknownPropertyIsAbsent() {
@@ -1805,14 +1805,14 @@ class BeanMap_Test extends TestBase {
/** Bean with a Map-backed dyna property for extra entries (see BasicBeans_Test.B). */
public static class DynaExtrasBean {
- @Beanp(name = "*")
+ @MarshalledProp(name = "*")
public Map<String, Object> extras = new LinkedHashMap<>();
}
@Test void z02_containsKey_dynaBean_unknownKeyNotInExtrasMap() {
var bean = new DynaExtrasBean();
var m = BeanContext.DEFAULT.toBeanMap(bean);
- // Dyna map is empty; @Beanp(name="*") does not make arbitrary keys appear as present.
+ // Dyna map is empty; @MarshalledProp(name="*") does not make arbitrary keys appear as present.
assertFalse(m.containsKey("notDefinedAnywhere"));
assertEquals(set(), m.keySet());
}
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 4d39da9a63..116f08321b 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
@@ -198,7 +198,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
@Marshalled
public static class BeanWithDynaField {
public int f1;
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Map<String,Object> f2 = map();
public int f3;
@@ -224,12 +224,12 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
public int getF3() { return f3; }
public void setF3(int v) { f3 = v; }
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Map<String, Object> xxx() {
return f2;
}
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public void setYYY(String name, Object o) {
setterCalled = true;
this.f2.put(name, o);
@@ -257,18 +257,18 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
public int getF3() { return f3; }
public void setF3(int v) { f3 = v; }
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Object get(String name) {
return f2.get(name);
}
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public void set(String name, Object o) {
setterCalled = true;
this.f2.put(name, o);
}
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Collection<String> getExtraKeys() {
return f2.keySet();
}
@@ -294,7 +294,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
public int getF3() { return f3; }
public void setF3(int v) { f3 = v; }
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Map<String, Object> xxx() {
return f2;
}
@@ -309,7 +309,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
@Marshalled
public static class BeanWithDynaFieldSwapped {
- @Beanp(name="*")
+ @MarshalledProp(name="*")
@Swap(TemporalCalendarSwap.IsoInstant.class)
public Map<String,Calendar> f1 = map();
@@ -321,7 +321,7 @@ class DynaBean_ComboRoundTripTest extends ComboRoundTripTest_Base {
@Marshalled
public static class BeanWithDynaFieldStringList {
- @Beanp(name="*")
+ @MarshalledProp(name="*")
public Map<String,List<String>> f1 = map();
public BeanWithDynaFieldStringList init() {
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 29bab04395..d8ea8899e0 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
@@ -28,14 +28,14 @@ import org.junit.jupiter.api.*;
class ReadWriteOnlyProperties_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
- // @Beanp(ro/wo)
+ // @MarshalledProp(ro/wo)
//------------------------------------------------------------------------------------------------------------------
public static class A {
- @Beanp(ro="true")
+ @MarshalledProp(ro="true")
public int f1;
- @Beanp(wo="true")
+ @MarshalledProp(wo="true")
public int f2;
static A create() {
@@ -62,8 +62,8 @@ class ReadWriteOnlyProperties_Test extends TestBase {
@Marshalled(readOnlyProperties="f1", writeOnlyProperties="f2")
public static class B {
- @Beanp(ro="true") public int f1;
- @Beanp(wo="true") public int f2;
+ @MarshalledProp(ro="true") public int f1;
+ @MarshalledProp(wo="true") public int f2;
static B create() {
var x = new B();
@@ -86,8 +86,8 @@ class ReadWriteOnlyProperties_Test extends TestBase {
@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"))
+ @MarshalledPropApply(on="Bc.f1",value=@MarshalledProp(ro="true"))
+ @MarshalledPropApply(on="Bc.f2",value=@MarshalledProp(wo="true"))
private static class BcConfig {}
public static class Bc {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/TestUtils.java b/juneau-utest/src/test/java/org/apache/juneau/TestUtils.java
index b26800278c..ca7151a681 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/TestUtils.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/TestUtils.java
@@ -288,17 +288,17 @@ public class TestUtils extends Utils {
var f = (Field)null;
var c = o.getClass();
var n = Character.toUpperCase(name.charAt(0)) + name.substring(1);
- var m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("is"+n) && x.getParameterCount() == 0 && x.getAnnotation(BeanIgnore.class) == null).findFirst().orElse(null);
+ var m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("is"+n) && x.getParameterCount() == 0 && x.getAnnotation(MarshalledIgnore.class) == null).findFirst().orElse(null);
if (m != null) {
m.setAccessible(true);
return m.invoke(o);
}
- m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("get"+n) && x.getParameterCount() == 0 && x.getAnnotation(BeanIgnore.class) == null).findFirst().orElse(null);
+ m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("get"+n) && x.getParameterCount() == 0 && x.getAnnotation(MarshalledIgnore.class) == null).findFirst().orElse(null);
if (m != null) {
m.setAccessible(true);
return m.invoke(o);
}
- m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("get") && x.getParameterCount() == 1 && x.getParameterTypes()[0] == String.class && x.getAnnotation(BeanIgnore.class) == null).findFirst().orElse(null);
+ m = Arrays.stream(c.getMethods()).filter(x -> x.getName().equals("get") && x.getParameterCount() == 1 && x.getParameterTypes()[0] == String.class && x.getAnnotation(MarshalledIgnore.class) == null).findFirst().orElse(null);
if (m != null) {
m.setAccessible(true);
return m.invoke(o, name);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/A1.java b/juneau-utest/src/test/java/org/apache/juneau/a/A1.java
index 7d9f550d20..70aa9c32a7 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/A1.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/A1.java
@@ -26,7 +26,7 @@ public class A1 {
int f3;
private int f4;
- @BeanIgnore
+ @MarshalledIgnore
private int f5, f6, f7, f8;
public int getF5() { return f5; }
@@ -98,7 +98,7 @@ public class A1 {
int f3;
private int f4;
- @BeanIgnore
+ @MarshalledIgnore
private int f5, f6, f7, f8;
public int getF5() { return f5; }
@@ -122,7 +122,7 @@ public class A1 {
int f3;
private int f4;
- @BeanIgnore
+ @MarshalledIgnore
private int f5, f6, f7, f8;
public int getF5() { return f5; }
@@ -146,7 +146,7 @@ public class A1 {
int f3;
private int f4;
- @BeanIgnore
+ @MarshalledIgnore
private int f5, f6, f7, f8;
public int getF5() { return f5; }
@@ -170,7 +170,7 @@ public class A1 {
int f3;
private int f4;
- @BeanIgnore
+ @MarshalledIgnore
private int f5, f6, f7, f8;
public int getF5() { return f5; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/ReadOnlyBeans_RoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/ReadOnlyBeans_RoundTripTest.java
index 33110e07e1..f86f74f468 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/a/rttests/ReadOnlyBeans_RoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/a/rttests/ReadOnlyBeans_RoundTripTest.java
@@ -50,7 +50,7 @@ class ReadOnlyBeans_RoundTripTest extends RoundTripTest_Base {
private B f1;
private final B f2;
- @Beanc(properties="f2")
+ @MarshalledCtor(properties="f2")
public A(B f2) {
this.f2 = f2;
}
@@ -70,7 +70,7 @@ class ReadOnlyBeans_RoundTripTest extends RoundTripTest_Base {
private int f1;
private final String f2;
- @Beanc(properties="f2")
+ @MarshalledCtor(properties="f2")
public B(String sField) {
this.f2 = sField;
}
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 19ed088a1f..e31d14b6f3 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
@@ -57,7 +57,7 @@ class Records_RoundTripTest extends RoundTripTest_Base {
@Marshalled(properties="age,name")
public record AnnotatedOrder(String name, int age) {}
- public record WithBeanp(@Beanp(name="fullName") String name, int age) {}
+ public record WithMarshalledProp(@MarshalledProp(name="fullName") String name, int age) {}
public record WithCompactConstructor(String name, int age) {
public WithCompactConstructor {
@@ -71,9 +71,9 @@ class Records_RoundTripTest extends RoundTripTest_Base {
public record WithNullValues(String required, String optional) {}
@Marshalled(properties="name")
- public record WithBeanc(String name, int age) {
- @Beanc(properties="name")
- public WithBeanc(String name) {
+ public record WithMarshalledCtor(String name, int age) {
+ @MarshalledCtor(properties="name")
+ public WithMarshalledCtor(String name) {
this(name, 0);
}
}
@@ -188,8 +188,8 @@ class Records_RoundTripTest extends RoundTripTest_Base {
@ParameterizedTest
@MethodSource("testers")
void b02_beanpRename(RoundTrip_Tester t) throws Exception {
- var in = new WithBeanp("John", 30);
- var out = t.roundTrip(in, WithBeanp.class);
+ var in = new WithMarshalledProp("John", 30);
+ var out = t.roundTrip(in, WithMarshalledProp.class);
assertEquals("John", out.name());
assertEquals(30, out.age());
}
@@ -197,8 +197,8 @@ class Records_RoundTripTest extends RoundTripTest_Base {
@ParameterizedTest
@MethodSource("testers")
void b03_beancCustomConstructor(RoundTrip_Tester t) throws Exception {
- var in = new WithBeanc("John", 0);
- var out = t.roundTrip(in, WithBeanc.class);
+ var in = new WithMarshalledCtor("John", 0);
+ var out = t.roundTrip(in, WithMarshalledCtor.class);
assertEquals("John", out.name());
assertEquals(0, out.age());
}
@@ -262,10 +262,10 @@ class Records_RoundTripTest extends RoundTripTest_Base {
@Test
void c04_beancNonCanonicalConstructor() throws Exception {
- var in = new WithBeanc("Jane", 0);
+ var in = new WithMarshalledCtor("Jane", 0);
var json = json5(in);
assertTrue(json.contains("Jane"));
- var out = json("{\"name\":\"Jane\"}", WithBeanc.class);
+ var out = json("{\"name\":\"Jane\"}", WithMarshalledCtor.class);
assertEquals("Jane", out.name());
assertEquals(0, out.age());
}
@@ -313,8 +313,8 @@ class Records_RoundTripTest extends RoundTripTest_Base {
}
@Test
- void d05_jsonSerializationBeanpRename() throws Exception {
- var p = new WithBeanp("John", 30);
+ void d05_jsonSerializationMarshalledPropRename() throws Exception {
+ var p = new WithMarshalledProp("John", 30);
var json = json5(p);
assertEquals("{age:30,fullName:'John'}", json);
}
@@ -328,7 +328,7 @@ class Records_RoundTripTest extends RoundTripTest_Base {
@Test
void d07_jsonParsingRenamedProperty() throws Exception {
- var parsed = json("{\"fullName\":\"John\",\"age\":30}", WithBeanp.class);
+ var parsed = json("{\"fullName\":\"John\",\"age\":30}", WithMarshalledProp.class);
assertEquals("John", parsed.name());
assertEquals(30, parsed.age());
}
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 654fe9d8e2..3172e1a49e 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
@@ -271,7 +271,7 @@ class RoundTripBeanMaps_Test extends TestBase {
@MethodSource("testers")
void a05_implMap2(RoundTrip_Tester t) throws Exception {
if (isMarkdown(t))
- return; // @BeanIgnore / getter-only properties
+ return; // @MarshalledIgnore / getter-only properties
var b = new A(1);
b = t.roundTrip(b);
if (t.returnOriginalObject || t.getParser() == null)
@@ -301,13 +301,13 @@ class RoundTripBeanMaps_Test extends TestBase {
public static class A {
- @BeanIgnore
+ @MarshalledIgnore
public int f1, f2;
public int f3, f4;
private int f5, f6;
- @BeanIgnore
+ @MarshalledIgnore
public int getF5() { return f5; }
public void setF5(int v) { f5 = v; }
@@ -970,8 +970,8 @@ class RoundTripBeanMaps_Test extends TestBase {
return t;
}
- @BeanIgnore public KEnum getA() { return KEnum.FOO; }
- @Beanp(name="a") public String getA2() { return a.toString(); }
+ @MarshalledIgnore public KEnum getA() { return KEnum.FOO; }
+ @MarshalledProp(name="a") public String getA2() { return a.toString(); }
public void setA(KEnum v) {
// This method should not be interpreted as the setter for this
// property because it doesn't match the getter return type above.
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledCtorAnnotation_Test.java
similarity index 88%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledCtorAnnotation_Test.java
index a6c926d787..805f581b22 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeancAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledCtorAnnotation_Test.java
@@ -23,18 +23,18 @@ import static org.junit.jupiter.api.Assertions.*;
import org.apache.juneau.*;
import org.junit.jupiter.api.*;
-class BeancAnnotation_Test extends TestBase {
+class MarshalledCtorAnnotation_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Beanc a1 = BeancAnnotation.create()
+ MarshalledCtor a1 = MarshalledCtorAnnotation.create()
.description("a")
.properties("c")
.build();
- Beanc a2 = BeancAnnotation.create()
+ MarshalledCtor a2 = MarshalledCtorAnnotation.create()
.description("a")
.properties("c")
.build();
@@ -64,7 +64,7 @@ class BeancAnnotation_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
public static class D1 {
- @Beanc(
+ @MarshalledCtor(
description={ "a" },
properties="c"
)
@@ -72,18 +72,18 @@ class BeancAnnotation_Test extends TestBase {
}
public static class D2 {
- @Beanc(
+ @MarshalledCtor(
description={ "a" },
properties="c"
)
public D2() {}
}
- Beanc d1, d2;
+ MarshalledCtor d1, d2;
{
try {
- d1 = D1.class.getConstructor().getAnnotationsByType(Beanc.class)[0];
- d2 = D2.class.getConstructor().getAnnotationsByType(Beanc.class)[0];
+ d1 = D1.class.getConstructor().getAnnotationsByType(MarshalledCtor.class)[0];
+ d2 = D2.class.getConstructor().getAnnotationsByType(MarshalledCtor.class)[0];
} catch (Exception e) {
throw new RuntimeException(e);
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation_Test.java
similarity index 88%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation_Test.java
index 055e3980c4..31ebfdb88b 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnoreAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation_Test.java
@@ -26,17 +26,17 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
"java:S1186" // Empty test method intentional for framework testing
})
-class BeanIgnoreAnnotation_Test extends TestBase {
+class MarshalledIgnoreAnnotation_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- BeanIgnore a1 = BeanIgnoreAnnotation.create()
+ MarshalledIgnore a1 = MarshalledIgnoreAnnotation.create()
.description("a")
.build();
- BeanIgnore a2 = BeanIgnoreAnnotation.create()
+ MarshalledIgnore a2 = MarshalledIgnoreAnnotation.create()
.description("a")
.build();
@@ -65,17 +65,17 @@ class BeanIgnoreAnnotation_Test extends TestBase {
// Comparison with declared annotations.
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnore(
+ @MarshalledIgnore(
description={ "a" }
)
public static class D1 {}
- BeanIgnore d1 = D1.class.getAnnotationsByType(BeanIgnore.class)[0];
+ MarshalledIgnore d1 = D1.class.getAnnotationsByType(MarshalledIgnore.class)[0];
- @BeanIgnore(
+ @MarshalledIgnore(
description={ "a" }
)
public static class D2 {}
- BeanIgnore d2 = D2.class.getAnnotationsByType(BeanIgnore.class)[0];
+ MarshalledIgnore d2 = D2.class.getAnnotationsByType(MarshalledIgnore.class)[0];
@Test void d01_comparisonWithDeclarativeAnnotations() {
assertEqualsAll(a1, d1, d2);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnore_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnore_Test.java
similarity index 86%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnore_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnore_Test.java
index 9884ed953f..53f487eea4 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanIgnore_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledIgnore_Test.java
@@ -23,10 +23,10 @@ import org.apache.juneau.*;
import org.apache.juneau.json5.*;
import org.junit.jupiter.api.*;
-class BeanIgnore_Test extends TestBase {
+class MarshalledIgnore_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
- // Test @BeanIgnore on properties
+ // Test @MarshalledIgnore on properties
//------------------------------------------------------------------------------------------------------------------
public static class A {
@@ -34,22 +34,22 @@ class BeanIgnore_Test extends TestBase {
return "a";
}
- @BeanIgnore
+ @MarshalledIgnore
public String getB() {
return "b";
}
public String c = "c";
- @BeanIgnore public String d = "d";
+ @MarshalledIgnore public String d = "d";
}
@Test void a01_beanIgnoreOnProperties() {
assertJson("{a:'a',c:'c'}", new A());
}
- @BeanIgnoreApply(on="Ac.getB",value=@BeanIgnore())
- @BeanIgnoreApply(on="Ac.d",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="Ac.getB",value=@MarshalledIgnore())
+ @MarshalledIgnoreApply(on="Ac.d",value=@MarshalledIgnore())
private static class AcConfig {}
public static class Ac {
@@ -71,10 +71,10 @@ class BeanIgnore_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // Test @BeanIgnore on classes
+ // Test @MarshalledIgnore on classes
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnore
+ @MarshalledIgnore
public static class B1 {
public int f = 1;
@@ -94,10 +94,10 @@ class BeanIgnore_Test extends TestBase {
}
@Test void a03_beanIgnoreOnBean() {
- assertJson("{f2:2,f3:'xxx',f4:'xxx'}", new B());
+ assertJson("{f2:2,f3:null,f4:null}", new B());
}
- @BeanIgnoreApply(on="B1c",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="B1c",value=@MarshalledIgnore())
private static class B1cConfig {}
public static class B1c {
@@ -119,17 +119,17 @@ class BeanIgnore_Test extends TestBase {
}
@Test void a04_beanIgnoreOnBean_usingConfig() {
- assertSerialized(new Bc(), Json5Serializer.DEFAULT.copy().applyAnnotations(B1cConfig.class).build(), "{f2:2,f3:'xxx',f4:'xxx'}");
+ assertSerialized(new Bc(), Json5Serializer.DEFAULT.copy().applyAnnotations(B1cConfig.class).build(), "{f2:2,f3:null,f4:null}");
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanIgnore on private field: suppress accessor pair from bean metadata (default + JavaBean introspector)
+ // @MarshalledIgnore on private field: suppress accessor pair from bean metadata (default + JavaBean introspector)
//------------------------------------------------------------------------------------------------------------------
public static class PrivateFieldIgnoredWithAccessors {
public String visible = "ok";
- @BeanIgnore(ignoreAccessors = true)
+ @MarshalledIgnore(ignoreAccessors = true)
private String foo = "secret";
public String getVisible() {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledPropAnnotation_Test.java
similarity index 90%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledPropAnnotation_Test.java
index f730186d52..82fcd8b322 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanpAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledPropAnnotation_Test.java
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
"java:S1186" // Empty test method intentional for framework testing
})
-class BeanpAnnotation_Test extends TestBase {
+class MarshalledPropAnnotation_Test extends TestBase {
public static class X1 {}
@@ -34,7 +34,7 @@ class BeanpAnnotation_Test extends TestBase {
// Basic tests
//------------------------------------------------------------------------------------------------------------------
- Beanp a1 = BeanpAnnotation.create()
+ MarshalledProp a1 = MarshalledPropAnnotation.create()
.description("a")
.dictionary(X1.class)
.format("b")
@@ -47,7 +47,7 @@ class BeanpAnnotation_Test extends TestBase {
.wo("h")
.build();
- Beanp a2 = BeanpAnnotation.create()
+ MarshalledProp a2 = MarshalledPropAnnotation.create()
.description("a")
.dictionary(X1.class)
.format("b")
@@ -85,7 +85,7 @@ class BeanpAnnotation_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
public static class D1 {
- @Beanp(
+ @MarshalledProp(
description={ "a" },
dictionary=X1.class,
format="b",
@@ -101,7 +101,7 @@ class BeanpAnnotation_Test extends TestBase {
}
public static class D2 {
- @Beanp(
+ @MarshalledProp(
description={ "a" },
dictionary=X1.class,
format="b",
@@ -116,11 +116,11 @@ class BeanpAnnotation_Test extends TestBase {
public int f;
}
- Beanp d1, d2;
+ MarshalledProp d1, d2;
{
try {
- d1 = D1.class.getField("f").getAnnotationsByType(Beanp.class)[0];
- d2 = D2.class.getField("f").getAnnotationsByType(Beanp.class)[0];
+ d1 = D1.class.getField("f").getAnnotationsByType(MarshalledProp.class)[0];
+ d2 = D2.class.getField("f").getAnnotationsByType(MarshalledProp.class)[0];
} catch (Exception e) {
throw new RuntimeException(e);
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/Beanp_StarPlainField_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledProp_StarPlainField_Test.java
similarity index 87%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/Beanp_StarPlainField_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledProp_StarPlainField_Test.java
index 5627d1f7eb..a741c77fd9 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/Beanp_StarPlainField_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledProp_StarPlainField_Test.java
@@ -25,26 +25,26 @@ import org.apache.juneau.*;
import org.junit.jupiter.api.Test;
/**
- * {@link Beanp @Beanp} with name/value {@code "*"} on non-{@link Map} fields exposes a normal property named after the
+ * {@link MarshalledProp @MarshalledProp} with name/value {@code "*"} on non-{@link Map} fields exposes a normal property named after the
* field; {@code Map} fields keep the dyna property {@code *}.
*/
-class Beanp_StarPlainField_Test extends TestBase {
+class MarshalledProp_StarPlainField_Test extends TestBase {
- /** {@code *} via shorthand {@link Beanp#value()}. */
+ /** {@code *} via shorthand {@link MarshalledProp#value()}. */
public static class A {
- @Beanp("*")
+ @MarshalledProp("*")
public String taggedValue;
}
- /** {@code *} via {@link Beanp#name()}. */
+ /** {@code *} via {@link MarshalledProp#name()}. */
public static class B {
- @Beanp(name = "*")
+ @MarshalledProp(name = "*")
public int count;
}
/** Dynamic {@code Map} field must remain the dyna property {@code *}. */
public static class C {
- @Beanp("*")
+ @MarshalledProp("*")
public Map<String, Object> extra = new LinkedHashMap<>();
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
index 9e1a24bb16..f55ffb0e45 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
@@ -86,27 +86,27 @@ class Marshalled_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @Beanc and @Beanp annotations overrides visibility rules on constructors/properties.
+ // @MarshalledCtor and @MarshalledProp annotations overrides visibility rules on constructors/properties.
//------------------------------------------------------------------------------------------------------------------
public static class B1 {
- @Beanp
+ @MarshalledProp
private int f1;
private int f2;
- @Beanp
+ @MarshalledProp
private void setF2(int f2) {
this.f2 = f2;
}
- @Beanp
+ @MarshalledProp
private int getF2() {
return f2;
}
- @Beanc
+ @MarshalledCtor
private B1() {}
public static B1 create() {
@@ -125,10 +125,10 @@ class Marshalled_Test extends TestBase {
assertEquals("{f1:1,f2:2}", json);
}
- @BeancApply(on="B2()",value=@Beanc())
- @BeanpApply(on="B2.f1",value=@Beanp())
- @BeanpApply(on="B2.setF2",value=@Beanp())
- @BeanpApply(on="B2.getF2",value=@Beanp())
+ @MarshalledCtorApply(on="B2()",value=@MarshalledCtor())
+ @MarshalledPropApply(on="B2.f1",value=@MarshalledProp())
+ @MarshalledPropApply(on="B2.setF2",value=@MarshalledProp())
+ @MarshalledPropApply(on="B2.getF2",value=@MarshalledProp())
private static class B2Config {}
public static class B2 {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/bean/html5/HtmlElement_Attr_Test.java b/juneau-utest/src/test/java/org/apache/juneau/bean/html5/HtmlElement_Attr_Test.java
index a048ac6b72..685f7c2bd2 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/bean/html5/HtmlElement_Attr_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/bean/html5/HtmlElement_Attr_Test.java
@@ -99,7 +99,7 @@ class HtmlElement_Attr_Test extends TestBase {
}
@Test void a11_no_serialization_errors() {
- // Verifies @Beanp annotation inheritance doesn't cause serialization errors
+ // Verifies @MarshalledProp annotation inheritance doesn't cause serialization errors
Div x = div()
.attr("data-test", "value")
.attrUri("data-url", "http://test.com")
diff --git a/juneau-utest/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java b/juneau-utest/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
index 6d6951df54..06408c6403 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/commons/inject/BeanInstantiator_Test.java
@@ -626,7 +626,7 @@ class BeanInstantiator_Test extends TestBase {
* Tests that deprecated getInstance() methods are ignored in favor of non-deprecated ones.
*/
@Test
- void c03_createBeanIgnoresDeprecatedGetInstance() {
+ void c03_createMarshalledIgnoresDeprecatedGetInstance() {
var bean = bc(C03_BeanWithDeprecatedGetInstance.class).run();
assertSame(C03_BeanWithDeprecatedGetInstance.INSTANCE, bean);
@@ -653,7 +653,7 @@ class BeanInstantiator_Test extends TestBase {
* Tests that non-static getInstance() methods are ignored (only static factory methods are used).
*/
@Test
- void c04_createBeanIgnoresNonStaticGetInstance() {
+ void c04_createMarshalledIgnoresNonStaticGetInstance() {
var bean = bc(C04_BeanWithNonStaticGetInstance.class).run();
assertInstanceOf(C04_BeanWithNonStaticGetInstance.class, bean);
@@ -1538,7 +1538,7 @@ class BeanInstantiator_Test extends TestBase {
* with bean creation, allowing graceful deprecation of old constructor signatures.
*/
@Test
- void d19_createBeanIgnoresDeprecatedConstructor() {
+ void d19_createMarshalledIgnoresDeprecatedConstructor() {
beanStore.add(String.class, "should-not-use-this");
var bean = bc(D19_BeanWithDeprecatedConstructor.class).run();
@@ -1573,7 +1573,7 @@ class BeanInstantiator_Test extends TestBase {
* some constructor signatures cannot be satisfied.
*/
@Test
- void d20_createBeanIgnoresUnresolvableConstructor() {
+ void d20_createMarshalledIgnoresUnresolvableConstructor() {
var bean = bc(D20_BeanWithUnresolvableConstructor.class).run();
assertInstanceOf(D20_BeanWithUnresolvableConstructor.class, bean);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/csv/CsvParser_Test.java b/juneau-utest/src/test/java/org/apache/juneau/csv/CsvParser_Test.java
index a3c42f624f..b5d481e69b 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/csv/CsvParser_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/csv/CsvParser_Test.java
@@ -272,10 +272,10 @@ class CsvParser_Test extends TestBase {
}
public static class E {
- @Beanp(name = "full_name")
+ @MarshalledProp(name = "full_name")
public String name;
- @Beanp(name = "years")
+ @MarshalledProp(name = "years")
public int age;
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/html/BasicHtml_Test.java b/juneau-utest/src/test/java/org/apache/juneau/html/BasicHtml_Test.java
index 8028141fb4..4fbb4be84d 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/html/BasicHtml_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/html/BasicHtml_Test.java
@@ -2749,11 +2749,11 @@ class BasicHtml_Test extends TestBase {
}
public static class BeanWithMapProperties {
- @Beanp(type=MapWithStrings.class)
+ @MarshalledProp(type=MapWithStrings.class)
public Map<String,String> a;
- @Beanp(type=MapWithNumbers.class)
+ @MarshalledProp(type=MapWithNumbers.class)
public Map<String,Number> b;
- @Beanp(type=MapWithObjects.class)
+ @MarshalledProp(type=MapWithObjects.class)
public Map<String,Object> c;
BeanWithMapProperties init() {
@@ -2922,7 +2922,7 @@ class BasicHtml_Test extends TestBase {
@Marshalled(typeName=" \b\f\n\t\r ")
public static class BeanWithSpecialCharacters2 {
- @Beanp(name=" \b\f\n\t\r ")
+ @MarshalledProp(name=" \b\f\n\t\r ")
public String a;
BeanWithSpecialCharacters2 init() {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/html/Common_Test.java b/juneau-utest/src/test/java/org/apache/juneau/html/Common_Test.java
index 2fb29cb39e..ca5404c7a5 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/html/Common_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/html/Common_Test.java
@@ -188,7 +188,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperties() throws Exception {
var s = HtmlSerializer.create().sq().addKeyValueTableHeaders().build();
@@ -262,12 +262,12 @@ class Common_Test extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1") public E2 x1 = new E2();
- @Beanp(properties="f1") public Map<String,Integer> x2 = m("f1",3,"f2",4);
- @Beanp(properties="f1") public E2[] x3 = {new E2()};
- @Beanp(properties="f1") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",5,"f2",6)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",7,"f2",8));
+ @MarshalledProp(properties="f1") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1") public Map<String,Integer> x2 = m("f1",3,"f2",4);
+ @MarshalledProp(properties="f1") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",5,"f2",6)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",7,"f2",8));
}
public static class E2 {
@@ -276,7 +276,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyPropertiesOnListOfBeans() throws Exception {
var s = HtmlSerializer.DEFAULT_SQ;
@@ -302,7 +302,7 @@ class Common_Test extends TestBase {
}
public static class F {
- @Beanp(properties="x2") public List<F> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<F> x1 = new LinkedList<>();
public int x2 = 2;
}
@@ -415,7 +415,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp(format) tests
+ // @MarshalledProp(format) tests
//====================================================================================================
@Test
@@ -438,30 +438,30 @@ class Common_Test extends TestBase {
}
public static class K {
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
public float floatField = 3.14159f;
- @Beanp(format="$%.2f")
+ @MarshalledProp(format="$%.2f")
public float floatWithCurrency = 19.987f;
- @Beanp(format="%.3f")
+ @MarshalledProp(format="%.3f")
public double doubleField = 2.71828;
- @Beanp(format="%05d")
+ @MarshalledProp(format="%05d")
public int intField = 42;
- @Beanp(format="%016d")
+ @MarshalledProp(format="%016d")
public long longField = 1234567890L;
- @Beanp(format="0x%06X")
+ @MarshalledProp(format="0x%06X")
public int hexField = 0xFF00FF;
- @Beanp(format="%.3e")
+ @MarshalledProp(format="%.3e")
public double scientificField = 6.02214076e23;
public String name = "Test";
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
private float privateField = 9.876f;
public float getPrivateField() { return privateField; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/json/Common_Test.java b/juneau-utest/src/test/java/org/apache/juneau/json/Common_Test.java
index 4e0b41ec56..7c2042d050 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/json/Common_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/json/Common_Test.java
@@ -154,7 +154,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperies() throws Exception {
var s = JsonSerializer.DEFAULT;
@@ -167,12 +167,12 @@ class Common_Test extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1") public E2 x1 = new E2();
- @Beanp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
- @Beanp(properties="f1") public E2[] x3 = {new E2()};
- @Beanp(properties="f1") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
+ @MarshalledProp(properties="f1") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
+ @MarshalledProp(properties="f1") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
}
public static class E2 {
@@ -181,7 +181,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyProperiesOnListOfBeans() throws Exception {
var s = JsonSerializer.DEFAULT;
@@ -194,7 +194,7 @@ class Common_Test extends TestBase {
}
public static class F {
- @Beanp(properties="x2") public List<F> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<F> x1 = new LinkedList<>();
public int x2 = 2;
}
@@ -296,7 +296,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp(format) tests
+ // @MarshalledProp(format) tests
//====================================================================================================
@Test
@@ -319,30 +319,30 @@ class Common_Test extends TestBase {
}
public static class K {
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
public float floatField = 3.14159f;
- @Beanp(format="$%.2f")
+ @MarshalledProp(format="$%.2f")
public float floatWithCurrency = 19.987f;
- @Beanp(format="%.3f")
+ @MarshalledProp(format="%.3f")
public double doubleField = 2.71828;
- @Beanp(format="%05d")
+ @MarshalledProp(format="%05d")
public int intField = 42;
- @Beanp(format="%016d")
+ @MarshalledProp(format="%016d")
public long longField = 1234567890L;
- @Beanp(format="0x%06X")
+ @MarshalledProp(format="0x%06X")
public int hexField = 0xFF00FF;
- @Beanp(format="%.3e")
+ @MarshalledProp(format="%.3e")
public double scientificField = 6.02214076e23;
public String name = "Test";
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
private float privateField = 9.876f;
public float getPrivateField() { return privateField; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/json5/Common_Test.java b/juneau-utest/src/test/java/org/apache/juneau/json5/Common_Test.java
index 987e53c6b1..b1dc489626 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/json5/Common_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/json5/Common_Test.java
@@ -154,7 +154,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperies() throws Exception {
var s = Json5Serializer.DEFAULT;
@@ -167,12 +167,12 @@ class Common_Test extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1") public E2 x1 = new E2();
- @Beanp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
- @Beanp(properties="f1") public E2[] x3 = {new E2()};
- @Beanp(properties="f1") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
+ @MarshalledProp(properties="f1") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
+ @MarshalledProp(properties="f1") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
}
public static class E2 {
@@ -181,7 +181,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyProperiesOnListOfBeans() throws Exception {
var s = Json5Serializer.DEFAULT;
@@ -194,7 +194,7 @@ class Common_Test extends TestBase {
}
public static class F {
- @Beanp(properties="x2") public List<F> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<F> x1 = new LinkedList<>();
public int x2 = 2;
}
@@ -296,7 +296,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp(format) tests
+ // @MarshalledProp(format) tests
//====================================================================================================
@Test
@@ -319,30 +319,30 @@ class Common_Test extends TestBase {
}
public static class K {
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
public float floatField = 3.14159f;
- @Beanp(format="$%.2f")
+ @MarshalledProp(format="$%.2f")
public float floatWithCurrency = 19.987f;
- @Beanp(format="%.3f")
+ @MarshalledProp(format="%.3f")
public double doubleField = 2.71828;
- @Beanp(format="%05d")
+ @MarshalledProp(format="%05d")
public int intField = 42;
- @Beanp(format="%016d")
+ @MarshalledProp(format="%016d")
public long longField = 1234567890L;
- @Beanp(format="0x%06X")
+ @MarshalledProp(format="0x%06X")
public int hexField = 0xFF00FF;
- @Beanp(format="%.3e")
+ @MarshalledProp(format="%.3e")
public double scientificField = 6.02214076e23;
public String name = "Test";
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
private float privateField = 9.876f;
public float getPrivateField() { return privateField; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/markdown/MarkdownParser_Test.java b/juneau-utest/src/test/java/org/apache/juneau/markdown/MarkdownParser_Test.java
index 4aae5579ab..67e06ce2f8 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/markdown/MarkdownParser_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/markdown/MarkdownParser_Test.java
@@ -231,10 +231,10 @@ class MarkdownParser_Test {
}
public static class F {
- @Beanp(name = "full_name")
+ @MarshalledProp(name = "full_name")
public String name;
- @Beanp(name = "years")
+ @MarshalledProp(name = "years")
public int age;
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java
index 0833fdb66e..24cf94d7c3 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java
@@ -272,7 +272,7 @@ class RestOp_BeanConfig_Test extends TestBase {
public static class X1 {
public int a;
- @Beanp("_b") public String b;
+ @MarshalledProp("_b") public String b;
X1 init() {
a = 1;
@@ -284,7 +284,7 @@ class RestOp_BeanConfig_Test extends TestBase {
@Marshalled(properties="_b,a")
public static class X2 {
public int a;
- @Beanp("_b") public String b;
+ @MarshalledProp("_b") public String b;
X2 init() {
a = 1;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/testutils/pojos/ImplicitSwappedObject.java b/juneau-utest/src/test/java/org/apache/juneau/testutils/pojos/ImplicitSwappedObject.java
index 71a33737c8..d743ddec9c 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/testutils/pojos/ImplicitSwappedObject.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/testutils/pojos/ImplicitSwappedObject.java
@@ -20,7 +20,7 @@ import static org.apache.juneau.utest.utils.Constants.*;
import org.apache.juneau.annotation.*;
-@BeanIgnore
+@Marshalled(as=MarshalledAs.STRING)
public class ImplicitSwappedObject {
public boolean wasUnswapped;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoListSwapTest.java b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoListSwapTest.java
index 187f3bc554..75bedf2457 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoListSwapTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoListSwapTest.java
@@ -172,7 +172,7 @@ class AutoListSwapTest extends TestBase {
// Ignore class
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnore
+ @MarshalledIgnore
public static class D01 {
public List<String> toList() {
return STRINGLIST;
@@ -194,7 +194,7 @@ class AutoListSwapTest extends TestBase {
assertNull(find(D02.D02A.class));
}
- @BeanIgnoreApply(on="D01c",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="D01c",value=@MarshalledIgnore())
private static class D01cConfig {}
public static class D01c {
@@ -222,11 +222,11 @@ class AutoListSwapTest extends TestBase {
// Ignore swap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="E01c.toList",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="E01c.toList",value=@MarshalledIgnore())
private static class E01Config {}
public static class E01 {
- @BeanIgnore
+ @MarshalledIgnore
public List<String> toList() {
return STRINGLIST;
}
@@ -286,14 +286,14 @@ class AutoListSwapTest extends TestBase {
// Ignore unswap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="F01c.create",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="F01c.create",value=@MarshalledIgnore())
private static class F01Config {}
public static class F01 {
public List<String> toList() {
return STRINGLIST;
}
- @BeanIgnore
+ @MarshalledIgnore
public static F01 create(List<String> o) {
return null;
}
@@ -387,11 +387,11 @@ class AutoListSwapTest extends TestBase {
// Ignore constructor
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="G01c(List)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="G01c(List)",value=@MarshalledIgnore())
private static class G01Config {}
public static class G01 {
- @BeanIgnore
+ @MarshalledIgnore
public G01(List<String> o) {}
public List<String> toList() {
return STRINGLIST;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoMapSwapTest.java b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoMapSwapTest.java
index 316545b753..cdac13378c 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoMapSwapTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoMapSwapTest.java
@@ -179,10 +179,10 @@ class AutoMapSwapTest extends TestBase {
// Ignore class
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="D01c",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="D01c",value=@MarshalledIgnore())
private static class D01Config {}
- @BeanIgnore
+ @MarshalledIgnore
public static class D01 {
public Map<String,String> toMap() {
return STRINGMAP;
@@ -217,11 +217,11 @@ class AutoMapSwapTest extends TestBase {
// Ignore swap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="E01c.toMap",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="E01c.toMap",value=@MarshalledIgnore())
private static class E01Config {}
public static class E01 {
- @BeanIgnore
+ @MarshalledIgnore
public Map<String,String> toMap() {
return STRINGMAP;
}
@@ -281,14 +281,14 @@ class AutoMapSwapTest extends TestBase {
// Ignore unswap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="F01c.create(Map)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="F01c.create(Map)",value=@MarshalledIgnore())
private static class F01Config {}
public static class F01 {
public Map<String,String> toMap() {
return STRINGMAP;
}
- @BeanIgnore
+ @MarshalledIgnore
public static F01 create(Map<String,String> o) {
return null;
}
@@ -382,11 +382,11 @@ class AutoMapSwapTest extends TestBase {
// Ignore constructor
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="G01c(Map)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="G01c(Map)",value=@MarshalledIgnore())
private static class G01Config {}
public static class G01 {
- @BeanIgnore
+ @MarshalledIgnore
public G01(Map<String,String> o) {}
public Map<String,String> toMap() {
return STRINGMAP;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoNumberSwapTest.java b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoNumberSwapTest.java
index 2f8e595542..01b3c1f861 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoNumberSwapTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoNumberSwapTest.java
@@ -564,10 +564,10 @@ class AutoNumberSwapTest extends TestBase {
// Ignore class
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="D01c",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="D01c",value=@MarshalledIgnore())
private static class D01Config {}
- @BeanIgnore
+ @MarshalledIgnore
public static class D01 {
public Integer toInteger() {
return 1;
@@ -612,11 +612,11 @@ class AutoNumberSwapTest extends TestBase {
// Ignore swap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="E01c.toInteger",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="E01c.toInteger",value=@MarshalledIgnore())
private static class E01Config {}
public static class E01 {
- @BeanIgnore
+ @MarshalledIgnore
public Integer toInteger() {
return 1;
}
@@ -676,14 +676,14 @@ class AutoNumberSwapTest extends TestBase {
// Ignore unswap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="F01c.create(java.lang.Integer)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="F01c.create(java.lang.Integer)",value=@MarshalledIgnore())
private static class F01Config {}
public static class F01 {
public Integer toInteger() {
return 1;
}
- @BeanIgnore
+ @MarshalledIgnore
public static F01 create(Integer o) {
return null;
}
@@ -777,11 +777,11 @@ class AutoNumberSwapTest extends TestBase {
// Ignore constructor
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="G01c(java.lang.Integer)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="G01c(java.lang.Integer)",value=@MarshalledIgnore())
private static class G01Config {}
public static class G01 {
- @BeanIgnore
+ @MarshalledIgnore
public G01(Integer o) {}
public Integer toInteger() {
return 1;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoObjectSwapTest.java b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoObjectSwapTest.java
index bc87cd383f..d92df72c3e 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transform/AutoObjectSwapTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transform/AutoObjectSwapTest.java
@@ -174,10 +174,10 @@ class AutoObjectSwapTest extends TestBase {
// Ignore class
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="D01c",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="D01c",value=@MarshalledIgnore())
private static class D01Config {}
- @BeanIgnore
+ @MarshalledIgnore
public static class D01 {
public Map<String,String> swap() {
return STRINGMAP;
@@ -212,11 +212,11 @@ class AutoObjectSwapTest extends TestBase {
// Ignore swap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="E01c.swap",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="E01c.swap",value=@MarshalledIgnore())
private static class E01Config {}
public static class E01 {
- @BeanIgnore
+ @MarshalledIgnore
public Map<String,String> swap() {
return STRINGMAP;
}
@@ -267,14 +267,14 @@ class AutoObjectSwapTest extends TestBase {
// Ignore unswap method
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="F01c.create(java.util.Map)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="F01c.create(java.util.Map)",value=@MarshalledIgnore())
private static class F01Config {}
public static class F01 {
public Map<String,String> swap() {
return STRINGMAP;
}
- @BeanIgnore
+ @MarshalledIgnore
public static F01 create(Map<String,String> o) {
return null;
}
@@ -368,11 +368,11 @@ class AutoObjectSwapTest extends TestBase {
// Ignore constructor
//------------------------------------------------------------------------------------------------------------------
- @BeanIgnoreApply(on="G01c(Map)",value=@BeanIgnore())
+ @MarshalledIgnoreApply(on="G01c(Map)",value=@MarshalledIgnore())
private static class G01Config {}
public static class G01 {
- @BeanIgnore
+ @MarshalledIgnore
public G01(Map<String,String> o) {}
public Map<String,String> swap() {
return STRINGMAP;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transforms/Builder_ComboRoundTripTest.java b/juneau-utest/src/test/java/org/apache/juneau/transforms/Builder_ComboRoundTripTest.java
index 6c9abd7378..5b03e7aa03 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transforms/Builder_ComboRoundTripTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transforms/Builder_ComboRoundTripTest.java
@@ -370,7 +370,7 @@ class Builder_ComboRoundTripTest extends ComboRoundTripTest_Base {
return x;
}
- @Beanp
+ @MarshalledProp
public HBuilder fooBar(int fooBar) {
this.fooBar = fooBar;
return this;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/uon/Common_UonTest.java b/juneau-utest/src/test/java/org/apache/juneau/uon/Common_UonTest.java
index 11e23a4688..ea1b8801ba 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/uon/Common_UonTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/uon/Common_UonTest.java
@@ -152,7 +152,7 @@ class Common_UonTest extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperies() throws Exception {
var s = UonSerializer.DEFAULT;
@@ -161,12 +161,12 @@ class Common_UonTest extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1") public E2 x1 = new E2();
- @Beanp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
- @Beanp(properties="f1") public E2[] x3 = {new E2()};
- @Beanp(properties="f1") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
+ @MarshalledProp(properties="f1") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
+ @MarshalledProp(properties="f1") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
}
public static class E2 {
@@ -175,7 +175,7 @@ class Common_UonTest extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyPropertiesOnListOfBeans() throws Exception {
var s = UonSerializer.DEFAULT;
@@ -188,7 +188,7 @@ class Common_UonTest extends TestBase {
}
public static class F {
- @Beanp(properties="x2") public List<F> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<F> x1 = new LinkedList<>();
public int x2 = 2;
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java b/juneau-utest/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java
index 7772f53f24..9ff6e3b6d8 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/urlencoding/Common_UrlEncodingTest.java
@@ -151,7 +151,7 @@ class Common_UrlEncodingTest extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperies() throws Exception {
var s = UrlEncodingSerializer.DEFAULT;
@@ -160,12 +160,12 @@ class Common_UrlEncodingTest extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1") public E2 x1 = new E2();
- @Beanp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
- @Beanp(properties="f1") public E2[] x3 = {new E2()};
- @Beanp(properties="f1") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
+ @MarshalledProp(properties="f1") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1") public Map<String,Integer> x2 = m("f1",1,"f2",2);
+ @MarshalledProp(properties="f1") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f2",2)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f2",2));
}
public static class E2 {
@@ -174,7 +174,7 @@ class Common_UrlEncodingTest extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyPropertiesOnListOfBeans() throws Exception {
var s = UrlEncodingSerializer.DEFAULT;
@@ -190,7 +190,7 @@ class Common_UrlEncodingTest extends TestBase {
}
public static class F {
- @Beanp(properties="x2") public List<F> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<F> x1 = new LinkedList<>();
public int x2 = 2;
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/urlencoding/UrlEncodingSerializer_Test.java b/juneau-utest/src/test/java/org/apache/juneau/urlencoding/UrlEncodingSerializer_Test.java
index c225f0ff7f..505814da17 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/urlencoding/UrlEncodingSerializer_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/urlencoding/UrlEncodingSerializer_Test.java
@@ -566,16 +566,16 @@ class UrlEncodingSerializer_Test extends TestBase {
@Marshalled
public static class A {
- @Beanp(name="foo")
+ @MarshalledProp(name="foo")
public String f1 = "foo";
- @Beanp(name="'foo'")
+ @MarshalledProp(name="'foo'")
public String f2 = "'foo'";
- @Beanp(name="(foo)")
+ @MarshalledProp(name="(foo)")
public String f3 = "(foo)";
- @Beanp(name="@(foo)")
+ @MarshalledProp(name="@(foo)")
public String f4 = "@(foo)";
}
}
\ No newline at end of file
diff --git a/juneau-utest/src/test/java/org/apache/juneau/xml/BasicXml_Test.java b/juneau-utest/src/test/java/org/apache/juneau/xml/BasicXml_Test.java
index 1668aa0fd8..f8d1706f7d 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/xml/BasicXml_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/xml/BasicXml_Test.java
@@ -1342,11 +1342,11 @@ class BasicXml_Test extends TestBase {
}
public static class BeanWithMapProperties {
- @Beanp(type=MapWithStrings.class)
+ @MarshalledProp(type=MapWithStrings.class)
public Map<String,String> a;
- @Beanp(type=MapWithNumbers.class)
+ @MarshalledProp(type=MapWithNumbers.class)
public Map<String,Number> b;
- @Beanp(type=MapWithObjects.class)
+ @MarshalledProp(type=MapWithObjects.class)
public Map<String,Object> c;
BeanWithMapProperties init() {
@@ -1435,10 +1435,10 @@ class BasicXml_Test extends TestBase {
public static class BeanWithChildTypeNames {
public BeanX a;
- @Beanp(dictionary=BeanX.class)
+ @MarshalledProp(dictionary=BeanX.class)
public Object b;
public BeanX[] c;
- @Beanp(dictionary=BeanX.class)
+ @MarshalledProp(dictionary=BeanX.class)
public Object[] d;
BeanWithChildTypeNames init() {
a = new BeanX().init();
@@ -1558,7 +1558,7 @@ class BasicXml_Test extends TestBase {
public static class BeanWithMixedContent {
@Xml(format=XmlFormat.MIXED)
- @Beanp(dictionary={BeanXSimple.class, BeanYSimple.class})
+ @MarshalledProp(dictionary={BeanXSimple.class, BeanYSimple.class})
public Object[] a;
BeanWithMixedContent init() {
a = a(
@@ -1622,7 +1622,7 @@ class BasicXml_Test extends TestBase {
@Marshalled(typeName=" \b\f\n\t\r ")
public static class BeanWithSpecialCharacters2 {
- @Beanp(name=" \b\f\n\t\r ")
+ @MarshalledProp(name=" \b\f\n\t\r ")
public String a;
BeanWithSpecialCharacters2 init() {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/xml/Common_Test.java b/juneau-utest/src/test/java/org/apache/juneau/xml/Common_Test.java
index d3ac32f1b1..f1fb23f84e 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/xml/Common_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/xml/Common_Test.java
@@ -155,7 +155,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation.
+ // @MarshalledProp.bpi annotation.
//====================================================================================================
@Test void a05_beanPropertyProperties() throws Exception {
var s = XmlSerializer.DEFAULT_SQ;
@@ -175,12 +175,12 @@ class Common_Test extends TestBase {
}
public static class E1 {
- @Beanp(properties="f1,f2") public E2 x1 = new E2();
- @Beanp(properties="f1,f2") public Map<String,Integer> x2 = m("f1",1,"f3",3);
- @Beanp(properties="f1,f2") public E2[] x3 = {new E2()};
- @Beanp(properties="f1,f2") public List<E2> x4 = l(new E2());
- @Beanp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f3",3)};
- @Beanp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f3",3));
+ @MarshalledProp(properties="f1,f2") public E2 x1 = new E2();
+ @MarshalledProp(properties="f1,f2") public Map<String,Integer> x2 = m("f1",1,"f3",3);
+ @MarshalledProp(properties="f1,f2") public E2[] x3 = {new E2()};
+ @MarshalledProp(properties="f1,f2") public List<E2> x4 = l(new E2());
+ @MarshalledProp(properties="f1") public JsonMap[] x5 = {JsonMap.of("f1",1,"f3",3)};
+ @MarshalledProp(properties="f1") public List<JsonMap> x6 = l(JsonMap.of("f1",1,"f3",3));
}
public static class E2 {
@@ -191,7 +191,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp.bpi annotation on list of beans.
+ // @MarshalledProp.bpi annotation on list of beans.
//====================================================================================================
@Test void a06_beanPropertyPropertiesOnListOfBeans() throws Exception {
var s = XmlSerializer.DEFAULT_SQ;
@@ -204,7 +204,7 @@ class Common_Test extends TestBase {
}
public static class Test7b {
- @Beanp(properties="x2") public List<Test7b> x1 = new LinkedList<>();
+ @MarshalledProp(properties="x2") public List<Test7b> x1 = new LinkedList<>();
public int x2 = 2;
}
@@ -250,7 +250,7 @@ class Common_Test extends TestBase {
}
//====================================================================================================
- // @Beanp(format) tests
+ // @MarshalledProp(format) tests
//====================================================================================================
@Test
@@ -273,30 +273,30 @@ class Common_Test extends TestBase {
}
public static class K {
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
public float floatField = 3.14159f;
- @Beanp(format="$%.2f")
+ @MarshalledProp(format="$%.2f")
public float floatWithCurrency = 19.987f;
- @Beanp(format="%.3f")
+ @MarshalledProp(format="%.3f")
public double doubleField = 2.71828;
- @Beanp(format="%05d")
+ @MarshalledProp(format="%05d")
public int intField = 42;
- @Beanp(format="%016d")
+ @MarshalledProp(format="%016d")
public long longField = 1234567890L;
- @Beanp(format="0x%06X")
+ @MarshalledProp(format="0x%06X")
public int hexField = 0xFF00FF;
- @Beanp(format="%.3e")
+ @MarshalledProp(format="%.3e")
public double scientificField = 6.02214076e23;
public String name = "Test";
- @Beanp(format="%.2f")
+ @MarshalledProp(format="%.2f")
private float privateField = 9.876f;
public float getPrivateField() { return privateField; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreComments_Test.java b/juneau-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreComments_Test.java
index 779ec502ee..1c0d840deb 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreComments_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/xml/XmlIgnoreComments_Test.java
@@ -807,11 +807,11 @@ class XmlIgnoreComments_Test extends TestBase {
}
public static class BeanWithMapProperties {
- @Beanp(type=MapWithStrings.class)
+ @MarshalledProp(type=MapWithStrings.class)
public Map<String,String> a;
- @Beanp(type=MapWithNumbers.class)
+ @MarshalledProp(type=MapWithNumbers.class)
public Map<String,Number> b;
- @Beanp(type=MapWithObjects.class)
+ @MarshalledProp(type=MapWithObjects.class)
public Map<String,Object> c;
BeanWithMapProperties init() {
@@ -900,10 +900,10 @@ class XmlIgnoreComments_Test extends TestBase {
public static class BeanWithChildTypeNames {
public BeanX a;
- @Beanp(dictionary=BeanX.class)
+ @MarshalledProp(dictionary=BeanX.class)
public Object b;
public BeanX[] c;
- @Beanp(dictionary=BeanX.class)
+ @MarshalledProp(dictionary=BeanX.class)
public Object[] d;
BeanWithChildTypeNames init() {
a = new BeanX().init();
@@ -1023,7 +1023,7 @@ class XmlIgnoreComments_Test extends TestBase {
public static class BeanWithMixedContent {
@Xml(format=XmlFormat.MIXED)
- @Beanp(dictionary={BeanXSimple.class, BeanYSimple.class})
+ @MarshalledProp(dictionary={BeanXSimple.class, BeanYSimple.class})
public Object[] a;
BeanWithMixedContent init() {
a = a(
@@ -1087,7 +1087,7 @@ class XmlIgnoreComments_Test extends TestBase {
@Marshalled(typeName=" \b\f\n\t\r ")
public static class BeanWithSpecialCharacters2 {
- @Beanp(name=" \b\f\n\t\r ")
+ @MarshalledProp(name=" \b\f\n\t\r ")
public String a;
BeanWithSpecialCharacters2 init() {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/xml/Xml_Test.java b/juneau-utest/src/test/java/org/apache/juneau/xml/Xml_Test.java
index 95febf1e76..75df9f2efc 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/xml/Xml_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/xml/Xml_Test.java
@@ -290,7 +290,7 @@ class Xml_Test extends TestBase {
@Marshalled(typeName="foo")
public static class J1 {
- @Beanp(properties="f2") public List<J2> f1 = l(new J2());
+ @MarshalledProp(properties="f2") public List<J2> f1 = l(new J2());
}
@Marshalled(typeName="bar")
@@ -459,8 +459,8 @@ class Xml_Test extends TestBase {
@Marshalled(properties="url2,id2,name")
public static class O {
- @Beanp(name="url2") @Xml(format=ELEMENT) public URL url;
- @Beanp(name="id2") public int id;
+ @MarshalledProp(name="url2") @Xml(format=ELEMENT) public URL url;
+ @MarshalledProp(name="id2") public int id;
public String name;
public O() {}
public O(String url, int id, String name) {
@@ -491,8 +491,8 @@ class Xml_Test extends TestBase {
@Marshalled(properties="url2,id2,name")
public static class P {
- @Beanp(name="url2") @Xml(format=ATTR) public URL url;
- @Beanp(name="id2") @Xml(format=ATTR) public int id;
+ @MarshalledProp(name="url2") @Xml(format=ATTR) public URL url;
+ @MarshalledProp(name="id2") @Xml(format=ATTR) public int id;
public String name;
public P() {}
public P(String url, int id, String name) {
@@ -992,7 +992,7 @@ class Xml_Test extends TestBase {
@Xml(format=ATTR)
public String f2;
- @Beanp(name="x3")
+ @MarshalledProp(name="x3")
@Xml(format=ATTR, prefix="nsf3", namespace="http://nsf3")
public String f3;
diff --git a/juneau-utest/src/test/java/org/apache/juneau/xml/xml1b/T7.java b/juneau-utest/src/test/java/org/apache/juneau/xml/xml1b/T7.java
index b22f7b6196..26385cfc40 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/xml/xml1b/T7.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/xml/xml1b/T7.java
@@ -22,17 +22,17 @@ import org.apache.juneau.xml.annotation.*;
@Marshalled
public class T7 {
- @Beanp(name="g1") public int f1 = 1;
+ @MarshalledProp(name="g1") public int f1 = 1;
- @Xml(prefix="bar",namespace="http://bar") @Beanp(name="g2") public int f2 = 2;
+ @Xml(prefix="bar",namespace="http://bar") @MarshalledProp(name="g2") public int f2 = 2;
private int f3 = 3;
- @Beanp(name="g3") public int getF3() { return f3; }
- @Beanp(name="g3") public void setF3(int v) { f3 = v; }
+ @MarshalledProp(name="g3") public int getF3() { return f3; }
+ @MarshalledProp(name="g3") public void setF3(int v) { f3 = v; }
private int f4 = 4;
- @Beanp(name="g4") @Xml(prefix="baz",namespace="http://baz") public int getF4() { return f4; }
- @Beanp(name="g4") public void setF4(int v) { f4 = v; }
+ @MarshalledProp(name="g4") @Xml(prefix="baz",namespace="http://baz") public int getF4() { return f4; }
+ @MarshalledProp(name="g4") public void setF4(int v) { f4 = v; }
public boolean equals(T7 x) {
return x.f1 == f1 && x.f2 == f2 && x.f3 == f3 && x.f4 == f4;
diff --git a/scripts/check-fluent-setter-overrides.py b/scripts/check-fluent-setter-overrides.py
index 27324b939a..96b86ca0d4 100755
--- a/scripts/check-fluent-setter-overrides.py
+++ b/scripts/check-fluent-setter-overrides.py
@@ -168,11 +168,11 @@ def extract_class_info(file_path): # NOSONAR python:S3776 -- Cognitive complexi
method_name = method_match.group(1)
params = method_match.group(2).strip()
- # Check if method has @Beanp annotation
+ # Check if method has @MarshalledProp annotation
# Look backwards from the method declaration to check for annotations
method_start_pos = method_match.start()
preceding_text = class_body[max(0, method_start_pos - 200):method_start_pos]
- has_beanp = '@Beanp' in preceding_text
+ has_beanp = '@MarshalledProp' in preceding_text
# Check if this method returns 'this'
# Look ahead to see if there's a 'return this;' in the method body
@@ -275,7 +275,7 @@ def check_missing_overrides(classes, class_map): # NOSONAR python:S3776 -- Cogn
normalized_params = normalize_params(params)
signature = f"{method_name}({normalized_params})"
- # Skip methods marked with @Beanp in the parent
+ # Skip methods marked with @MarshalledProp in the parent
# These are automatically handled by annotation inheritance (since 9.2.0)
# and are less critical for type safety
if setter.get('has_beanp'):
(juneau) 05/05: refactor(inject): introduce commons.inject.@Bean as successor to @RestInject; delete @RestInject
Posted by ja...@apache.org.
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 75aa50426d0daf234d760acd38cd5e13fec77995
Author: James Bognar <ja...@jamesbog-ltmjqf2.internal.salesforce.com>
AuthorDate: Mon May 11 17:50:37 2026 -0400
refactor(inject): introduce commons.inject.@Bean as successor to @RestInject; delete @RestInject
- Created org.apache.juneau.commons.inject.Bean annotation (successor to RestInject)
- Created org.apache.juneau.commons.inject.BeanAnnotation annotation processor
- Migrated all @RestInject callsites across rest-server, rest-springboot, and tests to @Bean
- Renamed RestContext.isRestInjectMethod() to isBeanMethod() for consistency
- Deleted RestInject.java and RestInjectAnnotation.java (clean break, no deprecated alias)
Co-authored-by: Cursor <cu...@cursor.com>
---
.../org/apache/juneau/commons/inject/Bean.java | 190 ++++++++++++++++
.../juneau/commons/inject/BeanAnnotation.java | 44 ++--
.../apache/juneau/commons/inject/BeanStore.java | 4 +-
.../juneau/rest/springboot/SpringRestServlet.java | 3 +-
.../java/org/apache/juneau/rest/RestContext.java | 174 +++++++-------
.../java/org/apache/juneau/rest/RestOpContext.java | 36 +--
.../org/apache/juneau/rest/annotation/Rest.java | 6 +-
.../apache/juneau/rest/annotation/RestDelete.java | 2 +-
.../org/apache/juneau/rest/annotation/RestGet.java | 4 +-
.../apache/juneau/rest/annotation/RestInit.java | 8 +-
.../apache/juneau/rest/annotation/RestInject.java | 249 ---------------------
.../org/apache/juneau/rest/annotation/RestOp.java | 6 +-
.../apache/juneau/rest/annotation/RestOptions.java | 4 +-
.../apache/juneau/rest/annotation/RestPatch.java | 6 +-
.../apache/juneau/rest/annotation/RestPost.java | 6 +-
.../org/apache/juneau/rest/annotation/RestPut.java | 6 +-
.../juneau/rest/RestContext_Builder_Test.java | 16 +-
.../juneau/rest/RestContext_Precedence_Test.java | 76 +++----
.../juneau/rest/annotation/RestInit_Test.java | 5 +-
.../juneau/rest/annotation/Rest_Messages_Test.java | 3 +-
20 files changed, 396 insertions(+), 452 deletions(-)
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/Bean.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/Bean.java
new file mode 100644
index 0000000000..7c369eec9b
--- /dev/null
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/Bean.java
@@ -0,0 +1,190 @@
+/*
+ * 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.commons.inject;
+
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.lang.annotation.*;
+
+/**
+ * Bean injection annotation.
+ *
+ * <p>
+ * Used on methods and fields of {@link BeanStore}-managed objects to denote methods and fields that override and
+ * customize beans used by the framework.
+ *
+ * <h5 class='figure'>Example</h5>
+ * <p class='bcode'>
+ * <jc>// Rest resource that uses a customized call logger.</jc>
+ * <ja>@Rest</ja>
+ * <jk>public class</jk> MyRest <jk>extends</jk> BasicRestServlet {
+ *
+ * <jc>// Option #1: As a field.</jc>
+ * <ja>@Bean</ja>
+ * CallLogger <jf>myCallLogger</jf> = CallLogger.<jsm>create</jsm>().logger(<js>"mylogger"</js>).build();
+ *
+ * <jc>// Option #2: As a method.</jc>
+ * <ja>@Bean</ja>
+ * <jk>public</jk> CallLogger myCallLogger() {
+ * <jk>return</jk> CallLogger.<jsm>create</jsm>().logger(<js>"mylogger"</js>).build();
+ * }
+ * }
+ * </p>
+ *
+ * <p>
+ * The {@link Bean#name()}/{@link Bean#value()} attributes are used to differentiate between named beans.
+ * </p>
+ * <h5 class='figure'>Example</h5>
+ * <p class='bcode'>
+ * <jc>// Customized default request headers.</jc>
+ * <ja>@Bean</ja>(<js>"defaultRequestHeaders"</js>)
+ * HeaderList <jf>defaultRequestHeaders</jf> = HeaderList.<jsm>create</jsm>().set(ContentType.<jsf>TEXT_PLAIN</jsf>).build();
+ *
+ * <jc>// Customized default response headers.</jc>
+ * <ja>@Bean</ja>(<js>"defaultResponseHeaders"</js>)
+ * HeaderList <jf>defaultResponseHeaders</jf> = HeaderList.<jsm>create</jsm>().set(ContentType.<jsf>TEXT_PLAIN</jsf>).build();
+ * </p>
+ *
+ * <p>
+ * The {@link Bean#methodScope()} attribute is used to define beans in the scope of specific {@code @RestOp}-annotated methods.
+ * </p>
+ * <h5 class='figure'>Example</h5>
+ * <p class='bcode'>
+ * <jc>// Set a default header on a specific REST method.</jc>
+ * <jc>// Input parameter is the default header list builder with all annotations applied.</jc>
+ * <ja>@Bean</ja>(name=<js>"defaultRequestHeaders"</js>, methodScope=<js>"myRestMethod"</js>)
+ * <jk>public</jk> HeaderList.Builder myRequestHeaders(HeaderList.Builder <jv>builder</jv>) {
+ * <jk>return</jk> <jv>builder</jv>.set(ContentType.<jsf>TEXT_PLAIN</jsf>);
+ * }
+ *
+ * <jc>// Method that picks up default header defined above.</jc>
+ * <ja>@RestGet</ja>
+ * <jk>public</jk> Object myRestMethod(ContentType <jv>contentType</jv>) { ... }
+ * </p>
+ *
+ * <p>
+ * This annotation can also be used to inject arbitrary beans into the bean store which allows them to be
+ * passed as resolved parameters on {@code @RestOp}-annotated methods.
+ * </p>
+ * <h5 class='figure'>Example</h5>
+ * <p class='bcode'>
+ * <jc>// Custom beans injected into the bean store.</jc>
+ * <ja>@Bean</ja> MyBean <jv>myBean1</jv> = <jk>new</jk> MyBean();
+ * <ja>@Bean</ja>(<js>"myBean2"</js>) MyBean <jv>myBean2</jv> = <jk>new</jk> MyBean();
+ *
+ * <jc>// Method that uses injected beans.</jc>
+ * <ja>@RestGet</ja>
+ * <jk>public</jk> Object doGet(MyBean <jv>myBean1</jv>, <ja>@Name</ja>(<js>"myBean2"</js>) MyBean <jv>myBean2</jv>) { ... }
+ * </p>
+ *
+ * <p>
+ * This annotation can also be used on uninitialized fields. When fields are uninitialized, they will
+ * be set during initialization based on beans found in the bean store.
+ * </p>
+ * <h5 class='figure'>Example</h5>
+ * <p class='bcode'>
+ * <jc>// Fields that get set during initialization based on beans found in the bean store.</jc>
+ * <ja>@Bean</ja> CallLogger <jf>callLogger</jf>;
+ * <ja>@Bean</ja> BeanStore <jf>beanStore</jf>; <jc>// Note that the BeanStore itself can be accessed this way.</jc>
+ * </p>
+ *
+ * <h5 class='section'>Notes:</h5><ul>
+ * <li class='note'>Methods and fields can be static or non-static.
+ * <li class='note'>Any injectable beans (including spring beans) can be passed as arguments into methods.
+ * <li class='note'>Bean names are required when multiple beans of the same type exist in the bean store.
+ * <li class='note'>By default, the injected bean scope is class-level (applies to the entire class). The
+ * {@link Bean#methodScope()} annotation can be used to apply to method-level only (when applicable).
+ * </ul>
+ *
+ * <h5 class='section'>Precedence (since 9.5.0):</h5>
+ * <p>
+ * {@code @Bean} acts as a <i>programmable default</i>, analogous to Spring's
+ * <c>@ConditionalOnMissingBean</c>. When a REST context resolves a framework-managed bean
+ * (<c>CallLogger</c>, <c>EncoderSet</c>, <c>SerializerSet</c>, <c>ParserSet</c>, <c>ThrownStore</c>,
+ * <c>Config</c>, <c>VarResolver</c>, <c>HttpPartSerializer</c>, <c>HttpPartParser</c>, etc.), the lookup
+ * walks the following tiers in order, returning the first hit:
+ * </p>
+ * <ol>
+ * <li><b>Overriding-parent bean store</b> — Spring beans (in <c>juneau-rest-server-springboot</c> deployments,
+ * via <c>SpringBeanStore</c>), or any bean reachable through the configured overriding-parent
+ * bean-store chain.</li>
+ * <li><b>{@code @Bean} method/field on the resource class</b> — registered as a regular bean-store
+ * entry, beating the framework default.</li>
+ * <li><b>Memoizer-backed framework default</b> — built into the context as a default supplier.</li>
+ * </ol>
+ * <p>
+ * In other words: a Spring <c>@Bean</c> of type <c>CallLogger</c> wins over a {@code @Bean CallLogger}
+ * method on the same servlet, which in turn wins over the framework's built-in <c>BasicCallLogger</c>. Non-Spring
+ * deployments have an empty overriding-parent layer, so the chain naturally collapses to
+ * {@code @Bean > default}.
+ * </p>
+ * <p>
+ * Prior to 9.5 the order was {@code @Bean > Spring > default}. See the 9.5.0 release notes for migration
+ * guidance if you need to keep that legacy behavior (typically by removing the Spring <c>@Bean</c> or marking the
+ * {@code @Bean} method's type with a Spring-native override such as <c>@Primary</c>).
+ * </p>
+ *
+ * <h5 class='section'>See Also:</h5><ul>
+ * <li class='jc'>{@link BeanStore}
+ * <li class='jc'>{@link WritableBeanStore}
+ * </ul>
+ */
+@Target({ METHOD, FIELD })
+@Retention(RUNTIME)
+@Inherited
+public @interface Bean {
+
+ /**
+ * Optional description for the exposed API.
+ *
+ * @return The annotation value.
+ * @since 9.2.0
+ */
+ String[] description() default {};
+
+ /**
+ * The short names of the methods that this annotation applies to.
+ *
+ * <p>
+ * Can use <js>"*"</js> to apply to all methods.
+ *
+ * <p>
+ * Ignored for class-level scope.
+ *
+ * @return The short names of the methods that this annotation applies to, or empty if class-scope.
+ */
+ String[] methodScope() default {};
+
+ /**
+ * The bean name to use to distinguish beans of the same type for different purposes.
+ *
+ * <p>
+ * For example, there are two {@link org.apache.juneau.http.header.HeaderList} beans: <js>"defaultRequestHeaders"</js> and <js>"defaultResponseHeaders"</js>. This annotation
+ * would be used to differentiate between them.
+ *
+ * @return The bean name to use to distinguish beans of the same type for different purposes, or blank if bean type is unique.
+ */
+ String name() default "";
+
+ /**
+ * Same as {@link #name()}.
+ *
+ * @return The bean name to use to distinguish beans of the same type for different purposes, or blank if bean type is unique.
+ */
+ String value() default "";
+}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInjectAnnotation.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanAnnotation.java
similarity index 80%
rename from juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInjectAnnotation.java
rename to juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanAnnotation.java
index 91100cc976..dc3e1b00e3 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInjectAnnotation.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanAnnotation.java
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.juneau.rest.annotation;
+package org.apache.juneau.commons.inject;
import static java.lang.annotation.ElementType.*;
import static java.lang.annotation.RetentionPolicy.*;
@@ -25,20 +25,20 @@ import java.lang.annotation.*;
import org.apache.juneau.commons.annotation.*;
/**
- * Utility classes and methods for the {@link RestInject RestInject} annotation.
+ * Utility classes and methods for the {@link Bean @Bean} annotation.
*
*/
-public class RestInjectAnnotation {
+public class BeanAnnotation {
/**
* Private constructor to prevent instantiation.
*/
- private RestInjectAnnotation() {
+ private BeanAnnotation() {
// Utility class - prevent instantiation
}
/**
- * A collection of {@link RestInject @RestInject annotations}.
+ * A collection of {@link Bean @Bean} annotations.
*/
@Documented
@Target({ FIELD, METHOD, TYPE })
@@ -51,7 +51,7 @@ public class RestInjectAnnotation {
*
* @return The annotation value.
*/
- RestInject[] value();
+ Bean[] value();
}
/**
@@ -72,15 +72,15 @@ public class RestInjectAnnotation {
* Constructor.
*/
protected Builder() {
- super(RestInject.class);
+ super(Bean.class);
}
/**
- * Instantiates a new {@link RestInject @RestInject} object initialized with this builder.
+ * Instantiates a new {@link Bean @Bean} object initialized with this builder.
*
- * @return A new {@link RestInject @RestInject} object.
+ * @return A new {@link Bean @Bean} object.
*/
- public RestInject build() {
+ public Bean build() {
return new Object(this);
}
@@ -96,7 +96,7 @@ public class RestInjectAnnotation {
}
/**
- * Sets the {@link RestInject#methodScope()} property on this annotation.
+ * Sets the {@link Bean#methodScope()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -107,7 +107,7 @@ public class RestInjectAnnotation {
}
/**
- * Sets the {@link RestInject#name()} property on this annotation.
+ * Sets the {@link Bean#name()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -118,7 +118,7 @@ public class RestInjectAnnotation {
}
/**
- * Sets the {@link RestInject#value()} property on this annotation.
+ * Sets the {@link Bean#value()} property on this annotation.
*
* @param value The new value for this property.
* @return This object.
@@ -151,14 +151,14 @@ public class RestInjectAnnotation {
@SuppressWarnings({
"java:S2160" // equals() inherited from AnnotationObject compares all annotation interface methods; subclass fields are accessed via those methods
})
- private static class Object extends AppliedAnnotationObject implements RestInject {
+ private static class Object extends AppliedAnnotationObject implements Bean {
private final String[] description;
private final String name;
private final String value;
private final String[] methodScope;
- Object(RestInjectAnnotation.Builder b) {
+ Object(BeanAnnotation.Builder b) {
super(b);
description = copyOf(b.description);
name = b.name;
@@ -166,17 +166,17 @@ public class RestInjectAnnotation {
methodScope = b.methodScope;
}
- @Override /* Overridden from RestInject */
+ @Override /* Overridden from Bean */
public String[] methodScope() {
return methodScope;
}
- @Override /* Overridden from RestInject */
+ @Override /* Overridden from Bean */
public String name() {
return name;
}
- @Override /* Overridden from RestInject */
+ @Override /* Overridden from Bean */
public String value() {
return value;
}
@@ -188,7 +188,7 @@ public class RestInjectAnnotation {
}
/** Default value */
- public static final RestInject DEFAULT = create().build();
+ public static final Bean DEFAULT = create().build();
/**
* Instantiates a new builder for this class.
@@ -200,16 +200,16 @@ public class RestInjectAnnotation {
}
/**
- * Pulls the name/value attribute from a {@link RestInject} annotation.
+ * Pulls the name/value attribute from a {@link Bean} annotation.
*
* @param a The annotation to check. Can be <jk>null</jk>.
* @return The annotation value, or an empty string if the annotation is <jk>null</jk>.
*/
- public static String name(RestInject a) {
+ public static String name(Bean a) {
if (a == null)
return "";
if (! a.name().isEmpty())
return a.name();
return a.value();
}
-}
\ No newline at end of file
+}
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanStore.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanStore.java
index a949331742..3c673c9996 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanStore.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/inject/BeanStore.java
@@ -198,12 +198,12 @@ public interface BeanStore {
* <p class='bjava'>
* <jc>// Filter only</jc>
* <jv>beanStore</jv>.createBeanFromMethod(CallLogger.<jk>class</jk>, <jv>resource</jv>,
- * RestContext::isRestInjectMethod)
+ * RestContext::isBeanMethod)
* .ifPresent(<jv>creator</jv>::impl);
*
* <jc>// Filter + extra bean not yet in the store</jc>
* <jv>beanStore</jv>.createBeanFromMethod(EncoderSet.<jk>class</jk>, <jv>resource</jv>,
- * RestContext::isRestInjectMethod, <jv>builder</jv>)
+ * RestContext::isBeanMethod, <jv>builder</jv>)
* .ifPresent(<jv>x</jv> -> <jv>builder</jv>.impl(<jv>x</jv>));
*
* <jc>// No filter, no extra beans</jc>
diff --git a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/SpringRestServlet.java b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/SpringRestServlet.java
index 76253efd58..dc9a87c06b 100644
--- a/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/SpringRestServlet.java
+++ b/juneau-rest/juneau-rest-server-springboot/src/main/java/org/apache/juneau/rest/springboot/SpringRestServlet.java
@@ -19,7 +19,6 @@ package org.apache.juneau.rest.springboot;
import java.util.*;
import org.apache.juneau.commons.inject.*;
-import org.apache.juneau.rest.annotation.*;
import org.apache.juneau.rest.servlet.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.context.*;
@@ -53,7 +52,7 @@ public abstract class SpringRestServlet extends RestServlet {
* @param parent Optional parent resource bean store, used as a fallback after Spring's context.
* @return A {@link WritableBeanStore} backed by Spring's {@link ApplicationContext}.
*/
- @RestInject
+ @Bean
public WritableBeanStore createBeanStore(Optional<BeanStore> parent) {
return new SpringBeanStore(appContext.orElse(null), parent.orElse(null));
}
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index 4dce883763..4e0a36e0d2 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -18,6 +18,8 @@ package org.apache.juneau.rest;
import org.apache.juneau.commons.http.MediaType;
import org.apache.juneau.commons.inject.BasicBeanStore;
+import org.apache.juneau.commons.inject.Bean;
+import org.apache.juneau.commons.inject.BeanAnnotation;
import org.apache.juneau.commons.inject.BeanInstantiator;
import org.apache.juneau.commons.inject.BeanStore;
import org.apache.juneau.commons.inject.WritableBeanStore;
@@ -99,7 +101,7 @@ import jakarta.servlet.http.*;
*
* <p>
* Configuration is supplied declaratively through the {@link Rest @Rest} annotation on the resource class
- * (and inherited from any parent classes), and programmatically through {@link RestInject @RestInject}-annotated
+ * (and inherited from any parent classes), and programmatically through {@link org.apache.juneau.commons.inject.Bean @Bean}-annotated
* methods/fields that contribute named beans (e.g. <c>encoders</c>, <c>parsers</c>, <c>callLogger</c>) to the REST
* resource's bean store. Where direct construction is needed (test rigs, mock clients, embedded usage),
* the public constructor takes a {@link RestContext.Args} record carrying the bootstrap state.
@@ -110,7 +112,7 @@ import jakarta.servlet.http.*;
* <jk>public class</jk> MyResource {
*
* <jc>// Programmatically contribute a bean to the resource's bean store.</jc>
- * <ja>@RestInject</ja>
+ * <ja>@Bean</ja>
* <jk>public</jk> CallLogger callLogger() {
* <jk>return new</jk> MyCustomCallLogger();
* }
@@ -235,7 +237,7 @@ public class RestContext extends Context {
* Package-private constructor.
*
* <p>
- * Minimized in the May 2026 refactor — the beanStore setup, {@code @RestInject} processing,
+ * Minimized in the May 2026 refactor — the beanStore setup, {@code @Bean} processing,
* {@code @RestInit} hooks, and {@code beanStoreConfigurer} call were all moved into
* {@link RestContext#RestContext(Builder)}. The Builder now only stores the three fields
* that are final and needed by the {@link ServletConfig} overrides and factory methods.
@@ -302,12 +304,12 @@ public class RestContext extends Context {
.map(y -> y.accessible().inner());
}
- private static boolean isRestInjectMethod(MethodInfo mi) {
- return isRestInjectMethod(mi, null);
+ private static boolean isBeanMethod(MethodInfo mi) {
+ return isBeanMethod(mi, null);
}
- private static boolean isRestInjectMethod(MethodInfo mi, String name) {
- return mi.getAnnotations(RestInject.class)
+ private static boolean isBeanMethod(MethodInfo mi, String name) {
+ return mi.getAnnotations(Bean.class)
.map(AnnotationInfo::inner)
.anyMatch(x -> nn(x) && x.methodScope().length == 0 && (n(name) || eq(x.name(), name)));
}
@@ -345,7 +347,7 @@ public class RestContext extends Context {
* <p>
* Resolution:
* <ol>
- * <li>If the resource declares an {@code @RestInject} factory method returning a
+ * <li>If the resource declares an {@code @Bean} factory method returning a
* {@link WritableBeanStore} (e.g. {@code SpringRestServlet.createBeanStore(Optional<BeanStore>)}),
* that store is used directly. Spring integration relies on this hook.
* <li>Otherwise a fresh {@link BasicBeanStore} is created with {@code parentBs} as its
@@ -360,7 +362,7 @@ public class RestContext extends Context {
*/
private WritableBeanStore createBeanStore(BeanStore parentBs, Supplier<?> resource) {
var defaultBs = new BasicBeanStore(parentBs);
- return defaultBs.createBeanFromMethod(WritableBeanStore.class, resource.get(), RestContext::isRestInjectMethod)
+ return defaultBs.createBeanFromMethod(WritableBeanStore.class, resource.get(), RestContext::isBeanMethod)
.orElse(defaultBs);
}
private RestContext parentContext() { return parentContext; }
@@ -372,10 +374,10 @@ public class RestContext extends Context {
*
* <p>
* Default suppliers sit at the bottom of the bean-store resolution order: they fire only when no
- * {@link RestInject} method, no programmatic {@code addBean(...)} call, and no Spring/overriding-parent
+ * {@link org.apache.juneau.commons.inject.Bean @Bean} method, no programmatic {@code addBean(...)} call, and no Spring/overriding-parent
* binding has been registered for the type. This is the mechanism that replaces the old
* {@code DELAYED_INJECTION} list — by registering the framework's own factories as defaults
- * <i>before</i> the {@link RestInject} method walk runs, any {@link RestInject} method whose parameters
+ * <i>before</i> the {@link org.apache.juneau.commons.inject.Bean @Bean} method walk runs, any {@link org.apache.juneau.commons.inject.Bean @Bean} method whose parameters
* include framework types can now resolve those parameters lazily through the bean store without
* requiring a hand-maintained skip list.
*/
@@ -472,7 +474,7 @@ public class RestContext extends Context {
cb.name(cf);
v.set(cb.build());
}
- bs.createBeanFromMethod(Config.class, resource().get(), RestContext::isRestInjectMethod, v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(Config.class, resource().get(), RestContext::isBeanMethod, v.get()).ifPresent(v::set);
return v.get();
});
@@ -501,7 +503,7 @@ public class RestContext extends Context {
.bean(FileFinder.class, FileFinder.create(bs).cp(resourceClass(), null, true).build())
.build()
);
- bs.createBeanFromMethod(VarResolver.class, resource().get(), x -> isRestInjectMethod(x, PROP_bootstrapVarResolver)).ifPresent(v::set);
+ bs.createBeanFromMethod(VarResolver.class, resource().get(), x -> isBeanMethod(x, PROP_bootstrapVarResolver)).ifPresent(v::set);
return v.get();
});
// @formatter:on
@@ -511,7 +513,7 @@ public class RestContext extends Context {
*
* <p>
* Defaults to {@link BasicCallLogger}. {@code @Rest(callLogger=X)} most-derived non-{@code Void} class wins.
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<CallLogger> callLogger = memoizer(() -> {
var bs = beanStore();
@@ -529,7 +531,7 @@ public class RestContext extends Context {
.filter(c -> c != CallLogger.Void.class)
.reduce((first, second) -> second)
.ifPresent(creator::type);
- bs.createBeanFromMethod(CallLogger.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(creator::impl);
+ bs.createBeanFromMethod(CallLogger.class, resource().get(), RestContext::isBeanMethod).ifPresent(creator::impl);
return creator.asOptional().orElse(null);
});
@@ -570,7 +572,7 @@ public class RestContext extends Context {
* Resolved from {@code @Rest(debugDefault)} (most-derived non-blank wins), falling back to
* {@code @Rest(debug=true|false)}. The resolved {@link Enablement} is published into the bean store
* so that {@link BasicDebugEnablement} subclasses can pick it up. Defaults to {@link BasicDebugEnablement}.
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<DebugEnablement> debugEnablement = memoizer(() -> {
// @Rest(debugDefault="ALWAYS|NEVER|CONDITIONAL") — most-derived non-blank value wins, with parent inheritance
@@ -596,7 +598,7 @@ public class RestContext extends Context {
.filter(c -> c != DebugEnablement.Void.class)
.reduce((first, second) -> second)
.ifPresent(creator::type);
- bs.createBeanFromMethod(DebugEnablement.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(creator::impl);
+ bs.createBeanFromMethod(DebugEnablement.class, resource().get(), RestContext::isBeanMethod).ifPresent(creator::impl);
return creator.asOptional().orElse(null);
});
@@ -605,7 +607,7 @@ public class RestContext extends Context {
*
* <p>
* Walks {@code @Rest} annotations parent-to-child, resolving each attribute string and parsing it as a
- * key=value or key:value pair. A named bean-store override or {@code @RestInject} factory method REPLACES
+ * key=value or key:value pair. A named bean-store override or {@code @Bean} factory method REPLACES
* the accumulated result.
*/
private final Memoizer<NamedAttributeMap> defaultRequestAttributes = memoizer(() -> {
@@ -616,7 +618,7 @@ public class RestContext extends Context {
.filter(StringUtils::isNotBlank)
.map(BasicNamedAttribute::ofPair)
.forEach(v.get()::add));
- beanStore().createBeanFromMethod(NamedAttributeMap.class, resource().get(), x -> isRestInjectMethod(x, PROP_defaultRequestAttributes), v.get()).ifPresent(v::set);
+ beanStore().createBeanFromMethod(NamedAttributeMap.class, resource().get(), x -> isBeanMethod(x, PROP_defaultRequestAttributes), v.get()).ifPresent(v::set);
return v.get();
});
@@ -626,7 +628,7 @@ public class RestContext extends Context {
*
* <p>
* Walks {@code @Rest} annotations parent-to-child, resolving each header string. A named bean-store
- * override or {@code @RestInject} factory method REPLACES the accumulated result.
+ * override or {@code @Bean} factory method REPLACES the accumulated result.
*/
private final Memoizer<HeaderList> defaultRequestHeaders = memoizer(() -> {
var v = Value.of(HeaderList.create());
@@ -640,7 +642,7 @@ public class RestContext extends Context {
if (isNotBlank(defaultContentType))
v.get().setDefault(contentType(defaultContentType));
});
- beanStore().createBeanFromMethod(HeaderList.class, resource().get(), x -> isRestInjectMethod(x, PROP_defaultRequestHeaders), v.get()).ifPresent(v::set);
+ beanStore().createBeanFromMethod(HeaderList.class, resource().get(), x -> isBeanMethod(x, PROP_defaultRequestHeaders), v.get()).ifPresent(v::set);
return v.get();
});
@@ -649,12 +651,12 @@ public class RestContext extends Context {
*
* <p>
* Walks {@code @Rest} annotations parent-to-child, resolving each header string. A named bean-store
- * override or {@code @RestInject} factory method REPLACES the accumulated result.
+ * override or {@code @Bean} factory method REPLACES the accumulated result.
*/
private final Memoizer<HeaderList> defaultResponseHeaders = memoizer(() -> {
var v = Value.of(HeaderList.create());
getRestAnnotationsTopDown().forEach(ai -> Arrays.stream(ai.inner().defaultResponseHeaders()).filter(StringUtils::isNotBlank).map(this::resolve).filter(StringUtils::isNotBlank).map(s -> stringHeader(s)).forEach(v.get()::setDefault));
- beanStore().createBeanFromMethod(HeaderList.class, resource().get(), x -> isRestInjectMethod(x, PROP_defaultResponseHeaders), v.get()).ifPresent(v::set);
+ beanStore().createBeanFromMethod(HeaderList.class, resource().get(), x -> isBeanMethod(x, PROP_defaultResponseHeaders), v.get()).ifPresent(v::set);
return v.get();
});
@@ -664,25 +666,25 @@ public class RestContext extends Context {
private final Memoizer<LifecycleInvokerPair> destroyInvokerPair = memoizer(() -> buildLifecycleInvokerPair(() -> {
var bs = beanStore();
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestDestroy.class).toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "destroyMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "destroyMethods"), v.get()).ifPresent(v::set);
return v.get();
}));
/**
* Fully-configured {@link EncoderSet.Builder} for this resource, populated from the
- * {@code @Rest(encoders)} annotation chain and any {@code @RestInject} override.
+ * {@code @Rest(encoders)} annotation chain and any {@code @Bean} override.
*
* <p>
* Starts with {@link IdentityEncoder} as the implicit default. A bean-store type override
* or bean-store instance override REPLACES the builder or its impl. Annotation entries
- * (parent-to-child) are appended after the default. A {@code @RestInject} factory method
+ * (parent-to-child) are appended after the default. A {@code @Bean} factory method
* REPLACES the impl with the returned value.
*/
private final Memoizer<EncoderSet.Builder> encodersBuilder = memoizer(() -> {
var bs = beanStore();
var v = Value.of(EncoderSet.create(bs));
getRestAnnotationsForProperty(PROPERTY_encoders).forEach(ai -> v.get().add(ai.inner().encoders()));
- bs.createBeanFromMethod(EncoderSet.class, resource().get(), RestContext::isRestInjectMethod, v.get()).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(EncoderSet.class, resource().get(), RestContext::isBeanMethod, v.get()).ifPresent(x -> v.get().impl(x));
return v.get();
});
@@ -697,7 +699,7 @@ public class RestContext extends Context {
private final Memoizer<LifecycleInvokerPair> endCallInvokerPair = memoizer(() -> buildLifecycleInvokerPair(() -> {
var bs = beanStore();
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestEndCall.class).toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "endCallMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "endCallMethods"), v.get()).ifPresent(v::set);
return v.get();
}));
@@ -707,7 +709,7 @@ public class RestContext extends Context {
private final Memoizer<JsonSchemaGenerator.Builder> jsonSchemaGeneratorBuilder = memoizer(() -> {
var bs = beanStore();
var v = Value.of(JsonSchemaGenerator.create());
- bs.createBeanFromMethod(JsonSchemaGenerator.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(JsonSchemaGenerator.class, resource().get(), RestContext::isBeanMethod).ifPresent(x -> v.get().impl(x));
v.get().apply(annotationWork);
return v.get();
});
@@ -722,11 +724,11 @@ public class RestContext extends Context {
*
* <p>
* Defaults to {@code Logger.getLogger(resourceClass.getName())}. A bean-store override or
- * {@code @RestInject} factory method REPLACES the default.
+ * {@code @Bean} factory method REPLACES the default.
*/
private final Memoizer<Logger> logger = memoizer(() -> {
var v = Value.of(Logger.getLogger(cn(resourceClass())));
- beanStore().createBeanFromMethod(Logger.class, resource().get(), RestContext::isRestInjectMethod, v.get()).ifPresent(v::set);
+ beanStore().createBeanFromMethod(Logger.class, resource().get(), RestContext::isBeanMethod, v.get()).ifPresent(v::set);
return v.get();
});
@@ -736,7 +738,7 @@ public class RestContext extends Context {
* <p>
* Walks {@code @Rest} annotations parent-to-child, resolving each {@code messages} location string
* against the bootstrap resolver (full resolver not yet available — it depends on {@code getMessages()}).
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<Messages> messages = memoizer(() -> {
var b = Messages.create(resourceClass());
@@ -745,7 +747,7 @@ public class RestContext extends Context {
// (it depends on getMessages()).
var vrs = getBootstrapVarResolver().createSession();
getRestAnnotationsTopDown().forEach(ai -> ai.getString(PROPERTY_messages).filter(StringUtils::isNotBlank).ifPresent(s -> b.location(vrs.resolve(s))));
- var override = beanStore().createBeanFromMethod(Messages.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ var override = beanStore().createBeanFromMethod(Messages.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return nn(override) ? override : b.build();
});
@@ -753,28 +755,28 @@ public class RestContext extends Context {
* The {@link MethodExecStore} for this resource, wired to the {@link ThrownStore}.
*
* <p>
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<MethodExecStore> methodExecStore = memoizer(() -> {
var bs = beanStore();
var b = MethodExecStore.create(bs).thrownStoreOnce(getThrownStore());
- bs.createBeanFromMethod(MethodExecStore.class, resource().get(), RestContext::isRestInjectMethod, b).ifPresent(b::impl);
+ bs.createBeanFromMethod(MethodExecStore.class, resource().get(), RestContext::isBeanMethod, b).ifPresent(b::impl);
return b.build();
});
/**
* Fully-configured {@link ParserSet.Builder} for this resource, populated from the
- * {@code @Rest(parsers)} annotation chain and any {@code @RestInject} override.
+ * {@code @Rest(parsers)} annotation chain and any {@code @Bean} override.
*
* <p>
* Starts with an empty set. A bean-store type or instance override REPLACES the builder or its impl.
- * Annotation entries (parent-to-child) are appended. A {@code @RestInject} factory method REPLACES the impl.
+ * Annotation entries (parent-to-child) are appended. A {@code @Bean} factory method REPLACES the impl.
*/
private final Memoizer<ParserSet.Builder> parsersBuilder = memoizer(() -> {
var bs = beanStore();
var v = Value.of(ParserSet.create(bs));
getRestAnnotationsForProperty(PROPERTY_parsers).forEach(ai -> v.get().add(ai.inner().parsers()));
- bs.createBeanFromMethod(ParserSet.class, resource().get(), RestContext::isRestInjectMethod, v.get()).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(ParserSet.class, resource().get(), RestContext::isBeanMethod, v.get()).ifPresent(x -> v.get().impl(x));
return v.get();
});
@@ -790,7 +792,7 @@ public class RestContext extends Context {
var bs = beanStore();
Value<HttpPartParser.Creator> v = Value.of(HttpPartParser.creator().type(OpenApiParser.class));
opt(resource().get() instanceof HttpPartParser x ? x : null).ifPresent(x -> v.get().impl(x));
- bs.createBeanFromMethod(HttpPartParser.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(HttpPartParser.class, resource().get(), RestContext::isBeanMethod).ifPresent(x -> v.get().impl(x));
v.get().apply(annotationWork);
return v.get();
});
@@ -819,7 +821,7 @@ public class RestContext extends Context {
var bs = beanStore();
Value<HttpPartSerializer.Creator> v = Value.of(HttpPartSerializer.creator().type(OpenApiSerializer.class));
opt(resource().get() instanceof HttpPartSerializer x ? x : null).ifPresent(x -> v.get().impl(x));
- bs.createBeanFromMethod(HttpPartSerializer.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(HttpPartSerializer.class, resource().get(), RestContext::isBeanMethod).ifPresent(x -> v.get().impl(x));
v.get().apply(annotationWork);
return v.get();
});
@@ -847,7 +849,7 @@ public class RestContext extends Context {
private final Memoizer<MethodList> postCallMethods = memoizer(() -> {
var bs = beanStore();
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestPostCall.class).toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "postCallMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "postCallMethods"), v.get()).ifPresent(v::set);
return v.get();
});
@@ -859,7 +861,7 @@ public class RestContext extends Context {
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestPostInit.class)
.filter(m -> rstream(AnnotationProvider.INSTANCE.find(RestPostInit.class, MethodInfo.of(m))).map(AnnotationInfo::inner).anyMatch(RestPostInit::childFirst))
.toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "postInitChildFirstMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "postInitChildFirstMethods"), v.get()).ifPresent(v::set);
return v.get();
}));
@@ -871,7 +873,7 @@ public class RestContext extends Context {
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestPostInit.class)
.filter(m -> rstream(AnnotationProvider.INSTANCE.find(RestPostInit.class, MethodInfo.of(m))).map(AnnotationInfo::inner).anyMatch(x -> !x.childFirst()))
.toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "postInitMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "postInitMethods"), v.get()).ifPresent(v::set);
return v.get();
}));
@@ -881,7 +883,7 @@ public class RestContext extends Context {
private final Memoizer<MethodList> preCallMethods = memoizer(() -> {
var bs = beanStore();
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestPreCall.class).toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "preCallMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "preCallMethods"), v.get()).ifPresent(v::set);
return v.get();
});
@@ -911,7 +913,7 @@ public class RestContext extends Context {
*
* <p>
* Walks {@code @Rest(responseProcessors)} annotations parent-to-child (append order). A bean-store
- * override or {@code @RestInject} factory method REPLACES the entire list.
+ * override or {@code @Bean} factory method REPLACES the entire list.
*/
private final Memoizer<ResponseProcessor[]> responseProcessors = memoizer(() -> {
// Walk @Rest(responseProcessors=...) chain (parent-to-child via getRestAnnotationsForProperty).
@@ -921,8 +923,8 @@ public class RestContext extends Context {
var b = ResponseProcessorList.create(bs);
getRestAnnotationsForProperty(PROPERTY_responseProcessors)
.forEach(ai -> b.add(ai.inner().responseProcessors()));
- // @RestInject method override REPLACES the entire annotation-derived list.
- var override = bs.createBeanFromMethod(ResponseProcessorList.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ // @Bean method override REPLACES the entire annotation-derived list.
+ var override = bs.createBeanFromMethod(ResponseProcessorList.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return (nn(override) ? override : b.build()).toArray();
});
@@ -931,7 +933,7 @@ public class RestContext extends Context {
*
* <p>
* Walks {@code @Rest(restOpArgs)} annotations parent-to-child (prepend order, so child entries
- * take priority). A bean-store override or {@code @RestInject} factory method REPLACES the entire list.
+ * take priority). A bean-store override or {@code @Bean} factory method REPLACES the entire list.
*/
private final Memoizer<Class<? extends RestOpArg>[]> restOpArgs = memoizer(() -> {
// Walk @Rest(restOpArgs=...) chain (parent-to-child via getRestAnnotationsForProperty).
@@ -942,24 +944,24 @@ public class RestContext extends Context {
var b = RestOpArgList.create(bs);
getRestAnnotationsForProperty(PROPERTY_restOpArgs)
.forEach(ai -> b.add(ai.inner().restOpArgs()));
- // @RestInject method override REPLACES the entire annotation-derived list.
- var override = bs.createBeanFromMethod(RestOpArgList.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ // @Bean method override REPLACES the entire annotation-derived list.
+ var override = bs.createBeanFromMethod(RestOpArgList.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return (nn(override) ? override : b.build()).asArray();
});
/**
* Fully-configured {@link SerializerSet.Builder} for this resource, populated from the
- * {@code @Rest(serializers)} annotation chain and any {@code @RestInject} override.
+ * {@code @Rest(serializers)} annotation chain and any {@code @Bean} override.
*
* <p>
* Starts with an empty set. A bean-store type or instance override REPLACES the builder or its impl.
- * Annotation entries (parent-to-child) are appended. A {@code @RestInject} factory method REPLACES the impl.
+ * Annotation entries (parent-to-child) are appended. A {@code @Bean} factory method REPLACES the impl.
*/
private final Memoizer<SerializerSet.Builder> serializersBuilder = memoizer(() -> {
var bs = beanStore();
var v = Value.of(SerializerSet.create(bs));
getRestAnnotationsForProperty(PROPERTY_serializers).forEach(ai -> v.get().add(ai.inner().serializers()));
- bs.createBeanFromMethod(SerializerSet.class, resource().get(), RestContext::isRestInjectMethod, v.get()).ifPresent(x -> v.get().impl(x));
+ bs.createBeanFromMethod(SerializerSet.class, resource().get(), RestContext::isBeanMethod, v.get()).ifPresent(x -> v.get().impl(x));
return v.get();
});
@@ -974,7 +976,7 @@ public class RestContext extends Context {
private final Memoizer<LifecycleInvokerPair> startCallInvokerPair = memoizer(() -> buildLifecycleInvokerPair(() -> {
var bs = beanStore();
var v = Value.of(MethodList.of(getAnnotatedMethods(resource(), RestStartCall.class).toList()));
- bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isRestInjectMethod(x, "startCallMethods"), v.get()).ifPresent(v::set);
+ bs.createBeanFromMethod(MethodList.class, resource().get(), x -> isBeanMethod(x, "startCallMethods"), v.get()).ifPresent(v::set);
return v.get();
}));
@@ -983,7 +985,7 @@ public class RestContext extends Context {
*
* <p>
* Defaults to {@link BasicStaticFiles}. {@code @Rest(staticFiles=X)} most-derived non-{@code Void} class wins.
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<StaticFiles> staticFiles = memoizer(() -> {
var bs = beanStore();
@@ -995,7 +997,7 @@ public class RestContext extends Context {
.filter(c -> c != StaticFiles.Void.class)
.reduce((first, second) -> second)
.ifPresent(creator::type);
- bs.createBeanFromMethod(StaticFiles.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(creator::impl);
+ bs.createBeanFromMethod(StaticFiles.class, resource().get(), RestContext::isBeanMethod).ifPresent(creator::impl);
return creator.asOptional().orElse(null);
});
@@ -1004,7 +1006,7 @@ public class RestContext extends Context {
*
* <p>
* Defaults to {@link BasicSwaggerProvider}. {@code @Rest(swaggerProvider=X)} most-derived
- * non-{@code Void} class wins. A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * non-{@code Void} class wins. A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<SwaggerProvider> swaggerProvider = memoizer(() -> {
var bs = beanStore();
@@ -1019,7 +1021,7 @@ public class RestContext extends Context {
.filter(c -> c != SwaggerProvider.Void.class)
.reduce((first, second) -> second)
.ifPresent(creator::type);
- bs.createBeanFromMethod(SwaggerProvider.class, resource().get(), RestContext::isRestInjectMethod).ifPresent(creator::impl);
+ bs.createBeanFromMethod(SwaggerProvider.class, resource().get(), RestContext::isBeanMethod).ifPresent(creator::impl);
return creator.asOptional().orElse(null);
});
@@ -1028,12 +1030,12 @@ public class RestContext extends Context {
*
* <p>
* Inherits from the parent context's store when one is present. A bean-store override or
- * {@code @RestInject} factory method REPLACES the result.
+ * {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<ThrownStore> thrownStore = memoizer(() -> {
var bs = beanStore();
var b = ThrownStore.create(bs).impl(parentContext() == null ? null : parentContext().getThrownStore());
- bs.createBeanFromMethod(ThrownStore.class, resource().get(), RestContext::isRestInjectMethod, b).ifPresent(b::impl);
+ bs.createBeanFromMethod(ThrownStore.class, resource().get(), RestContext::isBeanMethod, b).ifPresent(b::impl);
return b.build();
});
@@ -1043,14 +1045,14 @@ public class RestContext extends Context {
* <p>
* The bootstrap {@link Config} is pulled from the {@code rawConfig} memoizer to avoid a circular
* dependency: the runtime {@link Config} wraps the bootstrap config in a session backed by this resolver.
- * A bean-store override or {@code @RestInject} factory method REPLACES the result.
+ * A bean-store override or {@code @Bean} factory method REPLACES the result.
*/
private final Memoizer<VarResolver> varResolver = memoizer(() -> {
var bs = beanStore();
var b = getBootstrapVarResolver().copy()
.bean(Messages.class, getMessages())
.bean(Config.class, rawConfig.get());
- var override = bs.createBeanFromMethod(VarResolver.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ var override = bs.createBeanFromMethod(VarResolver.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return nn(override) ? override : b.build();
});
@@ -1093,7 +1095,7 @@ public class RestContext extends Context {
}
}
}
- var override = bs.createBeanFromMethod(RestOperations.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ var override = bs.createBeanFromMethod(RestOperations.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return nn(override) ? override : b.build();
}));
@@ -1138,8 +1140,8 @@ public class RestContext extends Context {
b.add(cc);
}
- // @RestInject override — allows replacing the entire RestChildren instance.
- var override = bs.createBeanFromMethod(RestChildren.class, resource().get(), RestContext::isRestInjectMethod, b).orElse(null);
+ // @Bean override — allows replacing the entire RestChildren instance.
+ var override = bs.createBeanFromMethod(RestChildren.class, resource().get(), RestContext::isBeanMethod, b).orElse(null);
return nn(override) ? override : b.build();
}));
@@ -1187,7 +1189,7 @@ public class RestContext extends Context {
// Determine the parent (bootstrap) store: inherited from parent resource if present.
WritableBeanStore parentBs = parentContext != null ? parentContext.bootstrapBeanStore : null;
- // Build the initial beanStore; honor an optional @RestInject WritableBeanStore override.
+ // Build the initial beanStore; honor an optional @Bean WritableBeanStore override.
// In the new 9.5 precedence model, the parent (Spring or parent-resource bootstrap) is
// installed as the overriding parent so it wins over local entries.
// @formatter:off
@@ -1219,47 +1221,47 @@ public class RestContext extends Context {
rawConfig.get();
// Register memoizer-backed defaults for every framework-managed type. These sit at the
- // bottom of the precedence order and only fire when no @RestInject method, no programmatic
+ // bottom of the precedence order and only fire when no @Bean method, no programmatic
// add, and no Spring/overriding-parent bean has been registered for the type. This is
- // what removes the need for the old DELAYED_INJECTION gate-keeping list — the @RestInject
+ // what removes the need for the old DELAYED_INJECTION gate-keeping list — the @Bean
// walk below can now invoke any framework type's factory and still resolve framework
// dependencies through the bean store.
registerFrameworkDefaults(beanStore);
var rci2 = ClassInfo.of(resourceClass);
- // Register @RestInject fields that already have a value.
+ // Register @Bean fields that already have a value.
// @formatter:off
rci2.getAllFields().stream()
- .filter(x -> x.hasAnnotation(RestInject.class))
+ .filter(x -> x.hasAnnotation(Bean.class))
.forEach(x -> opt(x.get(resource.get())).ifPresent(
y -> beanStore.add(
x.getFieldType().inner(),
y,
- RestInjectAnnotation.name(x.getAnnotations(RestInject.class).findFirst().map(AnnotationInfo::inner).orElse(null))
+ BeanAnnotation.name(x.getAnnotations(Bean.class).findFirst().map(AnnotationInfo::inner).orElse(null))
)
));
// @formatter:on
- // Run @RestInject methods and register their results as LOCAL entries (level 2 of resolve()).
+ // Run @Bean methods and register their results as LOCAL entries (level 2 of resolve()).
//
- // For non-framework types: invoke the @RestInject method directly via createBeanFromMethod
+ // For non-framework types: invoke the @Bean method directly via createBeanFromMethod
// and store the result via addBean.
//
- // For framework types (those with a default supplier registered above): the @RestInject
+ // For framework types (those with a default supplier registered above): the @Bean
// scan already ran inside the corresponding memoizer body (see e.g. createCallLogger()),
// so re-invoking createBeanFromMethod here would create a SECOND instance and produce
// inconsistent state between the framework's memoizer-backed bean and the bean store's
// local entry. Instead, PROMOTE the existing default supplier (which is memoizer-backed
- // and resolves to the @RestInject value when one was supplied) into a local-entry supplier.
- // Promoting at level 2 means @RestInject results win over a parent (Spring) at level 3.
+ // and resolves to the @Bean value when one was supplied) into a local-entry supplier.
+ // Promoting at level 2 means @Bean results win over a parent (Spring) at level 3.
//
- // Net effect: @RestInject method results uniformly take precedence over Spring/parent
+ // Net effect: @Bean method results uniformly take precedence over Spring/parent
// bindings for both framework and user-defined types. This auto-derives the legacy
// DELAYED_INJECTION list from the default-supplier registrations.
- rci2.getAllMethods().stream().filter(x -> x.hasAnnotation(RestInject.class)).forEach(x -> {
+ rci2.getAllMethods().stream().filter(x -> x.hasAnnotation(Bean.class)).forEach(x -> {
var rt = x.getReturnType().<Object>inner();
- var name = RestInjectAnnotation.name(x.getAnnotations(RestInject.class).findFirst().map(AnnotationInfo::inner).orElse(null));
+ var name = BeanAnnotation.name(x.getAnnotations(Bean.class).findFirst().map(AnnotationInfo::inner).orElse(null));
// Skip the WritableBeanStore factory (already consumed by createBeanStore()).
if (WritableBeanStore.class.equals(rt) || BeanStore.class.equals(rt))
return;
@@ -1267,7 +1269,7 @@ public class RestContext extends Context {
bbs2.getDefaultSupplier(rt, name).ifPresent(sup -> beanStore.addSupplier(rt, sup, name));
return;
}
- beanStore.createBeanFromMethod(rt, resource.get(), RestContext::isRestInjectMethod)
+ beanStore.createBeanFromMethod(rt, resource.get(), RestContext::isBeanMethod)
.ifPresent(y -> beanStore.addBean(rt, y, name));
});
@@ -1294,15 +1296,15 @@ public class RestContext extends Context {
}
}
- // Back-fill @RestInject fields that were null before init hooks ran.
+ // Back-fill @Bean fields that were null before init hooks ran.
// @formatter:off
rci2.getAllFields().stream()
- .filter(x -> x.hasAnnotation(RestInject.class))
+ .filter(x -> x.hasAnnotation(Bean.class))
.forEach(x -> x.setIfNull(
resource.get(),
beanStore.getBean(
x.getFieldType().inner(),
- RestInjectAnnotation.name(x.getAnnotations(RestInject.class).findFirst().map(AnnotationInfo::inner).orElse(null))
+ BeanAnnotation.name(x.getAnnotations(Bean.class).findFirst().map(AnnotationInfo::inner).orElse(null))
).orElse(null)
));
// @formatter:on
@@ -1952,9 +1954,9 @@ public class RestContext extends Context {
* <p>
* The default call logger is {@link BasicCallLogger}. Override via {@link Rest#callLogger() @Rest(callLogger)}
* on the resource class, by registering a {@link CallLogger} bean in the bean store, or by declaring a
- * {@link RestInject @RestInject}-annotated static method on the resource class:
+ * {@link org.apache.juneau.commons.inject.Bean @Bean}-annotated static method on the resource class:
* <p class='bjava'>
- * <ja>@RestInject</ja> <jk>public static</jk> CallLogger myCallLogger(<i><args></i>) {...}
+ * <ja>@Bean</ja> <jk>public static</jk> CallLogger myCallLogger(<i><args></i>) {...}
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -2463,7 +2465,7 @@ public class RestContext extends Context {
* The bootstrap resolver has the same {@link Var} catalog as {@link #getVarResolver()} but does not have
* {@link Messages} or {@link Config} beans wired in — it is used to resolve annotation attribute values
* (e.g. <c>@Rest(messages=...)</c>) before those beans are built. Override via
- * {@link RestInject @RestInject(name="bootstrapVarResolver")} on a static method of the resource class.
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="bootstrapVarResolver")} on a static method of the resource class.
*
* @return The bootstrap var resolver in use by this resource.
*/
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
index 0688e0b339..7c58be3494 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestOpContext.java
@@ -232,8 +232,8 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* Walks the {@code @Rest(converters)} class chain (parent-to-child) followed by the
* {@code @RestOp(converters)} method chain (parent-to-child). Op-level
* {@code noInherit={"converters"}} cuts off the class-chain contribution. An
- * {@code @RestInject RestConverterList} bean (either as a name-anonymous bean in the bean store
- * or as a {@code @RestInject} method whose {@code methodScope} matches this operation's method
+ * {@code @Bean RestConverterList} bean (either as a name-anonymous bean in the bean store
+ * or as a {@code @Bean} method whose {@code methodScope} matches this operation's method
* name) REPLACES the entire annotation-derived list.
*/
private final Memoizer<RestConverter[]> converters = memoizer(() -> {
@@ -284,7 +284,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* {@code @Rest(defaultRequestAttributes)}), then walks the {@code @RestOp}/verb chain
* (parent-to-child) and adds each entry — {@link NamedAttributeMap#add} uses put-semantics so
* child entries override parent entries by name. An
- * {@code @RestInject(name="defaultRequestAttributes") NamedAttributeMap} bean (matching this
+ * {@code @Bean(name="defaultRequestAttributes") NamedAttributeMap} bean (matching this
* operation's method scope) REPLACES the entire result.
*/
private final Memoizer<NamedAttributeMap> defaultRequestAttributes = memoizer(() -> {
@@ -306,7 +306,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* entry is applied with {@link PartList#setDefault} (first-in-chain wins per name).
* Method-parameter {@link FormData @FormData} annotations with a
* {@link Schema#default_()}/{@link Schema#df()} default are folded in last (also
- * {@code setDefault} = first wins). An {@code @RestInject(name="defaultRequestFormData") PartList}
+ * {@code setDefault} = first wins). An {@code @Bean(name="defaultRequestFormData") PartList}
* bean (matching this operation's method scope) REPLACES the entire result.
*/
private final Memoizer<PartList> defaultRequestFormData = memoizer(() -> {
@@ -344,7 +344,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* Method-parameter {@link Header @Header} annotations with a
* {@link Schema#default_()}/{@link Schema#df()} default are folded in last via
* {@link HeaderList#set} (overrides any prior entry with the same name). An
- * {@code @RestInject(name="defaultRequestHeaders") HeaderList} bean (matching this operation's
+ * {@code @Bean(name="defaultRequestHeaders") HeaderList} bean (matching this operation's
* method scope) REPLACES the entire result.
*/
private final Memoizer<HeaderList> defaultRequestHeaders = memoizer(() -> {
@@ -377,7 +377,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* entry is applied with {@link PartList#setDefault} (first-in-chain wins per name).
* Method-parameter {@link Query @Query} annotations with a
* {@link Schema#default_()}/{@link Schema#df()} default are folded in last (also
- * {@code setDefault} = first wins). An {@code @RestInject(name="defaultRequestQueryData") PartList}
+ * {@code setDefault} = first wins). An {@code @Bean(name="defaultRequestQueryData") PartList}
* bean (matching this operation's method scope) REPLACES the entire result.
*/
private final Memoizer<PartList> defaultRequestQueryData = memoizer(() -> {
@@ -408,7 +408,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* {@code @Rest(defaultResponseHeaders)}), then walks the {@code @RestOp}/verb chain
* (parent-to-child); each annotation's {@code defaultResponseHeaders} entries are applied with
* {@link HeaderList#setDefault} (first-in-chain wins per name). An
- * {@code @RestInject(name="defaultResponseHeaders") HeaderList} bean (matching this operation's
+ * {@code @Bean(name="defaultResponseHeaders") HeaderList} bean (matching this operation's
* method scope) REPLACES the entire result.
*/
private final Memoizer<HeaderList> defaultResponseHeaders = memoizer(() -> {
@@ -430,7 +430,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* array REPLACES the inherited set (with {@link Inherit} as a sentinel that re-injects the prior
* set's entries at the specified position — matches the legacy {@code EncoderSet.Builder.set(...)}
* semantics). Falls through to the class-level {@link RestContext#getEncoders()} when no op
- * annotation declares encoders. An {@code @RestInject EncoderSet} bean (matching this operation's
+ * annotation declares encoders. An {@code @Bean EncoderSet} bean (matching this operation's
* method scope) REPLACES the result entirely.
*/
private final Memoizer<EncoderSet> encoders = memoizer(() -> {
@@ -464,7 +464,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* </ul>
*
* <p>
- * An {@code @RestInject RestGuardList} bean (via the bean store or an {@code @RestInject} method
+ * An {@code @Bean RestGuardList} bean (via the bean store or an {@code @Bean} method
* with matching {@code methodScope}) REPLACES the entire annotation-derived list (Decision #1).
*/
private final Memoizer<RestGuard[]> guards = memoizer(() -> {
@@ -562,7 +562,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* {@code noInherit={"matchers"}}). Each annotation contributes its {@code matchers()} classes
* (appended in chain order). The final non-blank {@code clientVersion()} (most-derived wins)
* appends a single {@link ClientVersionMatcher} keyed off the resource's client-version header.
- * An {@code @RestInject RestMatcherList} bean (via the bean store or an {@code @RestInject}
+ * An {@code @Bean RestMatcherList} bean (via the bean store or an {@code @Bean}
* method with matching {@code methodScope}) REPLACES the entire annotation-derived list.
*/
private final Memoizer<RestMatcherList> matchersList = memoizer(() -> {
@@ -634,7 +634,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* Walks the {@code @RestOp(parsers)} chain (parent-to-child); the most-derived non-empty
* {@code parsers()} array REPLACES the entire inherited set. Falls through to the class-level
* {@link RestContext#getParsers()} when no op annotation declares parsers. An
- * {@code @RestInject ParserSet} bean (matching this operation's method scope) REPLACES the result.
+ * {@code @Bean ParserSet} bean (matching this operation's method scope) REPLACES the result.
*/
private final Memoizer<ParserSet> parsers = memoizer(() -> {
var aa = appliedAnnotations();
@@ -698,7 +698,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* For RRPC operations with no explicit path, a trailing {@code "/*"} is appended so the matcher
* matches anything below the method's URL.
* {@code noInherit={"path"}} cuts off any further parent-chain contribution. A
- * {@code @RestInject UrlPathMatcherList} bean (matching this operation's method scope) REPLACES
+ * {@code @Bean UrlPathMatcherList} bean (matching this operation's method scope) REPLACES
* the entire result.
*/
@SuppressWarnings("java:S3776")
@@ -788,7 +788,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* Walks the {@code @RestOp(serializers)} chain (parent-to-child); the most-derived non-empty
* {@code serializers()} array REPLACES the entire inherited set. Falls through to the class-level
* {@link RestContext#getSerializers()} when no op annotation declares serializers. An
- * {@code @RestInject SerializerSet} bean (matching this operation's method scope) REPLACES the result.
+ * {@code @Bean SerializerSet} bean (matching this operation's method scope) REPLACES the result.
*/
private final Memoizer<SerializerSet> serializers = memoizer(() -> {
var aa = appliedAnnotations();
@@ -858,17 +858,17 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
}
/**
- * Returns {@code true} if the given method has a {@code @RestInject} annotation whose
+ * Returns {@code true} if the given method has a {@code @Bean} annotation whose
* {@code methodScope} includes this operation's method name (or {@code "*"}).
*
* <p>
- * Used by op-level memoizers when scanning the resource class for {@code @RestInject}-supplied
+ * Used by op-level memoizers when scanning the resource class for {@code @Bean}-supplied
* composite-bean overrides ({@code RestConverterList}, {@code RestGuardList}, etc.). This is the
* {@link RestOpContext}-scope peer of {@link Builder#matches(MethodInfo)} — kept in sync with that
* one.
*/
private boolean matchesInjectScope(MethodInfo annotated) {
- var a = annotated.getAnnotations(RestInject.class).findFirst().map(AnnotationInfo::inner).orElse(null);
+ var a = annotated.getAnnotations(Bean.class).findFirst().map(AnnotationInfo::inner).orElse(null);
if (a != null) {
for (var n : a.methodScope()) {
if ("*".equals(n) || method.getName().equals(n))
@@ -880,7 +880,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
/**
* Same as {@link #matchesInjectScope(MethodInfo)} but additionally requires the
- * {@link RestInject#name()} attribute to equal {@code beanName}.
+ * {@link Bean#name()} attribute to equal {@code beanName}.
*
* <p>
* Used for named composite-bean overrides ({@code defaultRequestHeaders}, {@code defaultResponseHeaders},
@@ -888,7 +888,7 @@ public class RestOpContext extends Context implements Comparable<RestOpContext>
* response headers).
*/
private boolean matchesInjectScope(MethodInfo annotated, String beanName) {
- var a = annotated.getAnnotations(RestInject.class).findFirst().map(AnnotationInfo::inner).orElse(null);
+ var a = annotated.getAnnotations(Bean.class).findFirst().map(AnnotationInfo::inner).orElse(null);
if (a != null) {
if (! a.name().equals(beanName))
return false;
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
index 863f29cddc..6eaa7608ca 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/Rest.java
@@ -739,7 +739,7 @@ public @interface Rest {
*
* <p>
* For programmatic equivalents, contribute an {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")}.
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")}.
*
* <h5 class='section'>Inheritance Rules</h5>
* <ul>
@@ -908,7 +908,7 @@ public @interface Rest {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.parser.ParserSet} bean via
- * {@link RestInject @RestInject(name="parsers")}.
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="parsers")}.
*
* <h5 class='section'>Inheritance Rules</h5>
* <ul>
@@ -1273,7 +1273,7 @@ public @interface Rest {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")}.
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")}.
*
* <h5 class='section'>Inheritance Rules</h5>
* <ul>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
index cdaa0df507..d76abb5fe2 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestDelete.java
@@ -348,7 +348,7 @@ public @interface RestDelete {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
index 83a7f505a9..63bb93ae4e 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
@@ -365,7 +365,7 @@ public @interface RestGet {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -625,7 +625,7 @@ public @interface RestGet {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
index 56dbeea668..51b86aa0fa 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInit.java
@@ -38,7 +38,7 @@ import jakarta.servlet.*;
* Method parameters are resolved from the
* {@link org.apache.juneau.commons.inject.BeanStore bean store} the same way as any other Juneau-injected
* method. {@link jakarta.servlet.ServletConfig}, {@link jakarta.servlet.ServletContext}, the resource instance
- * itself, and any bean registered via {@link org.apache.juneau.rest.annotation.RestInject @RestInject} or the
+ * itself, and any bean registered via {@link org.apache.juneau.commons.inject.Bean @Bean} or the
* configured bean-store hooks are all resolvable. Zero-argument variants are also supported.
*
* <p>
@@ -47,17 +47,17 @@ import jakarta.servlet.*;
* <ul>
* <li><b>Per-operation:</b> {@code @RestInit public void init(RestOpContext.Builder b)} (invoked once per
* <code>@RestOp</code>-annotated method) — replaced by declarative <code>@RestOp(...)</code> attributes,
- * <code>@RestInject(name=, methodScope=)</code>-named beans, or class-level <code>@RestInit</code> hooks.
+ * <code>@Bean(name=, methodScope=)</code>-named beans, or class-level <code>@RestInit</code> hooks.
* <li><b>Class-level Builder injection:</b> {@code @RestInit public void init(RestContext.Builder b)} (which
* injected the in-flight resource-level builder so the hook could imperatively mutate it) — replaced by the
* same declarative surfaces. Migrate by moving each <code>builder.xxx(...)</code> call to the equivalent
- * <code>@Rest(xxx=...)</code> annotation attribute or {@code @RestInject}-named bean.
+ * <code>@Rest(xxx=...)</code> annotation attribute or {@code @Bean}-named bean.
* </ul>
*
* <p>
* The remaining supported {@code @RestInit} hook shape is one whose parameters are bean-store-resolvable
* (no {@code RestContext.Builder} or {@code RestOpContext.Builder}). The example below uses the resource
- * instance itself, but {@code @RestInject}-supplied beans, {@code ServletConfig}, etc. work the same way.
+ * instance itself, but {@code @Bean}-supplied beans, {@code ServletConfig}, etc. work the same way.
*
* <h5 class='figure'>Example:</h5>
* <p class='bjava'>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInject.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInject.java
deleted file mode 100644
index cc5e74605e..0000000000
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestInject.java
+++ /dev/null
@@ -1,249 +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.rest.annotation;
-
-import static java.lang.annotation.ElementType.*;
-import static java.lang.annotation.RetentionPolicy.*;
-
-import java.lang.annotation.*;
-import java.util.logging.*;
-
-import org.apache.juneau.*;
-import org.apache.juneau.config.*;
-import org.apache.juneau.cp.*;
-import org.apache.juneau.encoders.*;
-import org.apache.juneau.http.header.*;
-import org.apache.juneau.http.part.*;
-import org.apache.juneau.httppart.*;
-import org.apache.juneau.jsonschema.*;
-import org.apache.juneau.parser.*;
-import org.apache.juneau.rest.*;
-import org.apache.juneau.rest.arg.*;
-import org.apache.juneau.rest.converter.*;
-import org.apache.juneau.rest.debug.*;
-import org.apache.juneau.rest.guard.*;
-import org.apache.juneau.rest.httppart.*;
-import org.apache.juneau.rest.logger.*;
-import org.apache.juneau.rest.matcher.*;
-import org.apache.juneau.rest.processor.*;
-import org.apache.juneau.rest.staticfile.*;
-import org.apache.juneau.rest.stats.*;
-import org.apache.juneau.rest.swagger.*;
-import org.apache.juneau.rest.util.*;
-import org.apache.juneau.serializer.*;
-import org.apache.juneau.svl.*;
-
-/**
- * Rest bean injection annotation.
- *
- * <p>
- * Used on methods of {@link Rest}-annotated classes to denote methods and fields that override and customize beans
- * used by the REST framework.
- *
- * <h5 class='figure'>Example</h5>
- * <p class='bcode'>
- * <jc>// Rest resource that uses a customized call logger.</jc>
- * <ja>@Rest</ja>
- * <jk>public class</jk> MyRest <jk>extends</jk> BasicRestServlet {
- *
- * <jc>// Option #1: As a field.</jc>
- * <ja>@RestInject</ja>
- * CallLogger <jf>myCallLogger</jf> = CallLogger.<jsm>create</jsm>().logger(<js>"mylogger"</js>).build();
- *
- * <jc>// Option #2: As a method.</jc>
- * <ja>@RestInject</ja>
- * <jk>public</jk> CallLogger myCallLogger() {
- * <jk>return</jk> CallLogger.<jsm>create</jsm>().logger(<js>"mylogger"</js>).build();
- * }
- * }
- * </p>
- *
- * <p>
- * The {@link RestInject#name()}/{@link RestInject#value()} attributes are used to differentiate between named beans.
- * </p>
- * <h5 class='figure'>Example</h5>
- * <p class='bcode'>
- * <jc>// Customized default request headers.</jc>
- * <ja>@RestInject</ja>(<js>"defaultRequestHeaders"</js>)
- * HeaderList <jf>defaultRequestHeaders</jf> = HeaderList.<jsm>create</jsm>().set(ContentType.<jsf>TEXT_PLAIN</jsf>).build();
- *
- * <jc>// Customized default response headers.</jc>
- * <ja>@RestInject</ja>(<js>"defaultResponseHeaders"</js>)
- * HeaderList <jf>defaultResponseHeaders</jf> = HeaderList.<jsm>create</jsm>().set(ContentType.<jsf>TEXT_PLAIN</jsf>).build();
- * </p>
- *
- * <p>
- * The {@link RestInject#methodScope()} attribute is used to define beans in the scope of specific {@link RestOp}-annotated methods.
- * </p>
- * <h5 class='figure'>Example</h5>
- * <p class='bcode'>
- * <jc>// Set a default header on a specific REST method.</jc>
- * <jc>// Input parameter is the default header list builder with all annotations applied.</jc>
- * <ja>@RestInject</ja>(name=<js>"defaultRequestHeaders"</js>, methodScope=<js>"myRestMethod"</js>)
- * <jk>public</jk> HeaderList.Builder myRequestHeaders(HeaderList.Builder <jv>builder</jv>) {
- * <jk>return</jk> <jv>builder</jv>.set(ContentType.<jsf>TEXT_PLAIN</jsf>);
- * }
- *
- * <jc>// Method that picks up default header defined above.</jc>
- * <ja>@RestGet</ja>
- * <jk>public</jk> Object myRestMethod(ContentType <jv>contentType</jv>) { ... }
- * </p>
- *
- * <p>
- * This annotation can also be used to inject arbitrary beans into the bean store which allows them to be
- * passed as resolved parameters on {@link RestOp}-annotated methods.
- * </p>
- * <h5 class='figure'>Example</h5>
- * <p class='bcode'>
- * <jc>// Custom beans injected into the bean store.</jc>
- * <ja>@RestInject</ja> MyBean <jv>myBean1</jv> = <jk>new</jk> MyBean();
- * <ja>@RestInject</ja>(<js>"myBean2"</js>) MyBean <jv>myBean2</jv> = <jk>new</jk> MyBean();
- *
- * <jc>// Method that uses injected beans.</jc>
- * <ja>@RestGet</ja>
- * <jk>public</jk> Object doGet(MyBean <jv>myBean1</jv>, <ja>@Name</ja>(<js>"myBean2"</js>) MyBean <jv>myBean2</jv>) { ... }
- * </p>
- *
- * <p>
- * This annotation can also be used on uninitialized fields. When fields are uninitialized, they will
- * be set during initialization based on beans found in the bean store.
- * </p>
- * <h5 class='figure'>Example</h5>
- * <p class='bcode'>
- * <jc>// Fields that get set during initialization based on beans found in the bean store.</jc>
- * <ja>@RestInject</ja> CallLogger <jf>callLogger</jf>;
- * <ja>@RestInject</ja> BeanStore <jf>beanStore</jf>; <jc>// Note that the BeanStore itself can be accessed this way.</jc>
- * </p>
- *
- * <h5 class='section'>Notes:</h5><ul>
- * <li class='note'>Methods and fields can be static or non-static.
- * <li class='note'>Any injectable beans (including spring beans) can be passed as arguments into methods.
- * <li class='note'>Bean names are required when multiple beans of the same type exist in the bean store.
- * <li class='note'>By default, the injected bean scope is class-level (applies to the entire class). The
- * {@link RestInject#methodScope()} annotation can be used to apply to method-level only (when applicable).
- * </ul>
- *
- * <h5 class='section'>Precedence (since 9.5.0):</h5>
- * <p>
- * {@code @RestInject} acts as a <i>programmable default</i>, analogous to Spring's
- * <c>@ConditionalOnMissingBean</c>. When a {@link RestContext} resolves a framework-managed bean
- * (<c>CallLogger</c>, <c>EncoderSet</c>, <c>SerializerSet</c>, <c>ParserSet</c>, <c>ThrownStore</c>,
- * <c>Config</c>, <c>VarResolver</c>, <c>HttpPartSerializer</c>, <c>HttpPartParser</c>, etc.), the lookup
- * walks the following tiers in order, returning the first hit:
- * </p>
- * <ol>
- * <li><b>Overriding-parent bean store</b> — Spring beans (in <c>juneau-rest-server-springboot</c> deployments,
- * via <c>SpringBeanStore</c>), or any bean reachable through the configured overriding-parent
- * bean-store chain.</li>
- * <li><b>{@code @RestInject} method/field on the resource class</b> — registered as a regular bean-store
- * entry, beating the framework default.</li>
- * <li><b>Memoizer-backed framework default</b> — built into {@link RestContext} as a default supplier.</li>
- * </ol>
- * <p>
- * In other words: a Spring <c>@Bean</c> of type <c>CallLogger</c> wins over a {@code @RestInject CallLogger}
- * method on the same servlet, which in turn wins over the framework's built-in <c>BasicCallLogger</c>. Non-Spring
- * deployments have an empty overriding-parent layer, so the chain naturally collapses to
- * {@code @RestInject > default}.
- * </p>
- * <p>
- * Prior to 9.5 the order was {@code @RestInject > Spring > default}. See the 9.5.0 release notes for migration
- * guidance if you need to keep that legacy behavior (typically by removing the Spring <c>@Bean</c> or marking the
- * {@code @RestInject} method's type with a Spring-native override such as <c>@Primary</c>).
- * </p>
- *
- * <p>
- * Any of the following types can be customized via injection:
- * <table class='w800 styled'>
- * <tr><th>Bean class</td><th>Bean qualifying names</th><th>Scope</th></tr>
- * <tr><td>{@link MarshallingContext}<br>{@link org.apache.juneau.MarshallingContext.Builder}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link org.apache.juneau.commons.inject.BeanStore BeanStore}<br>{@link org.apache.juneau.commons.inject.WritableBeanStore WritableBeanStore}</td><td></td><td>class</td></tr>
- * <tr><td>{@link CallLogger}</td><td></td><td>class</td></tr>
- * <tr><td>{@link Config}</td><td></td><td>class</td></tr>
- * <tr><td>{@link DebugEnablement}</td><td></td><td>class</td></tr>
- * <tr><td>{@link EncoderSet}<br>{@link org.apache.juneau.encoders.EncoderSet.Builder}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link FileFinder}<br>{@link org.apache.juneau.cp.FileFinder.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link HeaderList}<br>{@link org.apache.juneau.http.header.HeaderList}</td><td><js>"defaultRequestHeaders"</js><br><js>"defaultResponseHeaders"</js></td><td>class<br>method</td></tr>
- * <tr><td>{@link HttpPartParser}<br>{@link org.apache.juneau.httppart.HttpPartParser.Creator}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link HttpPartSerializer}<br>{@link org.apache.juneau.httppart.HttpPartSerializer.Creator}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link JsonSchemaGenerator}<br>{@link org.apache.juneau.jsonschema.JsonSchemaGenerator.Builder}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link Logger}</td><td></td><td>class</td></tr>
- * <tr><td>{@link Messages}<br>{@link org.apache.juneau.cp.Messages.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link MethodExecStore}<br>{@link org.apache.juneau.rest.stats.MethodExecStore.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link MethodList}</td><td><js>"destroyMethods"</js><br><js>"endCallMethods"</js><br><js>"postCallMethods"</js><br><js>"postInitChildFirstMethods"</js><br><js>"postInitMethods"</js><br><js>"preCallMethods"</js><br><js>"startCallMethods"</js></td><td>class</td></tr>
- * <tr><td>{@link NamedAttributeMap}<br>{@link org.apache.juneau.rest.httppart.NamedAttributeMap}</td><td><js>"defaultRequestAttributes"</js></td><td>class<br>method</td></tr>
- * <tr><td>{@link ParserSet}<br>{@link org.apache.juneau.parser.ParserSet.Builder}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link PartList}<br>{@link org.apache.juneau.http.part.PartList}</td><td><js>"defaultRequestQueryData"</js><br><js>"defaultRequestFormData"</js></td><td>method</td></tr>
- * <tr><td>{@link ResponseProcessorList}<br>{@link org.apache.juneau.rest.processor.ResponseProcessorList.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link RestChildren}<br>{@link org.apache.juneau.rest.RestChildren.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link RestConverterList}<br>{@link org.apache.juneau.rest.converter.RestConverterList.Builder}</td><td></td><td>method</td></tr>
- * <tr><td>{@link RestGuardList}<br>{@link org.apache.juneau.rest.guard.RestGuardList.Builder}</td><td></td><td>method</td></tr>
- * <tr><td>{@link RestMatcherList}<br>{@link org.apache.juneau.rest.matcher.RestMatcherList.Builder}</td><td></td><td>method</td></tr>
- * <tr><td>{@link RestOpArgList}<br>{@link org.apache.juneau.rest.arg.RestOpArgList.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link RestOperations}<br>{@link org.apache.juneau.rest.RestOperations.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link SerializerSet}<br>{@link org.apache.juneau.serializer.SerializerSet.Builder}</td><td></td><td>class<br>method</td></tr>
- * <tr><td>{@link StaticFiles}</td><td></td><td>class</td></tr>
- * <tr><td>{@link SwaggerProvider}</td><td></td><td>class</td></tr>
- * <tr><td>{@link ThrownStore}<br>{@link org.apache.juneau.rest.stats.ThrownStore.Builder}</td><td></td><td>class</td></tr>
- * <tr><td>{@link UrlPathMatcherList}</td><td></td><td>method</td></tr>
- * <tr><td>{@link VarList}</td><td></td><td>class</td></tr>
- * <tr><td>{@link VarResolver}<br>{@link org.apache.juneau.svl.VarResolver.Builder}</td><td></td><td>class</td></tr>
- * </table>
- */
-@Target({ METHOD, FIELD })
-@Retention(RUNTIME)
-@Inherited
-public @interface RestInject {
-
- /**
- * Optional description for the exposed API.
- *
- * @return The annotation value.
- * @since 9.2.0
- */
- String[] description() default {};
-
- /**
- * The short names of the methods that this annotation applies to.
- *
- * <p>
- * Can use <js>"*"</js> to apply to all methods.
- *
- * <p>
- * Ignored for class-level scope.
- *
- * @return The short names of the methods that this annotation applies to, or empty if class-scope.
- */
- String[] methodScope() default {};
-
- /**
- * The bean name to use to distinguish beans of the same type for different purposes.
- *
- * <p>
- * For example, there are two {@link HeaderList} beans: <js>"defaultRequestHeaders"</js> and <js>"defaultResponseHeaders"</js>. This annotation
- * would be used to differentiate between them.
- *
- * @return The bean name to use to distinguish beans of the same type for different purposes, or blank if bean type is unique.
- */
- String name() default "";
-
- /**
- * Same as {@link #name()}.
- *
- * @return The bean name to use to distinguish beans of the same type for different purposes, or blank if bean type is unique.
- */
- String value() default "";
-}
\ No newline at end of file
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
index 56d063d3b4..9c8a4945de 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
@@ -427,7 +427,7 @@ public @interface RestOp {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -586,7 +586,7 @@ public @interface RestOp {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.parser.ParserSet} bean via
- * {@link RestInject @RestInject(name="parsers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="parsers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
@@ -854,7 +854,7 @@ public @interface RestOp {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
index 1f16cbd242..5f822150d8 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
@@ -365,7 +365,7 @@ public @interface RestOptions {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -625,7 +625,7 @@ public @interface RestOptions {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
index 28fa37a4de..3907934931 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
@@ -427,7 +427,7 @@ public @interface RestPatch {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -535,7 +535,7 @@ public @interface RestPatch {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.parser.ParserSet} bean via
- * {@link RestInject @RestInject(name="parsers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="parsers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
@@ -776,7 +776,7 @@ public @interface RestPatch {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
index 99dd2a3020..fefca60ee5 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
@@ -427,7 +427,7 @@ public @interface RestPost {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -535,7 +535,7 @@ public @interface RestPost {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.parser.ParserSet} bean via
- * {@link RestInject @RestInject(name="parsers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="parsers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
@@ -776,7 +776,7 @@ public @interface RestPost {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
index 4bd2f98e42..5caac6d691 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
@@ -427,7 +427,7 @@ public @interface RestPut {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.encoders.EncoderSet} bean via
- * {@link RestInject @RestInject(name="encoders")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="encoders")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/RestServerEncoders">Encoders</a>
@@ -535,7 +535,7 @@ public @interface RestPut {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.parser.ParserSet} bean via
- * {@link RestInject @RestInject(name="parsers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="parsers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
@@ -776,7 +776,7 @@ public @interface RestPut {
*
* <p>
* For programmatic equivalents, contribute a {@link org.apache.juneau.serializer.SerializerSet} bean via
- * {@link RestInject @RestInject(name="serializers")} (use methodScope to scope to specific operation methods).
+ * {@link org.apache.juneau.commons.inject.Bean @Bean(name="serializers")} (use methodScope to scope to specific operation methods).
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/Marshalling">Marshalling</a>
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Builder_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Builder_Test.java
index 051cfb9623..8f5156f46a 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Builder_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Builder_Test.java
@@ -37,7 +37,7 @@ class RestContext_Builder_Test extends TestBase {
@Rest
public static class A1 {
- @RestInject static WritableBeanStore beanStore;
+ @Bean static WritableBeanStore beanStore;
}
@Test void a01_createBeanStore_default() {
@@ -47,9 +47,9 @@ class RestContext_Builder_Test extends TestBase {
@Rest
public static class A4 {
- @RestInject static WritableBeanStore beanStore;
+ @Bean static WritableBeanStore beanStore;
- @RestInject WritableBeanStore beanStore() {
+ @Bean WritableBeanStore beanStore() {
return new BasicBeanStore(null).addBean(A.class, new A());
}
}
@@ -60,7 +60,7 @@ class RestContext_Builder_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // @RestInject on fields.
+ // @Bean on fields.
//-----------------------------------------------------------------------------------------------------------------
public static class B {
@@ -73,11 +73,11 @@ class RestContext_Builder_Test extends TestBase {
@Rest
public static class B1a implements BasicJsonConfig {
- @RestInject static B b1 = new B(1);
- @RestInject(name="b2") B b2 = new B(2);
+ @Bean static B b1 = new B(1);
+ @Bean(name="b2") B b2 = new B(2);
- @RestInject static B b3;
- @RestInject(name="b2") B b4;
+ @Bean static B b3;
+ @Bean(name="b2") B b4;
@RestGet("/a1") public B a1(B b) { return b; }
@RestGet("/a2") public B a2(@Named("b2") B b) { return b; }
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Precedence_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Precedence_Test.java
index 559c46c9a9..0bcc3495e0 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Precedence_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/RestContext_Precedence_Test.java
@@ -35,25 +35,25 @@ import org.junit.jupiter.api.*;
* <p>
* Resolution order, top-to-bottom:
* <ol>
- * <li>{@code @RestInject} factory methods on the resource. For non-framework types these are
+ * <li>{@code @Bean} factory methods on the resource. For non-framework types these are
* registered as local entries directly; for framework types (e.g. {@link CallLogger},
- * {@link ThrownStore}) the per-bean memoizer captures the {@code @RestInject} value, and
+ * {@link ThrownStore}) the per-bean memoizer captures the {@code @Bean} value, and
* {@code RestContext} promotes the memoizer-backed supplier into a local entry so that
- * {@code @RestInject} uniformly wins.
+ * {@code @Bean} uniformly wins.
* <li>User-supplied bean store from
- * {@code @RestInject WritableBeanStore createBeanStore(...)}, including its
+ * {@code @Bean WritableBeanStore createBeanStore(...)}, including its
* {@link org.apache.juneau.rest.springboot.SpringBeanStore}-style fallback to a backing
- * {@code ApplicationContext}. Consulted only when no {@code @RestInject} factory method
+ * {@code ApplicationContext}. Consulted only when no {@code @Bean} factory method
* exists for the type.
* <li>Memoizer-backed framework defaults (e.g. {@link BasicCallLogger}). Fire only when neither
- * a per-resource {@code @RestInject} method nor a user-supplied bean-store binding exists.
+ * a per-resource {@code @Bean} method nor a user-supplied bean-store binding exists.
* </ol>
*
* <p>
- * Net effect: <b>{@code @RestInject} factory methods on the resource take precedence over
+ * Net effect: <b>{@code @Bean} factory methods on the resource take precedence over
* Spring/user-supplied bindings, which in turn take precedence over framework defaults.</b>
* Spring/user-supplied bindings act as drop-in overrides for any type the resource doesn't
- * customize via {@code @RestInject}, with the framework filling in defaults for anything else.
+ * customize via {@code @Bean}, with the framework filling in defaults for anything else.
*/
class RestContext_Precedence_Test extends TestBase {
@@ -62,7 +62,7 @@ class RestContext_Precedence_Test extends TestBase {
//-----------------------------------------------------------------------------------------------------------------
private static final CallLogger SPRING_LOGGER = BasicCallLogger.create(BasicBeanStore.INSTANCE).build();
- private static final CallLogger RESTINJECT_LOGGER = BasicCallLogger.create(BasicBeanStore.INSTANCE).build();
+ private static final CallLogger BEAN_LOGGER = BasicCallLogger.create(BasicBeanStore.INSTANCE).build();
//-----------------------------------------------------------------------------------------------------------------
// Spring-substitute bean store
@@ -127,42 +127,42 @@ class RestContext_Precedence_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // 1. @RestInject beats the memoizer-backed framework default.
+ // 1. @Bean beats the memoizer-backed framework default.
//-----------------------------------------------------------------------------------------------------------------
@Rest
- public static class A_RestInjectBeatsDefault {
- @RestInject static CallLogger callLoggerCapture;
- @RestInject public CallLogger callLogger() { return RESTINJECT_LOGGER; }
+ public static class A_BeanBeatsDefault {
+ @Bean static CallLogger callLoggerCapture;
+ @Bean public CallLogger callLogger() { return BEAN_LOGGER; }
}
@Test
void a01_restInject_beatsDefault() {
- MockRestClient.buildLax(A_RestInjectBeatsDefault.class);
- assertSame(RESTINJECT_LOGGER, A_RestInjectBeatsDefault.callLoggerCapture);
+ MockRestClient.buildLax(A_BeanBeatsDefault.class);
+ assertSame(BEAN_LOGGER, A_BeanBeatsDefault.callLoggerCapture);
}
//-----------------------------------------------------------------------------------------------------------------
- // 2. @RestInject beats Spring (Spring at fallback layer).
+ // 2. @Bean beats Spring (Spring at fallback layer).
//-----------------------------------------------------------------------------------------------------------------
@Rest
- public static class B_RestInjectBeatsSpring {
- @RestInject static CallLogger callLoggerCapture;
- @RestInject public WritableBeanStore createBeanStore() { return springLikeBeanStore(); }
- @RestInject public CallLogger callLogger() { return RESTINJECT_LOGGER; }
+ public static class B_BeanBeatsSpring {
+ @Bean static CallLogger callLoggerCapture;
+ @Bean public WritableBeanStore createBeanStore() { return springLikeBeanStore(); }
+ @Bean public CallLogger callLogger() { return BEAN_LOGGER; }
}
@Test
void b01_restInject_beatsSpring() {
- MockRestClient.buildLax(B_RestInjectBeatsSpring.class);
- assertSame(RESTINJECT_LOGGER, B_RestInjectBeatsSpring.callLoggerCapture, "@RestInject method should win over Spring fallback");
+ MockRestClient.buildLax(B_BeanBeatsSpring.class);
+ assertSame(BEAN_LOGGER, B_BeanBeatsSpring.callLoggerCapture, "@Bean method should win over Spring fallback");
}
//-----------------------------------------------------------------------------------------------------------------
- // 3. Spring beats the framework default for framework bean types (when no @RestInject method exists).
+ // 3. Spring beats the framework default for framework bean types (when no @Bean method exists).
//
- // Without an @RestInject CallLogger method, the framework's memoizer-backed default supplier sits
+ // Without an @Bean CallLogger method, the framework's memoizer-backed default supplier sits
// at level 4 of resolve(), below the user-supplied bean store (parent at level 3). So Spring
// overrides the framework default. This is intentional: if the user wired a CallLogger into Spring,
// they meant it to be used in preference to the auto-configured BasicCallLogger.
@@ -170,14 +170,14 @@ class RestContext_Precedence_Test extends TestBase {
@Rest
public static class C_SpringBeatsDefault {
- @RestInject static CallLogger callLoggerCapture;
- @RestInject public WritableBeanStore createBeanStore() { return springLikeBeanStore(); }
+ @Bean static CallLogger callLoggerCapture;
+ @Bean public WritableBeanStore createBeanStore() { return springLikeBeanStore(); }
}
@Test
void c01_spring_beatsDefault_forFrameworkBean() {
MockRestClient.buildLax(C_SpringBeatsDefault.class);
- assertSame(SPRING_LOGGER, C_SpringBeatsDefault.callLoggerCapture, "User-supplied bean store binding should win over framework default when no @RestInject is declared for the type");
+ assertSame(SPRING_LOGGER, C_SpringBeatsDefault.callLoggerCapture, "User-supplied bean store binding should win over framework default when no @Bean is declared for the type");
}
//-----------------------------------------------------------------------------------------------------------------
@@ -199,32 +199,32 @@ class RestContext_Precedence_Test extends TestBase {
@Rest
public static class D_SpringFallbackForUserBean {
- @RestInject static CustomBean customBeanCapture;
- @RestInject public WritableBeanStore createBeanStore() { return springLikeBeanStoreWithCustomBean(); }
+ @Bean static CustomBean customBeanCapture;
+ @Bean public WritableBeanStore createBeanStore() { return springLikeBeanStoreWithCustomBean(); }
}
@Test
void d01_spring_fillsInForUserBean() {
MockRestClient.buildLax(D_SpringFallbackForUserBean.class);
- assertSame(SPRING_CUSTOM, D_SpringFallbackForUserBean.customBeanCapture, "Spring fallback should provide CustomBean since framework has no default for it and there is no @RestInject method");
+ assertSame(SPRING_CUSTOM, D_SpringFallbackForUserBean.customBeanCapture, "Spring fallback should provide CustomBean since framework has no default for it and there is no @Bean method");
}
//-----------------------------------------------------------------------------------------------------------------
- // 5. @RestInject for a non-framework bean type beats Spring fallback.
+ // 5. @Bean for a non-framework bean type beats Spring fallback.
//-----------------------------------------------------------------------------------------------------------------
- private static final CustomBean RESTINJECT_CUSTOM = new CustomBean("from-restinject");
+ private static final CustomBean BEAN_CUSTOM = new CustomBean("from-restinject");
@Rest
- public static class E_RestInjectBeatsSpringForUserBean {
- @RestInject static CustomBean customBeanCapture;
- @RestInject public WritableBeanStore createBeanStore() { return springLikeBeanStoreWithCustomBean(); }
- @RestInject public CustomBean customBean() { return RESTINJECT_CUSTOM; }
+ public static class E_BeanBeatsSpringForUserBean {
+ @Bean static CustomBean customBeanCapture;
+ @Bean public WritableBeanStore createBeanStore() { return springLikeBeanStoreWithCustomBean(); }
+ @Bean public CustomBean customBean() { return BEAN_CUSTOM; }
}
@Test
void e01_restInject_beatsSpring_forUserBean() {
- MockRestClient.buildLax(E_RestInjectBeatsSpringForUserBean.class);
- assertSame(RESTINJECT_CUSTOM, E_RestInjectBeatsSpringForUserBean.customBeanCapture, "@RestInject should win over Spring fallback for user-defined bean types too");
+ MockRestClient.buildLax(E_BeanBeatsSpringForUserBean.class);
+ assertSame(BEAN_CUSTOM, E_BeanBeatsSpringForUserBean.customBeanCapture, "@Bean should win over Spring fallback for user-defined bean types too");
}
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInit_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInit_Test.java
index 92de48b51a..2420b59671 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInit_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestInit_Test.java
@@ -18,6 +18,7 @@ package org.apache.juneau.rest.annotation;
import org.apache.juneau.*;
import org.apache.juneau.collections.*;
+import org.apache.juneau.commons.inject.Bean;
import org.apache.juneau.rest.mock.*;
import org.junit.jupiter.api.*;
@@ -62,8 +63,8 @@ class RestInit_Test extends TestBase {
return events;
}
- // Bean injected via @RestInject so we can also exercise non-built-in @RestInit parameter resolution.
- @RestInject
+ // Bean injected via @Bean so we can also exercise non-built-in @RestInit parameter resolution.
+ @Bean
public MarkerBean marker() {
return new MarkerBean();
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_Messages_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_Messages_Test.java
index 4bdbdcc756..9a60f5d149 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_Messages_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/Rest_Messages_Test.java
@@ -20,6 +20,7 @@ import java.util.*;
import org.apache.juneau.*;
import org.apache.juneau.collections.*;
+import org.apache.juneau.commons.inject.Bean;
import org.apache.juneau.cp.*;
import org.apache.juneau.http.annotation.*;
import org.apache.juneau.rest.mock.*;
@@ -99,7 +100,7 @@ class Rest_Messages_Test extends TestBase {
}
public static class B3 extends B1 {
- @RestInject
+ @Bean
public static Messages messages(Messages.Builder b) {
return b.location(null, "B2x").location(B1.class, "B1x").build();
}
(juneau) 04/05: refactor(marshall): rename BeanContext/BeanSession engine types to MarshallingContext/MarshallingSession family
Posted by ja...@apache.org.
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 8492c6508169a72197af066db0a4cdbf13365b48
Author: James Bognar <ja...@jamesbog-ltmjqf2.internal.salesforce.com>
AuthorDate: Mon May 11 17:38:15 2026 -0400
refactor(marshall): rename BeanContext/BeanSession engine types to MarshallingContext/MarshallingSession family
- BeanContext → MarshallingContext
- BeanContextable → MarshallingContextable
- BeanSession → MarshallingSession
- BeanTraverseContext → MarshallingTraverseContext
- BeanTraverseSession → MarshallingTraverseSession
- BeanRecursionException → MarshallingRecursionException
- BeanInterceptor → MarshallingInterceptor
- BeanStringSwap → MarshallingStringSwap
- BeanContextConverter → MarshallingContextConverter
- BeanDefMapper → MarshallingDefMapper
Dependent method renames: getBeanContext → getMarshallingContext,
getBeanSession → getMarshallingSession, createBeanSession → createMarshallingSession,
beanContext → marshallingContext, beanSession → marshallingSession.
Test files renamed: BeanContext_Test → MarshallingContext_Test,
RestClient_Config_BeanContext_Test → RestClient_Config_MarshallingContext_Test.
430 source/resource files updated across the repo.
All tests pass.
Co-authored-by: Cursor <cu...@cursor.com>
---
RELEASE-NOTES.txt | 20 +-
docs/src/javadoc/overview.html | 2 +-
.../org/apache/juneau/bean/html5/package2.html | 6 +-
.../apache/juneau/bean/jsonschema/JsonSchema.java | 16 +-
.../apache/juneau/bean/openapi3/ui/OpenApiUI.java | 2 +-
.../apache/juneau/bean/swagger/ui/SwaggerUI.java | 2 +-
.../annotation/AppliedOnClassAnnotationObject.java | 2 +-
.../juneau/commons/conversion/BasicConverter.java | 2 +-
.../juneau/commons/conversion/Converter.java | 2 +-
.../juneau/commons/function/package-info.java | 2 +-
.../apache/juneau/commons/reflect/Visibility.java | 8 +-
.../main/java/org/apache/juneau/config/Config.java | 6 +-
.../main/java/org/apache/juneau/config/Entry.java | 2 +-
.../java/org/apache/juneau/config/Section.java | 4 +-
.../apache/juneau/jena/RdfBeanPropertyMeta.java | 2 +-
.../java/org/apache/juneau/jena/RdfParser.java | 10 +-
.../java/org/apache/juneau/jena/RdfSerializer.java | 10 +-
.../juneau/jena/annotation/RdfAnnotation.java | 2 +-
.../juneau/jena/annotation/RdfApplyAnnotation.java | 2 +-
.../main/java/org/apache/juneau/marshaller/N3.java | 4 +-
.../java/org/apache/juneau/marshaller/NTriple.java | 4 +-
.../java/org/apache/juneau/marshaller/RdfXml.java | 4 +-
.../org/apache/juneau/marshaller/RdfXmlAbbrev.java | 4 +-
.../java/org/apache/juneau/marshaller/Turtle.java | 4 +-
.../java/org/apache/juneau/AnnotationApplier.java | 8 +-
.../src/main/java/org/apache/juneau/BeanMap.java | 26 +--
.../main/java/org/apache/juneau/BeanMapEntry.java | 2 +-
.../src/main/java/org/apache/juneau/BeanMeta.java | 72 +++---
.../java/org/apache/juneau/BeanPropertyMeta.java | 32 +--
.../apache/juneau/BeanProxyInvocationHandler.java | 8 +-
.../main/java/org/apache/juneau/BeanRegistry.java | 4 +-
.../src/main/java/org/apache/juneau/ClassMeta.java | 116 +++++-----
.../src/main/java/org/apache/juneau/Context.java | 2 +-
.../src/main/java/org/apache/juneau/Context.txt | 10 +-
.../main/java/org/apache/juneau/ContextSession.txt | 10 +-
.../java/org/apache/juneau/MarshalledFilter.java | 52 ++---
.../{BeanContext.java => MarshallingContext.java} | 246 ++++++++++-----------
...ontextable.java => MarshallingContextable.java} | 150 ++++++-------
...ion.java => MarshallingRecursionException.java} | 4 +-
.../{BeanSession.java => MarshallingSession.java} | 124 +++++------
...ontext.java => MarshallingTraverseContext.java} | 30 +--
...ession.java => MarshallingTraverseSession.java} | 46 ++--
.../juneau/annotation/ExampleAnnotation.java | 2 +-
.../juneau/annotation/ExampleApplyAnnotation.java | 2 +-
.../juneau/annotation/ExternalDocsAnnotation.java | 2 +-
.../apache/juneau/annotation/ItemsAnnotation.java | 2 +-
.../org/apache/juneau/annotation/Marshalled.java | 50 ++---
.../juneau/annotation/MarshalledAnnotation.java | 10 +-
.../annotation/MarshalledApplyAnnotation.java | 2 +-
.../org/apache/juneau/annotation/MarshalledAs.java | 2 +-
.../apache/juneau/annotation/MarshalledConfig.java | 78 +++----
.../annotation/MarshalledConfigAnnotation.java | 8 +-
.../annotation/MarshalledCtorAnnotation.java | 2 +-
.../annotation/MarshalledCtorApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/MarshalledIgnore.java | 2 +-
.../annotation/MarshalledIgnoreAnnotation.java | 2 +-
.../MarshalledIgnoreApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/MarshalledProp.java | 22 +-
.../annotation/MarshalledPropAnnotation.java | 2 +-
.../annotation/MarshalledPropApplyAnnotation.java | 2 +-
.../juneau/annotation/NamePropertyAnnotation.java | 2 +-
.../annotation/NamePropertyApplyAnnotation.java | 2 +-
.../annotation/ParentPropertyAnnotation.java | 2 +-
.../annotation/ParentPropertyApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/SchemaAnnotation.java | 2 +-
.../juneau/annotation/SchemaApplyAnnotation.java | 2 +-
.../juneau/annotation/SubItemsAnnotation.java | 2 +-
.../java/org/apache/juneau/annotation/Swap.java | 4 +-
.../apache/juneau/annotation/SwapAnnotation.java | 2 +-
.../juneau/annotation/SwapApplyAnnotation.java | 2 +-
.../apache/juneau/annotation/UriAnnotation.java | 2 +-
.../juneau/annotation/UriApplyAnnotation.java | 2 +-
.../bson/annotation/BsonApplyAnnotation.java | 2 +-
.../juneau/cbor/annotation/CborAnnotation.java | 2 +-
.../cbor/annotation/CborApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/collections/Args.java | 4 +-
.../org/apache/juneau/collections/JsonList.java | 34 +--
.../org/apache/juneau/collections/JsonMap.java | 40 ++--
.../main/java/org/apache/juneau/csv/CsvParser.java | 10 +-
.../java/org/apache/juneau/csv/CsvSerializer.java | 10 +-
.../apache/juneau/hjson/HjsonParserSession.java | 2 +-
.../org/apache/juneau/hjson/HjsonSerializer.java | 2 +-
.../hjson/annotation/HjsonApplyAnnotation.java | 2 +-
.../hocon/annotation/HoconApplyAnnotation.java | 2 +-
.../org/apache/juneau/html/HtmlDocSerializer.java | 12 +-
.../java/org/apache/juneau/html/HtmlParser.java | 10 +-
.../juneau/html/HtmlSchemaDocSerializer.java | 22 +-
.../html/HtmlSchemaDocSerializerSession.java | 2 +-
.../apache/juneau/html/HtmlSchemaSerializer.java | 20 +-
.../juneau/html/HtmlSchemaSerializerSession.java | 2 +-
.../org/apache/juneau/html/HtmlSerializer.java | 12 +-
.../juneau/html/HtmlStrippedDocSerializer.java | 10 +-
.../juneau/html/annotation/HtmlAnnotation.java | 2 +-
.../html/annotation/HtmlApplyAnnotation.java | 2 +-
.../juneau/html/annotation/HtmlLinkAnnotation.java | 2 +-
.../html/annotation/HtmlLinkApplyAnnotation.java | 2 +-
.../apache/juneau/httppart/BaseHttpPartParser.java | 8 +-
.../juneau/httppart/BaseHttpPartSerializer.java | 4 +-
.../org/apache/juneau/httppart/HttpPartParser.java | 4 +-
.../apache/juneau/httppart/HttpPartSerializer.java | 4 +-
.../apache/juneau/ini/IniSerializerSession.java | 2 +-
.../juneau/ini/annotation/IniApplyAnnotation.java | 2 +-
.../org/apache/juneau/internal/ConverterUtils.java | 12 +-
.../apache/juneau/internal/DelegateBeanMap.java | 2 +-
.../org/apache/juneau/internal/DelegateList.java | 2 +-
.../org/apache/juneau/internal/DelegateMap.java | 2 +-
.../java/org/apache/juneau/json/JsonParser.java | 12 +-
.../apache/juneau/json/JsonSchemaSerializer.java | 20 +-
.../juneau/json/JsonSchemaSerializerSession.java | 2 +-
.../org/apache/juneau/json/JsonSerializer.java | 14 +-
.../juneau/json/annotation/JsonAnnotation.java | 2 +-
.../json/annotation/JsonApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/json5/Json5Parser.java | 10 +-
.../org/apache/juneau/json5/Json5Serializer.java | 10 +-
.../juneau/jsonschema/BasicBeanDefMapper.java | 10 +-
.../juneau/jsonschema/JsonSchemaGenerator.java | 48 ++--
.../jsonschema/JsonSchemaGeneratorSession.java | 20 +-
...eanDefMapper.java => MarshallingDefMapper.java} | 4 +-
.../jsonschema/annotation/JsonSchemaConfig.java | 18 +-
.../org/apache/juneau/markdown/MarkdownParser.java | 10 +-
.../juneau/markdown/MarkdownParserSession.java | 2 +-
.../apache/juneau/markdown/MarkdownSerializer.java | 10 +-
.../juneau/markdown/MarkdownSerializerSession.java | 2 +-
.../annotation/MarkdownApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/marshaller/Bson.java | 4 +-
.../apache/juneau/marshaller/CharMarshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/Csv.java | 4 +-
.../java/org/apache/juneau/marshaller/Html.java | 4 +-
.../java/org/apache/juneau/marshaller/Jcs.java | 4 +-
.../java/org/apache/juneau/marshaller/Json.java | 4 +-
.../java/org/apache/juneau/marshaller/Json5.java | 4 +-
.../java/org/apache/juneau/marshaller/Jsonl.java | 4 +-
.../org/apache/juneau/marshaller/Markdown.java | 4 +-
.../org/apache/juneau/marshaller/MarkdownDoc.java | 4 +-
.../org/apache/juneau/marshaller/Marshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/MsgPack.java | 4 +-
.../java/org/apache/juneau/marshaller/OpenApi.java | 4 +-
.../java/org/apache/juneau/marshaller/Parquet.java | 2 +-
.../org/apache/juneau/marshaller/PlainText.java | 4 +-
.../apache/juneau/marshaller/StreamMarshaller.java | 2 +-
.../java/org/apache/juneau/marshaller/Uon.java | 4 +-
.../org/apache/juneau/marshaller/UrlEncoding.java | 4 +-
.../java/org/apache/juneau/marshaller/Xml.java | 4 +-
.../java/org/apache/juneau/marshaller/Yaml.java | 4 +-
.../org/apache/juneau/msgpack/MsgPackParser.java | 10 +-
.../apache/juneau/msgpack/MsgPackSerializer.java | 10 +-
.../msgpack/annotation/MsgPackAnnotation.java | 2 +-
.../msgpack/annotation/MsgPackApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/oapi/OpenApiParser.java | 10 +-
.../apache/juneau/oapi/OpenApiParserSession.java | 4 +-
.../org/apache/juneau/oapi/OpenApiSerializer.java | 10 +-
.../juneau/oapi/OpenApiSerializerSession.java | 2 +-
.../juneau/oapi/annotation/OpenApiAnnotation.java | 2 +-
.../oapi/annotation/OpenApiApplyAnnotation.java | 2 +-
.../juneau/objecttools/ObjectIntrospector.java | 2 +-
.../apache/juneau/objecttools/ObjectPaginator.java | 6 +-
.../org/apache/juneau/objecttools/ObjectRest.java | 10 +-
.../apache/juneau/objecttools/ObjectSearcher.java | 12 +-
.../apache/juneau/objecttools/ObjectSorter.java | 8 +-
.../org/apache/juneau/objecttools/ObjectTool.java | 2 +-
.../apache/juneau/objecttools/ObjectViewer.java | 6 +-
.../juneau/parquet/ParquetParserSession.java | 18 +-
.../juneau/parquet/ParquetSchemaBuilder.java | 30 +--
.../juneau/parquet/ParquetSerializerSession.java | 14 +-
.../parquet/annotation/ParquetApplyAnnotation.java | 2 +-
.../apache/juneau/parser/InputStreamParser.java | 10 +-
.../main/java/org/apache/juneau/parser/Parser.java | 18 +-
.../org/apache/juneau/parser/ParserListener.java | 2 +-
.../org/apache/juneau/parser/ParserSession.java | 16 +-
.../java/org/apache/juneau/parser/ParserSet.java | 12 +-
.../org/apache/juneau/parser/ReaderParser.java | 10 +-
.../apache/juneau/plaintext/PlainTextParser.java | 10 +-
.../juneau/plaintext/PlainTextSerializer.java | 10 +-
.../plaintext/annotation/PlainTextAnnotation.java | 2 +-
.../annotation/PlainTextApplyAnnotation.java | 2 +-
.../juneau/proto/annotation/ProtoAnnotation.java | 2 +-
.../proto/annotation/ProtoApplyAnnotation.java | 2 +-
.../juneau/serializer/OutputStreamSerializer.java | 10 +-
.../org/apache/juneau/serializer/Serializer.java | 16 +-
.../juneau/serializer/SerializerSession.java | 16 +-
.../apache/juneau/serializer/SerializerSet.java | 12 +-
.../apache/juneau/serializer/WriterSerializer.java | 10 +-
.../serializer/annotation/SerializerConfig.java | 14 +-
.../org/apache/juneau/soap/SoapXmlSerializer.java | 10 +-
.../org/apache/juneau/svl/ResolvingJsonMap.java | 4 +-
.../java/org/apache/juneau/swap/AutoListSwap.java | 32 +--
.../java/org/apache/juneau/swap/AutoMapSwap.java | 32 +--
.../org/apache/juneau/swap/AutoNumberSwap.java | 58 ++---
.../org/apache/juneau/swap/AutoObjectSwap.java | 30 +--
.../org/apache/juneau/swap/AutoStringSwap.java | 4 +-
.../java/org/apache/juneau/swap/BuilderSwap.java | 8 +-
.../org/apache/juneau/swap/FunctionalSwap.java | 4 +-
.../main/java/org/apache/juneau/swap/MapSwap.java | 4 +-
...nterceptor.java => MarshallingInterceptor.java} | 14 +-
.../java/org/apache/juneau/swap/ObjectSwap.java | 18 +-
.../java/org/apache/juneau/swap/StringSwap.java | 4 +-
.../java/org/apache/juneau/swap/Surrogate.java | 2 +-
.../java/org/apache/juneau/swap/SurrogateSwap.java | 6 +-
.../org/apache/juneau/swaps/ByteArraySwap.java | 12 +-
.../java/org/apache/juneau/swaps/ClassSwap.java | 4 +-
.../org/apache/juneau/swaps/InputStreamSwap.java | 12 +-
.../java/org/apache/juneau/swaps/LocaleSwap.java | 4 +-
...nStringSwap.java => MarshallingStringSwap.java} | 6 +-
.../org/apache/juneau/swaps/MatchResultSwap.java | 2 +-
.../org/apache/juneau/swaps/ParsedReaderSwap.java | 2 +-
.../java/org/apache/juneau/swaps/ReaderSwap.java | 2 +-
.../apache/juneau/swaps/StackTraceElementSwap.java | 4 +-
.../org/apache/juneau/swaps/StringFormatSwap.java | 4 +-
.../apache/juneau/swaps/TemporalCalendarSwap.java | 6 +-
.../org/apache/juneau/swaps/TemporalDateSwap.java | 6 +-
.../java/org/apache/juneau/swaps/TemporalSwap.java | 8 +-
.../java/org/apache/juneau/swaps/TimeZoneSwap.java | 4 +-
.../main/java/org/apache/juneau/swaps/UrlSwap.java | 4 +-
.../juneau/swaps/XMLGregorianCalendarSwap.java | 6 +-
.../java/org/apache/juneau/swaps/ZoneIdSwap.java | 4 +-
.../java/org/apache/juneau/toml/TomlParser.java | 2 +-
.../main/java/org/apache/juneau/uon/UonParser.java | 14 +-
.../java/org/apache/juneau/uon/UonSerializer.java | 10 +-
.../juneau/urlencoding/UrlEncodingParser.java | 10 +-
.../juneau/urlencoding/UrlEncodingSerializer.java | 10 +-
.../annotation/UrlEncodingAnnotation.java | 2 +-
.../annotation/UrlEncodingApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/utils/BeanDiff.java | 12 +-
.../java/org/apache/juneau/utils/ManifestFile.java | 4 +-
...erter.java => MarshallingContextConverter.java} | 24 +-
.../java/org/apache/juneau/xml/XmlBeanMeta.java | 2 +-
.../org/apache/juneau/xml/XmlBeanPropertyMeta.java | 4 +-
.../main/java/org/apache/juneau/xml/XmlParser.java | 10 +-
.../org/apache/juneau/xml/XmlParserSession.java | 4 +-
.../java/org/apache/juneau/xml/XmlSerializer.java | 10 +-
.../apache/juneau/xml/XmlSerializerSession.java | 4 +-
.../juneau/xml/annotation/XmlAnnotation.java | 2 +-
.../juneau/xml/annotation/XmlApplyAnnotation.java | 2 +-
.../java/org/apache/juneau/yaml/YamlParser.java | 10 +-
.../org/apache/juneau/yaml/YamlSerializer.java | 12 +-
.../examples/rest/springboot/RootResources.java | 2 +-
.../apache/juneau/examples/rest/RootResources.java | 2 +-
.../juneau/examples/rest/dto/DtoExamples.java | 2 +-
.../springboot/template/RootResources.java | 2 +-
.../apache/juneau/rest/client/ResponseContent.java | 22 +-
.../org/apache/juneau/rest/client/RestClient.java | 40 ++--
.../org/apache/juneau/rest/client/RestRequest.java | 8 +-
.../apache/juneau/rest/client/RestResponse.java | 2 +-
.../juneau/http/annotation/ContactAnnotation.java | 2 +-
.../juneau/http/annotation/LicenseAnnotation.java | 2 +-
.../juneau/http/annotation/ResponseAnnotation.java | 2 +-
.../juneau/http/annotation/TagAnnotation.java | 2 +-
.../juneau/httppart/bean/RequestBeanMeta.java | 4 +-
.../juneau/httppart/bean/ResponseBeanMeta.java | 2 +-
.../apache/juneau/rest/mock/MockRestClient.java | 10 +-
.../java/org/apache/juneau/rest/RestContext.java | 20 +-
.../java/org/apache/juneau/rest/RestOpContext.java | 18 +-
.../java/org/apache/juneau/rest/RestRequest.java | 12 +-
.../java/org/apache/juneau/rest/RestResponse.java | 2 +-
.../rest/annotation/OpSwaggerAnnotation.java | 2 +-
.../juneau/rest/annotation/RestAnnotation.java | 2 +-
.../rest/annotation/RestDeleteAnnotation.java | 2 +-
.../rest/annotation/RestDestroyAnnotation.java | 2 +-
.../rest/annotation/RestEndCallAnnotation.java | 2 +-
.../juneau/rest/annotation/RestGetAnnotation.java | 2 +-
.../juneau/rest/annotation/RestInitAnnotation.java | 2 +-
.../apache/juneau/rest/annotation/RestInject.java | 2 +-
.../rest/annotation/RestInjectAnnotation.java | 2 +-
.../juneau/rest/annotation/RestOpAnnotation.java | 2 +-
.../rest/annotation/RestOptionsAnnotation.java | 2 +-
.../rest/annotation/RestPatchAnnotation.java | 2 +-
.../juneau/rest/annotation/RestPostAnnotation.java | 2 +-
.../rest/annotation/RestPostCallAnnotation.java | 2 +-
.../rest/annotation/RestPostInitAnnotation.java | 2 +-
.../rest/annotation/RestPreCallAnnotation.java | 2 +-
.../juneau/rest/annotation/RestPutAnnotation.java | 2 +-
.../rest/annotation/RestStartCallAnnotation.java | 2 +-
.../juneau/rest/annotation/SwaggerAnnotation.java | 2 +-
.../org/apache/juneau/rest/arg/FormDataArg.java | 4 +-
.../org/apache/juneau/rest/arg/HasFormDataArg.java | 2 +-
.../org/apache/juneau/rest/arg/HasQueryArg.java | 2 +-
.../java/org/apache/juneau/rest/arg/HeaderArg.java | 4 +-
.../java/org/apache/juneau/rest/arg/PathArg.java | 2 +-
.../java/org/apache/juneau/rest/arg/QueryArg.java | 4 +-
.../apache/juneau/rest/arg/RestContextArgs.java | 6 +-
.../apache/juneau/rest/beans/BeanDescription.java | 2 +-
.../juneau/rest/converter/Introspectable.java | 2 +-
.../apache/juneau/rest/converter/Queryable.java | 2 +-
.../apache/juneau/rest/converter/Traversable.java | 2 +-
.../juneau/rest/httppart/RequestAttribute.java | 2 +-
.../juneau/rest/httppart/RequestContent.java | 4 +-
.../juneau/rest/httppart/RequestFormParams.java | 2 +-
.../juneau/rest/httppart/RequestHeaders.java | 2 +-
.../juneau/rest/httppart/RequestHttpPart.java | 4 +-
.../juneau/rest/httppart/RequestPathParams.java | 2 +-
.../juneau/rest/httppart/RequestQueryParams.java | 2 +-
.../rest/processor/PlainTextPojoProcessor.java | 2 +-
.../apache/juneau/rest/rrpc/RrpcRestOpContext.java | 2 +-
.../rest/swagger/BasicSwaggerProviderSession.java | 6 +-
.../org/apache/juneau/rest/widget/Tooltip.java | 2 +-
.../apache/juneau/AnnotationInheritance_Test.java | 8 +-
.../java/org/apache/juneau/Annotations_Test.java | 10 +-
.../java/org/apache/juneau/BeanMapErrors_Test.java | 8 +-
.../test/java/org/apache/juneau/BeanMap_Test.java | 32 +--
.../org/apache/juneau/BeanPropertyValue_Test.java | 2 +-
.../juneau/BeanProxyInvocationHandler_Test.java | 2 +-
.../BeanTraverseProperties_ComboRoundTripTest.java | 12 +-
.../java/org/apache/juneau/ClassMeta_Test.java | 16 +-
.../test/java/org/apache/juneau/ComboInput.java | 4 +-
.../org/apache/juneau/ComboRoundTripTest_Base.java | 2 +-
.../org/apache/juneau/ComboRoundTrip_Tester.java | 12 +-
.../org/apache/juneau/ComboSerialize_Tester.java | 6 +-
.../org/apache/juneau/ContextSession_Test.java | 62 +++---
.../org/apache/juneau/DataConversion_Test.java | 2 +-
.../org/apache/juneau/IgnoredClasses_Test.java | 6 +-
.../org/apache/juneau/MarshalledConfig_Test.java | 34 +--
...text_Test.java => MarshallingContext_Test.java} | 42 ++--
.../java/org/apache/juneau/ObjectSwap_Test.java | 4 +-
.../java/org/apache/juneau/PojoExamplesTest.java | 40 ++--
.../juneau/ReadWriteOnlyProperties_Test.java | 2 +-
.../SerializerProperties_ComboRoundTripTest.java | 6 +-
.../juneau/a/rttests/JsonMaps_RoundTripTest.java | 2 +-
.../a/rttests/RoundTripTransformBeans_Test.java | 8 +-
.../juneau/annotation/ExampleAnnotation_Test.java | 4 +-
.../annotation/MarshalledAnnotation_Test.java | 6 +-
.../MarshalledConfigAnnotation_Test.java | 4 +-
.../annotation/MarshalledCtorAnnotation_Test.java | 4 +-
.../MarshalledIgnoreAnnotation_Test.java | 4 +-
.../juneau/annotation/MarshalledIgnore_Test.java | 6 +-
.../annotation/MarshalledPropAnnotation_Test.java | 4 +-
.../MarshalledProp_StarPlainField_Test.java | 6 +-
.../annotation/NamePropertyAnnotation_Test.java | 16 +-
.../annotation/ParentPropertyAnnotation_Test.java | 12 +-
.../juneau/annotation/SwapAnnotation_Test.java | 4 +-
.../juneau/annotation/UriAnnotation_Test.java | 4 +-
.../html5/Html5Template_ComboRoundTripTest.java | 2 +-
.../juneau/bean/openapi3/ui/OpenApiUI_Test.java | 2 +-
.../juneau/bean/swagger/ui/SwaggerUI_Test.java | 2 +-
.../bson/annotation/BsonAnnotation_Test.java | 4 +-
.../apache/juneau/cbor/CborSerializer_Test.java | 4 +-
.../juneau/commons/collections/Args_Test.java | 2 +-
.../test/java/org/apache/juneau/csv/Csv_Test.java | 8 +-
.../juneau/csv/annotation/CsvAnnotation_Test.java | 4 +-
.../java/org/apache/juneau/html/Common_Test.java | 4 +-
.../html/annotation/HtmlAnnotation_Test.java | 4 +-
.../html/annotation/HtmlLinkAnnotation_Test.java | 4 +-
.../org/apache/juneau/http/HttpParts_Test.java | 12 +-
.../http/annotation/ContactAnnotation_Test.java | 4 +-
.../http/annotation/LicenseAnnotation_Test.java | 4 +-
.../http/annotation/ResponseAnnotation_Test.java | 4 +-
.../juneau/http/annotation/TagAnnotation_Test.java | 4 +-
.../apache/juneau/httppart/UonPartParser_Test.java | 4 +-
.../org/apache/juneau/jena/RdfParser_Test.java | 8 +-
.../org/apache/juneau/jena/RdfSerializer_Test.java | 18 +-
.../java/org/apache/juneau/json/Common_Test.java | 2 +-
.../json/annotation/JsonAnnotation_Test.java | 4 +-
.../java/org/apache/juneau/json5/Common_Test.java | 2 +-
.../jsonschema/JsonSchemaConfigAnnotationTest.java | 2 +-
.../annotation/ExternalDocsAnnotation_Test.java | 4 +-
.../annotation/ItemsAnnotation_Test.java | 4 +-
.../annotation/SchemaAnnotation_Test.java | 8 +-
.../annotation/SchemaApplyAnnotation_Test.java | 6 +-
.../annotation/SubItemsAnnotation_Test.java | 4 +-
.../juneau/markdown/MarkdownAnnotation_Test.java | 20 +-
.../msgpack/annotation/MsgPackAnnotation_Test.java | 4 +-
.../oapi/annotation/OpenApiAnnotation_Test.java | 4 +-
.../juneau/objecttools/ObjectPaginator_Test.java | 2 +-
.../juneau/objecttools/ObjectSearcher_Test.java | 2 +-
.../juneau/objecttools/ObjectSorter_Test.java | 2 +-
.../juneau/objecttools/ObjectViewer_Test.java | 2 +-
.../juneau/parquet/ParquetRoundTrip_Test.java | 2 +-
.../org/apache/juneau/parser/ParserSet_Test.java | 14 +-
.../annotation/PlainTextAnnotation_Test.java | 4 +-
.../annotation/MarshalledConfig_Swaps_Test.java | 12 +-
.../rest/annotation/OpSwaggerAnnotation_Test.java | 4 +-
.../rest/annotation/RestAnnotation_Test.java | 4 +-
.../rest/annotation/RestDeleteAnnotation_Test.java | 4 +-
.../annotation/RestDestroyAnnotation_Test.java | 4 +-
.../annotation/RestEndCallAnnotation_Test.java | 4 +-
.../rest/annotation/RestGetAnnotation_Test.java | 4 +-
.../rest/annotation/RestInitAnnotation_Test.java | 4 +-
.../rest/annotation/RestOpAnnotation_Test.java | 4 +-
.../rest/annotation/RestPostAnnotation_Test.java | 4 +-
.../annotation/RestPostCallAnnotation_Test.java | 4 +-
.../annotation/RestPostInitAnnotation_Test.java | 4 +-
.../annotation/RestPreCallAnnotation_Test.java | 4 +-
.../rest/annotation/RestPutAnnotation_Test.java | 4 +-
.../annotation/RestStartCallAnnotation_Test.java | 4 +-
.../rest/annotation/SwaggerAnnotation_Test.java | 4 +-
.../client/RestClient_Config_Context_Test.java | 4 +-
...RestClient_Config_MarshallingContext_Test.java} | 8 +-
.../rest/client/RestClient_Response_Body_Test.java | 2 +-
.../client/RestClient_Response_Headers_Test.java | 4 +-
.../juneau/serializer/SerializerSet_Test.java | 14 +-
.../soap/annotation/SoapXmlAnnotation_Test.java | 4 +-
.../apache/juneau/svl/ResolvingJsonMapTest.java | 2 +-
.../juneau/testutils/pojos/SwappedObjectSwap.java | 4 +-
.../apache/juneau/transform/AutoListSwapTest.java | 10 +-
.../apache/juneau/transform/AutoMapSwapTest.java | 8 +-
.../juneau/transform/AutoNumberSwapTest.java | 8 +-
.../juneau/transform/AutoObjectSwapTest.java | 8 +-
.../org/apache/juneau/transforms/BeanMap_Test.java | 10 +-
.../juneau/transforms/DefaultSwaps_Test.java | 42 ++--
.../juneau/transforms/FunctionalSwapTest.java | 4 +-
.../InputStreamBase64_OneWayStringSwapTest.java | 4 +-
.../transforms/LocaleSwap_StringSwapTest.java | 2 +-
.../juneau/transforms/MarshalledFilter_Test.java | 8 +-
.../apache/juneau/transforms/ObjectSwapTest.java | 6 +-
.../juneau/transforms/OneWayStringSwap_Tester.java | 16 +-
.../ReaderObjectSwap_ComboSerializeTest.java | 8 +-
.../apache/juneau/transforms/ReaderSwap_Test.java | 4 +-
.../transforms/RoundTripObjectSwap_Tester.java | 22 +-
.../juneau/transforms/StringSwap_Tester.java | 22 +-
.../SwapsAnnotation_ComboSerializeTest.java | 34 +--
.../TemporalCalendarSwap_StringSwapTest.java | 8 +-
.../TemporalDateSwap_StringSwapTest.java | 8 +-
.../transforms/TemporalSwap_StringSwapTest.java | 8 +-
.../java/org/apache/juneau/uon/Common_UonTest.java | 2 +-
.../juneau/uon/annotation/UonAnnotation_Test.java | 4 +-
.../juneau/urlencoding/Common_UrlEncodingTest.java | 2 +-
.../juneau/urlencoding/UrlEncodingParser_Test.java | 2 +-
.../annotation/UrlEncodingAnnotation_Test.java | 4 +-
.../juneau/utest/utils/FakeReaderParser.java | 4 +-
.../org/apache/juneau/utils/BeanDiff_Test.java | 2 +-
.../org/apache/juneau/utils/FilteredMapTest.java | 4 +-
.../org/apache/juneau/utils/ManifestFile_Test.java | 2 +-
.../java/org/apache/juneau/xml/Common_Test.java | 2 +-
.../juneau/xml/annotation/XmlAnnotation_Test.java | 4 +-
todo/FINISHED-16a-per-setting-inventory.md | 30 +--
todo/FINISHED-29.md | 14 +-
todo/TODO-11-restclient2-transport-abstraction.md | 8 +-
todo/TODO-12-schema-validation.md | 24 +-
...-13-system-properties-to-settings-conversion.md | 4 +-
todo/TODO-9-markdown-remaining-issues.md | 6 +-
todo/TODO.md | 2 +-
430 files changed, 1965 insertions(+), 1965 deletions(-)
diff --git a/RELEASE-NOTES.txt b/RELEASE-NOTES.txt
index 9d3989c9d9..f549ce67c2 100644
--- a/RELEASE-NOTES.txt
+++ b/RELEASE-NOTES.txt
@@ -114,11 +114,11 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
* Session.Builder.property(String, Object) and properties(Map) now dispatch to typed
session-level setter methods, enabling per-request override of serializer/parser configuration.
- * Both short names (e.g., "locale") and fully-qualified names (e.g., "BeanSession.locale") are
+ * Both short names (e.g., "locale") and fully-qualified names (e.g., "MarshallingSession.locale") are
accepted as property keys.
* New properties exposed as session-level overrides:
- ParserSession: trimStrings
- - BeanTraverseSession: initialDepth
+ - MarshallingTraverseSession: initialDepth
- SerializerSession: keepNullProperties, trimStrings, addBeanTypes, addRootType,
sortCollections, sortMaps, trimEmptyCollections, trimEmptyMaps
- WriterSerializerSession: maxIndent, quoteChar
@@ -167,7 +167,7 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
JSON5 syntax (single quotes, trailing commas, comments, etc.).
* JsonSerializer.json5() and JsonParser.Strict have been removed. Use Json5Serializer
and Json5Parser directly for JSON5 support.
- * BeanContext.beanToStringSerializer now uses Json5Serializer for toString() output
+ * MarshallingContext.beanToStringSerializer now uses Json5Serializer for toString() output
(more human-readable with single quotes).
* ComboRoundTripTest framework now distinguishes json vs json5; use json()/json5()
builder methods on ComboRoundTrip_Tester accordingly.
@@ -204,13 +204,13 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
* Default date/time swaps removed from DefaultSwaps; existing swap classes
(TemporalCalendarSwap, TemporalDateSwap, CalendarSwap, DateSwap, TemporalSwap)
remain available as override mechanisms for customizing output format.
- * BeanSession.convertToMemberType() and SerializerSession.toString() updated to
+ * MarshallingSession.convertToMemberType() and SerializerSession.toString() updated to
use ISO 8601 formatting for date/time/Duration types.
* All parser sessions updated with date/time/Duration dispatch in parseAnything().
** New Features - Converter Framework (juneau-commons)
- * New org.apache.juneau.commons.conversion package providing a lightweight, BeanContext-free
+ * New org.apache.juneau.commons.conversion package providing a lightweight, MarshallingContext-free
type conversion framework:
* Converter interface:
@@ -231,7 +231,7 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
* BasicConverter class:
- Concrete CachingConverter with a thread-safe BasicConverter.INSTANCE singleton.
- - Supports a wide range of common conversions without requiring BeanContext/BeanSession:
+ - Supports a wide range of common conversions without requiring MarshallingContext/MarshallingSession:
- Identity / widening cast (any type to same or supertype).
- Numeric narrowing/widening: Number to Integer, Long, Short, Float, Double, Byte,
AtomicInteger, AtomicLong, and primitive equivalents.
@@ -259,8 +259,8 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
- Message format: "Cannot convert <inType> to <outType>".
- Callers can pre-check with canConvert() to avoid the exception.
- * BeanContextConverter (renamed from GenericConverter) in org.apache.juneau.utils:
- - Implements Converter and delegates to the default BeanContext session for type conversion.
+ * MarshallingContextConverter (renamed from GenericConverter) in org.apache.juneau.utils:
+ - Implements Converter and delegates to the default MarshallingContext session for type conversion.
- Provides access to the full Juneau framework conversion logic including bean mapping.
** New Features - Large-Dataset Streaming APIs (BeanSupplier / BeanConsumer / BeanChannel)
@@ -311,7 +311,7 @@ Release Notes - Juneau - Version 9.2.1 - YYYY-MM-DD
* BeanFactory<T> (juneau-commons) - universal @FunctionalInterface for creating instances of any
type T; BeanFactory.Void is a sentinel class for annotation defaults.
- * BeanContext.Builder.beanStore(BeanStore) - new builder method for injecting a BeanStore (e.g.
+ * MarshallingContext.Builder.beanStore(BeanStore) - new builder method for injecting a BeanStore (e.g.
SpringBeanStore) for factory resolution during bean creation.
Release Notes - Juneau - Version 9.2.0 - 2025-12-30
@@ -486,7 +486,7 @@ Release Notes - Juneau - Version 8.2.0 - 2020-10-01
* [JUNEAU-208] - Version 7.2.2 is missing from https://juneau.apache.org/#whatsnew.html
* [JUNEAU-227] - BEAN_methodVisibility and BEAN_constructorVisibility doesn't affect swap methods.
* [JUNEAU-228] - Make it easier to create bean filters programmatically.
- * [JUNEAU-235] - New BeanInterceptor API for intercepting calls to getters/setters.
+ * [JUNEAU-235] - New MarshallingInterceptor API for intercepting calls to getters/setters.
* [JUNEAU-236] - BEAN_addRootType doesn't work without BEAN_addBeanTypes
* [JUNEAU-240] - RestContext should be subclassible.
diff --git a/docs/src/javadoc/overview.html b/docs/src/javadoc/overview.html
index c1006d7e38..d2a893d7a9 100644
--- a/docs/src/javadoc/overview.html
+++ b/docs/src/javadoc/overview.html
@@ -25,7 +25,7 @@
<li><strong>Microservices</strong> - Build lightweight, standalone microservices with embedded Jetty</li>
<li><strong>Configuration Management</strong> - Sophisticated configuration file API with variable resolution</li>
<li><strong>Fluent Assertions</strong> - Powerful testing framework with fluent-style assertions</li>
- <li><strong>Type Conversion</strong> - Lightweight, BeanContext-free converter framework with caching and broad type support</li>
+ <li><strong>Type Conversion</strong> - Lightweight, MarshallingContext-free converter framework with caching and broad type support</li>
<li><strong>Large-Dataset Streaming</strong> - BeanSupplier/BeanConsumer/BeanChannel APIs for serializing and parsing large datasets without loading all elements into memory; supports direct database integration via lifecycle methods (begin/acceptThrows/onError/complete)</li>
<li><strong>Zero Dependencies</strong> - Core marshalling requires no external dependencies</li>
</ul>
diff --git a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/package2.html b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/package2.html
index b45a1662e7..2c063344e7 100644
--- a/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/package2.html
+++ b/juneau-bean/juneau-bean-html5/src/main/java/org/apache/juneau/bean/html5/package2.html
@@ -218,7 +218,7 @@
<p>
The following example shows how an HTML5 form template object can be created that gets serialized as a
populated HTML5 {@link org.apache.juneau.bean.html5.Form} bean.
- It takes advantage of the special <code>swap(BeanSession)</code> method that serializers will use to
+ It takes advantage of the special <code>swap(MarshallingSession)</code> method that serializers will use to
convert the object to a serialized form before serialization.
The return type of this method can be any serializable type.
In this case, we are defining a template for a reusable HTML form with two simple fields.
@@ -245,7 +245,7 @@
<jc>// Special swap method that converts this template to a serializable bean,
// in this case an HTML5 Form bean. </jc>
- <jk>public</jk> Form swap(BeanSession <jv>session</jv>) {
+ <jk>public</jk> Form swap(MarshallingSession <jv>session</jv>) {
<jk>return</jk> <jsm>form</jsm>(<jf>action</jf>,
<jsm>input</jsm>(<js>"text"</js>).name(<js>"v1"</js>).value(<jf>value1</jf>),
<jsm>input</jsm>(<js>"text"</js>).name(<js>"v2"</js>).value(<jf>value2</jf>)
@@ -295,7 +295,7 @@
<jk>this</jk>.<jf>value2</jf> = <jv>value2</jv>;
}
- <jk>public</jk> Form swap(BeanSession <jv>session</jv>) {
+ <jk>public</jk> Form swap(MarshallingSession <jv>session</jv>) {
<jk>return</jk> <jsm>form</jsm>(<jf>action</jf>,
<jsm>input</jsm>(<js>"text"</js>).name(<js>"v1"</js>).value(<jf>value1</jf>),
<jsm>input</jsm>(<js>"text"</js>).name(<js>"v2"</js>).value(<jf>value2</jf>)
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 3750851ee5..b6e6f598eb 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
@@ -218,12 +218,12 @@ public class JsonSchema {
public static class BooleanOrSchemaArraySwap extends ObjectSwap<Object,Object> {
@Override /* Overridden from ObjectSwap */
- public Object swap(BeanSession session, Object o) throws SerializeException {
+ public Object swap(MarshallingSession session, Object o) throws SerializeException {
return o;
}
@Override /* Overridden from ObjectSwap */
- public Object unswap(BeanSession session, Object o, ClassMeta<?> hint) throws ParseException {
+ public Object unswap(MarshallingSession session, Object o, ClassMeta<?> hint) throws ParseException {
var cm = (o instanceof Collection ? session.getClassMeta(JsonSchemaArray.class) : session.getClassMeta(Boolean.class));
return session.convertToType(o, cm);
}
@@ -245,12 +245,12 @@ public class JsonSchema {
public static class BooleanOrSchemaSwap extends ObjectSwap<Object,Object> {
@Override /* Overridden from ObjectSwap */
- public Object swap(BeanSession session, Object o) throws SerializeException {
+ public Object swap(MarshallingSession session, Object o) throws SerializeException {
return o;
}
@Override /* Overridden from ObjectSwap */
- public Object unswap(BeanSession session, Object o, ClassMeta<?> hint) throws ParseException {
+ public Object unswap(MarshallingSession session, Object o, ClassMeta<?> hint) throws ParseException {
var cm = (o instanceof Boolean ? session.getClassMeta(Boolean.class) : session.getClassMeta(JsonSchema.class));
return session.convertToType(o, cm);
}
@@ -272,12 +272,12 @@ public class JsonSchema {
public static class JsonSchemaOrSchemaArraySwap extends ObjectSwap<Object,Object> {
@Override /* Overridden from ObjectSwap */
- public Object swap(BeanSession session, Object o) throws SerializeException {
+ public Object swap(MarshallingSession session, Object o) throws SerializeException {
return o;
}
@Override /* Overridden from ObjectSwap */
- public Object unswap(BeanSession session, Object o, ClassMeta<?> hint) throws ParseException {
+ public Object unswap(MarshallingSession session, Object o, ClassMeta<?> hint) throws ParseException {
var cm = (o instanceof Collection ? session.getClassMeta(JsonSchemaArray.class) : session.getClassMeta(JsonSchema.class));
return session.convertToType(o, cm);
}
@@ -299,12 +299,12 @@ public class JsonSchema {
public static class JsonTypeOrJsonTypeArraySwap extends ObjectSwap<Object,Object> {
@Override /* Overridden from ObjectSwap */
- public Object swap(BeanSession session, Object o) throws SerializeException {
+ public Object swap(MarshallingSession session, Object o) throws SerializeException {
return o;
}
@Override /* Overridden from ObjectSwap */
- public Object unswap(BeanSession session, Object o, ClassMeta<?> hint) throws ParseException {
+ public Object unswap(MarshallingSession session, Object o, ClassMeta<?> hint) throws ParseException {
var cm = (o instanceof Collection ? session.getClassMeta(JsonTypeArray.class) : session.getClassMeta(JsonType.class));
return session.convertToType(o, cm);
}
diff --git a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
index 8c0f145909..3fec96825f 100644
--- a/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
+++ b/juneau-bean/juneau-bean-openapi-v3/src/main/java/org/apache/juneau/bean/openapi3/ui/OpenApiUI.java
@@ -379,7 +379,7 @@ public class OpenApiUI extends ObjectSwap<OpenApi,Div> {
}
@Override
- public Div swap(BeanSession beanSession, OpenApi openApi) throws Exception {
+ public Div swap(MarshallingSession marshallingSession, OpenApi openApi) throws Exception {
var s = new Session(openApi);
diff --git a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ui/SwaggerUI.java b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ui/SwaggerUI.java
index 7c79e46ae6..ee6331713a 100644
--- a/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ui/SwaggerUI.java
+++ b/juneau-bean/juneau-bean-swagger-v2/src/main/java/org/apache/juneau/bean/swagger/ui/SwaggerUI.java
@@ -407,7 +407,7 @@ public class SwaggerUI extends ObjectSwap<Swagger,Div> {
}
@Override
- public Div swap(BeanSession beanSession, Swagger swagger) throws Exception {
+ public Div swap(MarshallingSession marshallingSession, Swagger swagger) throws Exception {
// @formatter:off
var s = new Session(swagger);
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 a7d37e35fc..d9b344511f 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
@@ -84,7 +84,7 @@ import static org.apache.juneau.commons.utils.CollectionUtils.*;
*/
// java:S2160: Intentionally inherit equals/hashCode from AnnotationObject. Overriding would require
// instanceof AppliedOnClassAnnotationObject, which breaks comparison with declarative annotations (JDK proxies),
-// causing BeanContext/PropertyStore cache misses and schema validation failures (see XmlAnnotation_Test, FormData_Test).
+// causing MarshallingContext/PropertyStore cache misses and schema validation failures (see XmlAnnotation_Test, FormData_Test).
@SuppressWarnings({
"java:S2160" // Inherits equals/hashCode from parent; annotation identity based on type and attributes
})
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/BasicConverter.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/BasicConverter.java
index f6dcd26ed2..c82cfd1f15 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/BasicConverter.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/BasicConverter.java
@@ -30,7 +30,7 @@ import org.apache.juneau.commons.reflect.*;
/**
* A concrete {@link CachingConverter} that supports common type conversions without
- * requiring a {@code BeanContext} or {@code BeanSession}.
+ * requiring a {@code MarshallingContext} or {@code MarshallingSession}.
*
* <p>
* The following conversions are supported:
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/Converter.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/Converter.java
index bb66211758..e89f59669c 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/Converter.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/conversion/Converter.java
@@ -23,7 +23,7 @@ import java.lang.reflect.*;
*
* <p>
* Use {@link BasicConverter#INSTANCE} for a default singleton implementation that supports
- * a wide range of common type conversions without requiring a {@code BeanContext} or {@code BeanSession}.
+ * a wide range of common type conversions without requiring a {@code MarshallingContext} or {@code MarshallingSession}.
*/
public interface Converter {
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 3a47d13dce..bbe9894522 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
@@ -416,7 +416,7 @@
* <jk>private</jk> ApplicationContext <jv>appCtx</jv>;
*
* <ja>@Override</ja>
- * <jk>protected</jk> BeanContext.Builder createBeanContext(RestContext.Builder <jv>rcBuilder</jv>) {
+ * <jk>protected</jk> MarshallingContext.Builder createBeanContext(RestContext.Builder <jv>rcBuilder</jv>) {
* <jk>return super</jk>.createBeanContext(<jv>rcBuilder</jv>)
* .beanStore(<jk>new</jk> SpringBeanStore(<jv>appCtx</jv>));
* }
diff --git a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/Visibility.java b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/Visibility.java
index 524072dab5..1655fee977 100644
--- a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/Visibility.java
+++ b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/reflect/Visibility.java
@@ -30,10 +30,10 @@ import java.lang.reflect.*;
* <p>
* Used in conjunction with the following bean context properties:
* <ul class='javatree'>
- * <li class='jm'>BeanContext.Builder.beanConstructorVisibility
- * <li class='jm'>BeanContext.Builder.beanClassVisibility
- * <li class='jm'>BeanContext.Builder.beanFieldVisibility
- * <li class='jm'>BeanContext.Builder.beanMethodVisibility
+ * <li class='jm'>MarshallingContext.Builder.beanConstructorVisibility
+ * <li class='jm'>MarshallingContext.Builder.beanClassVisibility
+ * <li class='jm'>MarshallingContext.Builder.beanFieldVisibility
+ * <li class='jm'>MarshallingContext.Builder.beanMethodVisibility
* </ul>
*
*/
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
index 3a6772dcb8..2b3c6e65f7 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Config.java
@@ -586,7 +586,7 @@ public class Config extends Context implements ConfigEventListener {
protected final boolean readOnly;
protected final int binaryLineLength;
protected final BinaryFormat binaryFormat;
- protected final BeanSession beanSession;
+ protected final MarshallingSession marshallingSession;
protected final ConfigStore store;
protected final Map<Character,Mod> mods;
protected final ReaderParser parser;
@@ -619,13 +619,13 @@ public class Config extends Context implements ConfigEventListener {
varResolver = builder.varResolver;
configMap = store.getMap(name);
configMap.register(this);
- beanSession = parser.getBeanContext().getSession();
+ marshallingSession = parser.getMarshallingContext().getSession();
varSession = varResolver.copy().vars(ConfigVar.class).bean(Config.class, this).build().createSession();
}
Config(Config copyFrom, VarResolverSession varSession) {
super(copyFrom);
- beanSession = copyFrom.beanSession;
+ marshallingSession = copyFrom.marshallingSession;
binaryFormat = copyFrom.binaryFormat;
binaryLineLength = copyFrom.binaryLineLength;
configMap = copyFrom.configMap;
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Entry.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Entry.java
index 30adfc4af1..ad32643437 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Entry.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Entry.java
@@ -134,7 +134,7 @@ public class Entry {
if (isEmpty())
return opte();
if (isSimpleType(type))
- return opt((T)config.beanSession.convertToType(v, (Class<?>)type));
+ return opt((T)config.marshallingSession.convertToType(v, (Class<?>)type));
if (parser instanceof JsonParser) {
var s1 = firstNonWhitespaceChar(v);
diff --git a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
index 40c3b359cd..4050e81560 100644
--- a/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
+++ b/juneau-core/juneau-config/src/main/java/org/apache/juneau/config/Section.java
@@ -117,7 +117,7 @@ public class Section {
var keys = configMap.getKeys(name);
- var bm = config.beanSession.newBeanMap(c);
+ var bm = config.marshallingSession.newBeanMap(c);
for (var k : keys) {
var bpm = bm.getPropertyMeta(k);
if (bpm == null) {
@@ -256,7 +256,7 @@ public class Section {
var keys = configMap.getKeys(name);
- var bm = config.beanSession.toBeanMap(bean);
+ var bm = config.marshallingSession.toBeanMap(bean);
for (var k : keys) {
var bpm = bm.getPropertyMeta(k);
if (bpm == null) {
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
index 978c715275..53ef2c4adb 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfBeanPropertyMeta.java
@@ -53,7 +53,7 @@ public class RdfBeanPropertyMeta extends ExtendedBeanPropertyMeta {
public RdfBeanPropertyMeta(BeanPropertyMeta bpm, RdfMetaProvider mp) {
super(bpm);
- var ap = bpm.getClassMeta().getBeanContext().getAnnotationProvider();
+ var ap = bpm.getClassMeta().getMarshallingContext().getAnnotationProvider();
var rdfs = new MultiList<>(
rstream(ap.find(Rdf.class, bpm.getBeanMeta().getClassMeta())).map(AnnotationInfo::inner).toList(),
reverse(bpm.getAnnotations(Rdf.class).map(AnnotationInfo::inner).toList())
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
index c780ea640e..9b3824d25b 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfParser.java
@@ -192,14 +192,14 @@ public class RdfParser extends ReaderParser implements RdfMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -216,7 +216,7 @@ public class RdfParser extends ReaderParser implements RdfMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
index ed9e3b4fa5..b6ac1c4e96 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/RdfSerializer.java
@@ -334,14 +334,14 @@ public class RdfSerializer extends WriterSerializer implements RdfMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -358,7 +358,7 @@ public class RdfSerializer extends WriterSerializer implements RdfMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java
index e1640db247..3472f82029 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfAnnotation.java
@@ -36,7 +36,7 @@ public class RdfAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfApplyAnnotation.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfApplyAnnotation.java
index 7e8d040984..75a263b447 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfApplyAnnotation.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/jena/annotation/RdfApplyAnnotation.java
@@ -64,7 +64,7 @@ public class RdfApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/N3.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/N3.java
index 236ca17a43..732ee0e716 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/N3.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/N3.java
@@ -172,7 +172,7 @@ public class N3 extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -211,7 +211,7 @@ public class N3 extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/NTriple.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/NTriple.java
index 5001bbab61..e446ff3f10 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/NTriple.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/NTriple.java
@@ -173,7 +173,7 @@ public class NTriple extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -212,7 +212,7 @@ public class NTriple extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXml.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXml.java
index 5e5d865633..c41dbca21b 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXml.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXml.java
@@ -184,7 +184,7 @@ public class RdfXml extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -223,7 +223,7 @@ public class RdfXml extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXmlAbbrev.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXmlAbbrev.java
index 969d808b40..dc3da7d57b 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXmlAbbrev.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/RdfXmlAbbrev.java
@@ -184,7 +184,7 @@ public class RdfXmlAbbrev extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -223,7 +223,7 @@ public class RdfXmlAbbrev extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/Turtle.java b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/Turtle.java
index a02a00a817..11efacc1cf 100644
--- a/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/Turtle.java
+++ b/juneau-core/juneau-marshall-rdf/src/main/java/org/apache/juneau/marshaller/Turtle.java
@@ -173,7 +173,7 @@ public class Turtle extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -212,7 +212,7 @@ public class Turtle extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
index ae07d78ad0..2a159fba17 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
@@ -32,7 +32,7 @@ import org.apache.juneau.commons.utils.*;
import org.apache.juneau.svl.*;
/**
- * Class used to add properties to a context builder (e.g. {@link BeanContext.Builder}) from an annotation (e.g. {@link MarshalledConfig}).
+ * Class used to add properties to a context builder (e.g. {@link MarshallingContext.Builder}) from an annotation (e.g. {@link MarshalledConfig}).
*
* <p>
* Used by {@link Context.Builder#applyAnnotations(Class...)} and {@link Context.Builder#applyAnnotations(Object...)} to apply
@@ -53,15 +53,15 @@ import org.apache.juneau.svl.*;
* }
*
* <jc>// The applier that applies the annotation to the bean context builder.</jc>
- * <jk>public class</jk> MarshalledConfigAnnotationApplier <jk>extends</jk> AnnotationApplier<<ja>MarshalledConfig</ja>,BeanContext.Builder> {
+ * <jk>public class</jk> MarshalledConfigAnnotationApplier <jk>extends</jk> AnnotationApplier<<ja>MarshalledConfig</ja>,MarshallingContext.Builder> {
*
* <jc>// Required constructor. </jc>
* <jk>public</jk> Applier(VarResolverSession <jv>vr</jv>) {
- * <jk>super</jk>(MarshalledConfig.<jk>class</jk>, BeanContext.Builder.<jk>class</jk>, <jv>vr</jv>);
+ * <jk>super</jk>(MarshalledConfig.<jk>class</jk>, MarshallingContext.Builder.<jk>class</jk>, <jv>vr</jv>);
* }
*
* <ja>@Override</ja>
- * <jk>public void</jk> apply(AnnotationInfo<MarshalledConfig> <jv>annotationInfo</jv>, BeanContext.Builder <jv>builder</jv>) {
+ * <jk>public void</jk> apply(AnnotationInfo<MarshalledConfig> <jv>annotationInfo</jv>, MarshallingContext.Builder <jv>builder</jv>) {
* <ja>MarshalledConfig</ja> <jv>beanConfig</jv> = <jv>annotationInfo</jv>.getAnnotation();
*
* String <jv>unsortedProperties</jv> = <jv>beanConfig</jv>.unsortedProperties();
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 1b647484f9..1fc104274f 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
@@ -43,7 +43,7 @@ import org.apache.juneau.swap.*;
* object can be accessed using the {@link Map#get(Object) get()} and {@link Map#put(Object,Object) put()} methods.
*
* <p>
- * Use the {@link BeanContext} class to create instances of this class.
+ * Use the {@link MarshallingContext} class to create instances of this class.
*
* <h5 class='topic'>Bean property order</h5>
*
@@ -80,7 +80,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
* @return A new {@link BeanMap} instance wrapping the bean.
*/
public static <T> BeanMap<T> of(T bean) {
- return BeanContext.DEFAULT_SESSION.toBeanMap(bean);
+ return MarshallingContext.DEFAULT_SESSION.toBeanMap(bean);
}
/** The wrapped object. */
@@ -94,18 +94,18 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
/** The BeanMeta associated with the class of the object. */
protected BeanMeta<T> meta;
- private final BeanSession session;
+ private final MarshallingSession session;
private final String typePropertyName;
/**
- * Instance of this class are instantiated through the BeanContext class.
+ * Instance of this class are instantiated through the MarshallingContext class.
*
* @param session The bean session object that created this bean map.
* @param bean The bean to wrap inside this map.
* @param meta The metadata associated with the bean class.
*/
- protected BeanMap(BeanSession session, T bean, BeanMeta<T> meta) {
+ protected BeanMap(MarshallingSession session, T bean, BeanMeta<T> meta) {
this.session = session;
this.bean = bean;
this.meta = meta;
@@ -127,7 +127,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
public void add(String property, Object value) {
var p = getPropertyMeta(property);
if (p == null) {
- if (meta.getBeanContext().isIgnoreUnknownBeanProperties())
+ if (meta.getMarshallingContext().isIgnoreUnknownBeanProperties())
return;
throw bex(meta.getClassMeta(), "Bean property ''{0}'' not found.", property);
}
@@ -310,10 +310,10 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
* <jv>person</jv>.setBirthDate(<jk>new</jk> Date(1, 2, 3, 4, 5, 6));
*
* <jc>// Create a bean context and add the ISO8601 date-time swap</jc>
- * BeanContext <jv>beanContext</jv> = BeanContext.<jsm>create</jsm>().swaps(DateSwap.ISO8601DT.<jk>class</jk>).build();
+ * MarshallingContext <jv>marshallingContext</jv> = MarshallingContext.<jsm>create</jsm>().swaps(DateSwap.ISO8601DT.<jk>class</jk>).build();
*
* <jc>// Wrap our bean in a bean map</jc>
- * BeanMap<Person> <jv>beanMap</jv> = <jv>beanContext</jv>.toBeanMap(<jv>person</jv>);
+ * BeanMap<Person> <jv>beanMap</jv> = <jv>marshallingContext</jv>.toBeanMap(<jv>person</jv>);
*
* <jc>// Get the field as a string (i.e. "'1901-03-03T04:05:06-5000'")</jc>
* String <jv>birthDate</jv> = <jv>beanMap</jv>.get(<js>"birthDate"</js>);
@@ -428,7 +428,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
var propName = props.get(i);
var rawVal = propertyCache.remove(propName);
// Convert value to expected property type if it's not already the correct type.
- // Uses the same logic as BeanSession.convertToMemberType's early-return check:
+ // Uses the same logic as MarshallingSession.convertToMemberType's early-return check:
// collections/maps with specific element/value types always need conversion.
if (rawVal != null) {
var pm = getPropertyMeta(propName);
@@ -462,7 +462,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
*
* @return The bean session that created this bean map.
*/
- public final BeanSession getBeanSession() { return session; }
+ public final MarshallingSession getMarshallingSession() { return session; }
/**
* Returns the {@link ClassMeta} of the wrapped bean.
@@ -625,10 +625,10 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
* Person <jv>person</jv> = <jk>new</jk> Person();
*
* <jc>// Create a bean context and add the ISO8601 date-time swap</jc>
- * BeanContext <jv>beanContext</jv> = BeanContext.<jsm>create</jsm>().swaps(DateSwap.ISO8601DT.<jk>class</jk>).build();
+ * MarshallingContext <jv>marshallingContext</jv> = MarshallingContext.<jsm>create</jsm>().swaps(DateSwap.ISO8601DT.<jk>class</jk>).build();
*
* <jc>// Wrap our bean in a bean map</jc>
- * BeanMap<Person> <jv>beanMap</jv> = <jv>beanContext</jv>.toBeanMap(<jv>person</jv>);
+ * BeanMap<Person> <jv>beanMap</jv> = <jv>marshallingContext</jv>.toBeanMap(<jv>person</jv>);
*
* <jc>// Set the field</jc>
* <jv>beanMap</jv>.put(<js>"birthDate"</js>, <js>"'1901-03-03T04:05:06-5000'"</js>);
@@ -652,7 +652,7 @@ public class BeanMap<T> extends AbstractMap<String,Object> implements Delegate<T
public Object put(String property, Object value) {
var p = getPropertyMeta(property);
if (p == null) {
- if (meta.getBeanContext().isIgnoreUnknownBeanProperties() || property.equals(typePropertyName))
+ if (meta.getMarshallingContext().isIgnoreUnknownBeanProperties() || property.equals(typePropertyName))
return meta.onWriteProperty(bean, property, null);
p = getPropertyMeta("*");
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMapEntry.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMapEntry.java
index afbb52f414..ef94157713 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMapEntry.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanMapEntry.java
@@ -33,7 +33,7 @@ import org.apache.juneau.swap.*;
* Person <jv>person</jv> = <jk>new</jk> Person();
*
* <jc>// Wrap it in a bean map</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jv>person</jv>);
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jv>person</jv>);
*
* <jc>// Get a reference to the birthDate property</jc>
* BeanMapEntry <jv>birthDate</jv> = <jv>beanMap</jv>.getProperty(<js>"birthDate"</js>);
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 8082d63efb..7e05d4abfd 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
@@ -194,7 +194,7 @@ public class BeanMeta<T> {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Create bean metadata for a class</jc>
- * ClassMeta<Person> <jv>cm</jv> = <jv>beanContext</jv>.getClassMeta(Person.<jk>class</jk>);
+ * ClassMeta<Person> <jv>cm</jv> = <jv>marshallingContext</jv>.getClassMeta(Person.<jk>class</jk>);
* BeanMetaValue<Person> <jv>result</jv> = BeanMeta.<jsm>create</jsm>(<jv>cm</jv>, <jk>null</jk>, <jk>null</jk>, <jk>null</jk>);
*
* <jc>// Check if it's a bean</jc>
@@ -214,7 +214,7 @@ public class BeanMeta<T> {
*/
public static <T> BeanMetaValue<T> create(ClassMeta<T> cm, ClassInfo implClass) {
try {
- var bc = cm.getBeanContext();
+ var bc = cm.getMarshallingContext();
var ap = bc.getAnnotationProvider();
// Sanity checks first.
@@ -299,7 +299,7 @@ public class BeanMeta<T> {
* @see MarshalledFilter
*/
private static <T> MarshalledFilter findMarshalledFilter(ClassMeta<T> cm) {
- var ap = cm.getBeanContext().getAnnotationProvider();
+ var ap = cm.getMarshallingContext().getAnnotationProvider();
var l = ap.find(Marshalled.class, cm);
if (l.isEmpty())
return null;
@@ -350,7 +350,7 @@ 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 MarshallingContext marshallingContext; // The bean context that created this metadata object.
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.
@@ -400,17 +400,17 @@ public class BeanMeta<T> {
})
protected BeanMeta(ClassMeta<T> cm, MarshalledFilter bf, String[] pNames, ClassInfo implClass) {
classMeta = cm;
- beanContext = cm.getBeanContext();
+ marshallingContext = cm.getMarshallingContext();
beanFilter = bf;
implClassConstructor = opt(implClass).map(x -> x.getPublicConstructor(x2 -> x2.hasNumParameters(0)).orElse(null)).orElse(null);
- fluentSetters = beanContext.isFindFluentSetters() || (nn(bf) && bf.isFluentSetters());
+ fluentSetters = marshallingContext.isFindFluentSetters() || (nn(bf) && bf.isFluentSetters());
stopClass = opt(bf).map(x -> x.getStopClass()).orElse(info(Object.class));
beanRegistry = memoize(this::findBeanRegistry);
classHierarchy = memoize(this::findClassHierarchy);
beanConstructor = findBeanConstructor();
// Local variables for initialization
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var c = cm.inner();
var ci = cm;
String notABeanReasonTemp = null;
@@ -421,12 +421,12 @@ public class BeanMeta<T> {
var dynaPropertyValue = Value.<BeanPropertyMeta>empty();
var unsortedPropertiesTemp = false;
var ba = ap.find(Marshalled.class, cm);
- var propertyNamer = opt(bf).map(x -> x.getPropertyNamer()).orElse(beanContext.getPropertyNamer());
+ var propertyNamer = opt(bf).map(x -> x.getPropertyNamer()).orElse(marshallingContext.getPropertyNamer());
- this.typePropertyName = ba.stream().map(x -> x.inner().typePropertyName()).filter(Utils::ne).findFirst().orElseGet(beanContext::getBeanTypePropertyName);
+ this.typePropertyName = ba.stream().map(x -> x.inner().typePropertyName()).filter(Utils::ne).findFirst().orElseGet(marshallingContext::getBeanTypePropertyName);
// Check if constructor is required but not found (records are exempt since they use canonical constructors)
- if (! beanConstructor.constructor().isPresent() && bf == null && beanContext.isBeansRequireDefaultConstructor() && ! ci.isRecord())
+ if (! beanConstructor.constructor().isPresent() && bf == null && marshallingContext.isBeansRequireDefaultConstructor() && ! ci.isRecord())
notABeanReasonTemp = "Class does not have the required no-arg constructor";
var bfo = opt(bf);
@@ -439,7 +439,7 @@ public class BeanMeta<T> {
// ensure that ordering first.
fixedBeanProps.forEach(x -> normalProps.put(x, BeanPropertyMeta.builder(this, x)));
- if (beanContext.isUseJavaBeanIntrospector()) {
+ if (marshallingContext.isUseJavaBeanIntrospector()) {
var c2 = bfo.map(x -> x.getInterfaceClass()).filter(Objects::nonNull).orElse(classMeta);
BeanInfo bi = null;
if (! c2.isInterface())
@@ -540,10 +540,10 @@ public class BeanMeta<T> {
}
// Make sure at least one property was found (records with no components are exempt).
- if (bf == null && beanContext.isBeansRequireSomeProperties() && normalProps.isEmpty() && ! ci.isRecord())
+ if (bf == null && marshallingContext.isBeansRequireSomeProperties() && normalProps.isEmpty() && ! ci.isRecord())
notABeanReasonTemp = "No properties detected on bean class";
- unsortedPropertiesTemp = beanContext.isUnsortedProperties() || bfo.map(x -> x.isUnsortedProperties()).orElse(false) || !fixedBeanProps.isEmpty();
+ unsortedPropertiesTemp = marshallingContext.isUnsortedProperties() || bfo.map(x -> x.isUnsortedProperties()).orElse(false) || !fixedBeanProps.isEmpty();
propertiesValue.set(unsortedPropertiesTemp ? map() : sortedMap());
@@ -599,9 +599,9 @@ public class BeanMeta<T> {
setterProps = u(setterPropsMap);
dynaProperty = dynaPropertyValue.get();
unsortedProperties = unsortedPropertiesTemp;
- typeProperty = BeanPropertyMeta.builder(this, typePropertyName).canRead().canWrite().rawMetaType(beanContext.string()).beanRegistry(beanRegistry.get()).build();
+ typeProperty = BeanPropertyMeta.builder(this, typePropertyName).canRead().canWrite().rawMetaType(marshallingContext.string()).beanRegistry(beanRegistry.get()).build();
dictionaryName = memoize(this::findDictionaryName);
- beanProxyInvocationHandler = memoize(()->beanContext.isUseInterfaceProxies() && c.isInterface() ? new BeanProxyInvocationHandler<>(this) : null);
+ beanProxyInvocationHandler = memoize(()->marshallingContext.isUseInterfaceProxies() && c.isInterface() ? new BeanProxyInvocationHandler<>(this) : null);
var factoryClassTemp = ba.stream().map(x -> x.inner().factory()).filter(x -> x != org.apache.juneau.commons.function.BeanFactory.Void.class).findFirst().orElse(null);
factoryClass = factoryClassTemp;
}
@@ -614,7 +614,7 @@ public class BeanMeta<T> {
if (p.field == null)
findInnerBeanField(p.name).ifPresent(p::setInnerField);
- if (p.validate(beanContext, beanRegistry.get(), typeVarImpls, readOnlyProps, writeOnlyProps)) {
+ if (p.validate(marshallingContext, beanRegistry.get(), typeVarImpls, readOnlyProps, writeOnlyProps)) {
if (nn(p.getter))
getterProps.put(p.getter.inner(), p.name);
@@ -743,12 +743,12 @@ public class BeanMeta<T> {
* The value is determined from:
* <ul>
* <li>The {@link Bean#typePropertyName() @Marshalled(typePropertyName)} annotation on the class, if present.
- * <li>Otherwise, the default value from {@link BeanContext#getBeanTypePropertyName()}.
+ * <li>Otherwise, the default value from {@link MarshallingContext#getBeanTypePropertyName()}.
* </ul>
*
* @return
* The type property name associated with this bean, or <jk>null</jk> if the default <js>"_type"</js> should be used.
- * @see BeanContext#getBeanTypePropertyName()
+ * @see MarshallingContext#getBeanTypePropertyName()
*/
public String getTypePropertyName() { return typePropertyName; }
@@ -805,7 +805,7 @@ public class BeanMeta<T> {
*
* @return The bean context.
*/
- protected BeanContext getBeanContext() { return beanContext; }
+ protected MarshallingContext getMarshallingContext() { return marshallingContext; }
/**
* Returns the constructor for this bean, if one was found.
@@ -967,7 +967,7 @@ public class BeanMeta<T> {
"unchecked" // Unchecked casts required for factory class and BeanStore result
})
private org.apache.juneau.commons.function.BeanFactory resolveFactory(Class<? extends org.apache.juneau.commons.function.BeanFactory> fc) {
- var bs = beanContext.getBeanStore();
+ var bs = marshallingContext.getBeanStore();
if (bs != null) {
var opt = bs.getBean(fc);
if (opt.isPresent())
@@ -995,7 +995,7 @@ public class BeanMeta<T> {
* whether the class has a {@link Bean @Marshalled} annotation:
* <ul>
* <li>If {@link Bean @Marshalled} is present, private constructors are allowed
- * <li>Otherwise, the visibility is determined by {@link BeanContext#getBeanConstructorVisibility()}
+ * <li>Otherwise, the visibility is determined by {@link MarshallingContext#getBeanConstructorVisibility()}
* </ul>
* <li><b>No constructor:</b> Returns an empty {@link Optional} if no suitable constructor is found.
* </ol>
@@ -1016,8 +1016,8 @@ public class BeanMeta<T> {
"java:S3776" // Cognitive complexity acceptable for constructor finding logic
})
private BeanConstructor findBeanConstructor() {
- var ap = beanContext.getAnnotationProvider();
- var vis = beanContext.getBeanConstructorVisibility();
+ var ap = marshallingContext.getAnnotationProvider();
+ var vis = marshallingContext.getBeanConstructorVisibility();
var ci = classMeta;
var l = ci.getPublicConstructors().stream().filter(x -> ap.has(MarshalledCtor.class, x)).toList();
@@ -1099,9 +1099,9 @@ public class BeanMeta<T> {
* @return A collection of all bean fields found in the class hierarchy.
*/
private Collection<FieldInfo> findBeanFields() {
- var v = beanContext.getBeanFieldVisibility();
- var noIgnoreTransients = ! beanContext.isIgnoreTransientFields();
- var ap = beanContext.getAnnotationProvider();
+ var v = marshallingContext.getBeanFieldVisibility();
+ var noIgnoreTransients = ! marshallingContext.isIgnoreTransientFields();
+ var ap = marshallingContext.getAnnotationProvider();
var isRecord = classMeta.isRecord();
var recordComponentNames = isRecord
? classMeta.getRecordComponents().stream().map(java.lang.reflect.RecordComponent::getName).collect(java.util.stream.Collectors.toSet())
@@ -1168,10 +1168,10 @@ public class BeanMeta<T> {
})
private List<BeanMethod> findBeanMethods() {
var l = new LinkedList<BeanMethod>();
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var ci = classMeta;
- var v = beanContext.getBeanMethodVisibility();
- var pn = opt(beanFilter).map(x -> x.getPropertyNamer()).orElse(beanContext.getPropertyNamer());
+ var v = marshallingContext.getBeanMethodVisibility();
+ var pn = opt(beanFilter).map(x -> x.getPropertyNamer()).orElse(marshallingContext.getPropertyNamer());
var suppressedFromMarshalledIgnoredFields = findSuppressedPropertyNamesFromIgnoredFields(pn);
classHierarchy.get().stream().forEach(c2 -> {
@@ -1306,10 +1306,10 @@ public class BeanMeta<T> {
var beanDictionaryClasses = opt(beanFilter).map(x -> new ArrayList<>(x.getBeanDictionary())).orElse(new ArrayList<>());
// Bean dictionary from @Marshalled(typeName) annotation.
- var ba = beanContext.getAnnotationProvider().find(Marshalled.class, classMeta);
+ var ba = marshallingContext.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);
+ return new BeanRegistry(marshallingContext, null, beanDictionaryClasses);
}
/*
@@ -1417,7 +1417,7 @@ public class BeanMeta<T> {
.getParentsAndInterfaces()
.stream()
.skip(1)
- .map(beanContext::getClassMeta)
+ .map(marshallingContext::getClassMeta)
.map(ClassMeta::getBeanRegistry)
.filter(Objects::nonNull)
.map(x -> x.getTypeName(this.classMeta))
@@ -1428,7 +1428,7 @@ public class BeanMeta<T> {
if (n != null)
return n;
- return classMeta.getBeanContext().getAnnotationProvider().find(Marshalled.class, classMeta)
+ return classMeta.getMarshallingContext().getAnnotationProvider().find(Marshalled.class, classMeta)
.stream()
.map(AnnotationInfo::inner)
.filter(x -> ! x.typeName().isEmpty())
@@ -1474,7 +1474,7 @@ public class BeanMeta<T> {
})
private Set<String> findSuppressedPropertyNamesFromIgnoredFields(PropertyNamer propertyNamer) {
var s = new HashSet<String>();
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
for (var c2 : classHierarchy.get()) {
for (var x : c2.getDeclaredFields()) {
if (! x.isNotStatic() || ! ap.has(MarshalledIgnore.class, x))
@@ -1530,8 +1530,8 @@ public class BeanMeta<T> {
* in the class hierarchy.
*/
private Optional<FieldInfo> findInnerBeanField(String name) {
- var noIgnoreTransients = ! beanContext.isIgnoreTransientFields();
- var ap = beanContext.getAnnotationProvider();
+ var noIgnoreTransients = ! marshallingContext.isIgnoreTransientFields();
+ var ap = marshallingContext.getAnnotationProvider();
// @formatter:off
return classHierarchy.get().stream()
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
index b41941d586..ac0047aca3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanPropertyMeta.java
@@ -84,7 +84,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
*/
public static class Builder {
BeanMeta<?> beanMeta; // Package-private for BeanMeta access
- BeanContext bc; // Package-private for BeanMeta access
+ MarshallingContext bc; // Package-private for BeanMeta access
String name; // Package-private for BeanMeta access
FieldInfo field; // Package-private for BeanMeta access
FieldInfo innerField; // Package-private for BeanMeta access
@@ -109,7 +109,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
Builder(BeanMeta<?> beanMeta, String name) {
this.beanMeta = beanMeta;
- this.bc = beanMeta.getBeanContext();
+ this.bc = beanMeta.getMarshallingContext();
this.name = name;
}
@@ -302,7 +302,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
"java:S112", // Generic exception thrown; acceptable for framework/lifecycle methods
"java:S6541" // Brain Method: validate() intentionally consolidates property metadata resolution
})
- public boolean validate(BeanContext bc, BeanRegistry parentBeanRegistry, TypeVariables typeVarImpls, Set<String> bpro, Set<String> bpwo) throws Exception {
+ public boolean validate(MarshallingContext bc, BeanRegistry parentBeanRegistry, TypeVariables typeVarImpls, Set<String> bpro, Set<String> bpwo) throws Exception {
var bdClasses = list();
var ap = bc.getAnnotationProvider();
@@ -474,7 +474,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
private final AnnotationProvider ap; // Annotation provider for finding annotations on this property.
private final Supplier<List<AnnotationInfo<?>>> annotations; // Memoized list of all annotations on this property.
- private final BeanContext bc; // The context that created this meta.
+ private final MarshallingContext bc; // The context that created this meta.
private final BeanMeta<?> beanMeta; // The bean that this property belongs to.
private final BeanRegistry beanRegistry; // Bean registry for resolving bean types in this property.
private final boolean canRead; // True if this property can be read.
@@ -554,12 +554,12 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
// Read-only beans get their properties stored in a cache.
if (m.bean == null) {
if (! m.propertyCache.containsKey(name))
- m.propertyCache.put(name, new JsonList(m.getBeanSession()));
+ m.propertyCache.put(name, new JsonList(m.getMarshallingSession()));
((JsonList)m.propertyCache.get(name)).add(value);
return;
}
- var session = m.getBeanSession();
+ var session = m.getMarshallingSession();
var isCollection = rawTypeMeta.isCollection();
var isArray = rawTypeMeta.isArray();
@@ -643,12 +643,12 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
// Read-only beans get their properties stored in a cache.
if (m.bean == null) {
if (! m.propertyCache.containsKey(name))
- m.propertyCache.put(name, new JsonMap(m.getBeanSession()));
+ m.propertyCache.put(name, new JsonMap(m.getMarshallingSession()));
((JsonMap)m.propertyCache.get(name)).append(key, value);
return;
}
- var session = m.getBeanSession();
+ var session = m.getMarshallingSession();
var isMap = rawTypeMeta.isMap();
var isBean = rawTypeMeta.isBean();
@@ -820,7 +820,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
* The order of lookup for the dictionary is as follows:
* <ol>
* <li>Dictionary defined via {@link MarshalledProp#dictionary() @MarshalledProp(dictionary)}.
- * <li>Dictionary defined via {@link BeanContext.Builder#beanDictionary(Class...)}.
+ * <li>Dictionary defined via {@link MarshallingContext.Builder#beanDictionary(Class...)}.
* </ol>
*
* @return The bean dictionary in use for this bean property. Never <jk>null</jk>.
@@ -1012,7 +1012,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
if (readOnly)
return null;
- var session = m.getBeanSession();
+ var session = m.getMarshallingSession();
// Convert to raw form.
value1 = unswap(session, value1);
@@ -1047,7 +1047,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
"java:S3776", // Cognitive complexity acceptable for complex property setter
"java:S6541" // Brain method acceptable - complex property value setting logic requires high LOC/complexity
})
- private Object setPropertyValue(BeanMap<?> m, String pName, Object value1, Object bean, boolean isMap, boolean isCollection, BeanSession session) throws ParseException {
+ private Object setPropertyValue(BeanMap<?> m, String pName, Object value1, Object bean, boolean isMap, boolean isCollection, MarshallingSession session) throws ParseException {
try {
var r = (bc.isBeanMapPutReturnsOldValue() || isMap || isCollection) && (nn(getter) || nn(field)) ? get(m, pName) : null;
var propertyClass = rawTypeMeta.inner();
@@ -1216,7 +1216,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
return r(properties());
}
- private Object applyChildPropertiesFilter(BeanSession session, ClassMeta cm, Object o) {
+ private Object applyChildPropertiesFilter(MarshallingSession session, ClassMeta cm, Object o) {
if (o == null)
return null;
if (cm.isBean())
@@ -1254,7 +1254,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
if (bean == null)
return m.propertyCache.get(name);
- var session = m.getBeanSession();
+ var session = m.getMarshallingSession();
var o = getRaw(m, pName);
return swapAndFilterProperty(session, o);
@@ -1269,7 +1269,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
}
}
- private Object swapAndFilterProperty(BeanSession session, Object o) {
+ private Object swapAndFilterProperty(MarshallingSession session, Object o) {
try {
o = swap(session, o);
if (o == null)
@@ -1342,7 +1342,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
getClassMeta().getName(), cn(val));
}
- private Object swap(BeanSession session, Object o) throws SerializeException {
+ private Object swap(MarshallingSession session, Object o) throws SerializeException {
try {
// First use swap defined via @MarshalledProp.
if (nn(swap))
@@ -1363,7 +1363,7 @@ public class BeanPropertyMeta implements Comparable<BeanPropertyMeta> {
}
}
- private Object unswap(BeanSession session, Object o) throws ParseException {
+ private Object unswap(MarshallingSession session, Object o) throws ParseException {
try {
if (nn(swap))
return swap.unswap(session, o, rawTypeMeta);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanProxyInvocationHandler.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanProxyInvocationHandler.java
index e03314c2c9..9f5bb836db 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanProxyInvocationHandler.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanProxyInvocationHandler.java
@@ -30,7 +30,7 @@ import org.apache.juneau.json5.*;
*
* <p>
* This class enables the creation of bean instances from interfaces without requiring concrete implementations.
- * When the {@code useInterfaceProxies} setting is enabled in {@link BeanContext}, this handler is used to create
+ * When the {@code useInterfaceProxies} setting is enabled in {@link MarshallingContext}, this handler is used to create
* proxy instances that implement bean interfaces.
*
* <p>
@@ -58,7 +58,7 @@ import org.apache.juneau.json5.*;
* }
*
* <jc>// Create a proxy instance</jc>
- * <jk>var</jk> bc = <jsm>BeanContext</jsm>.<jsm>create</jsm>().<jsm>useInterfaceProxies</jsm>().<jsm>build</jsm>();
+ * <jk>var</jk> bc = <jsm>MarshallingContext</jsm>.<jsm>create</jsm>().<jsm>useInterfaceProxies</jsm>().<jsm>build</jsm>();
* <jk>var</jk> person = bc.<jsm>getClassMeta</jsm>(Person.<jk>class</jk>).<jsm>newInstance</jsm>();
*
* <jc>// Use it like a regular bean</jc>
@@ -68,7 +68,7 @@ import org.apache.juneau.json5.*;
* </p>
*
* @param <T> The interface class type
- * @see BeanContext#isUseInterfaceProxies()
+ * @see MarshallingContext#isUseInterfaceProxies()
* @see BeanMeta#getBeanProxyInvocationHandler()
* @see Proxy#newProxyInstance(ClassLoader, Class[], InvocationHandler)
*/
@@ -133,7 +133,7 @@ public class BeanProxyInvocationHandler<T> implements InvocationHandler {
return beanProps.equals(ih2.beanProps);
}
}
- return eq(beanProps, meta.getBeanContext().toBeanMap(arg));
+ return eq(beanProps, meta.getMarshallingContext().toBeanMap(arg));
}
if (mi.hasName("hashCode") && mi.getParameterCount() == 0)
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 a64633dae3..7aad729292 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
@@ -63,11 +63,11 @@ public class BeanRegistry {
private final Map<String,ClassMeta<?>> map;
private final Map<Class<?>,String> reverseMap;
- private final BeanContext bc;
+ private final MarshallingContext bc;
private final AnnotationProvider ap;
private final boolean isEmpty;
- BeanRegistry(BeanContext bc, BeanRegistry parent, List<ClassInfo> classes) {
+ BeanRegistry(MarshallingContext bc, BeanRegistry parent, List<ClassInfo> classes) {
assertArgNotNull(ARG_bc, bc);
assertArgNotNull(ARG_classes, classes);
this.bc = bc;
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 62dda51aad..99f41e0469 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
@@ -49,10 +49,10 @@ import org.apache.juneau.swap.*;
* A wrapper class around the {@link Class} object that provides cached information about that class.
*
* <p>
- * Instances of this class can be created through the {@link BeanContext#getClassMeta(Class)} method.
+ * Instances of this class can be created through the {@link MarshallingContext#getClassMeta(Class)} method.
*
* <p>
- * The {@link BeanContext} class will cache and reuse instances of this class except for the following class types:
+ * The {@link MarshallingContext} class will cache and reuse instances of this class except for the following class types:
* <ul>
* <li>Arrays
* <li>Maps with non-Object key/values.
@@ -60,7 +60,7 @@ import org.apache.juneau.swap.*;
* </ul>
*
* <p>
- * This class is tied to the {@link BeanContext} class because it's that class that makes the determination of what is
+ * This class is tied to the {@link MarshallingContext} class because it's that class that makes the determination of what is
* a bean.
*
*
@@ -138,7 +138,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
private final List<ClassMeta<?>> args; // Arg types if this is an array of args.
- private final BeanContext beanContext; // The bean context that created this object.
+ private final MarshallingContext marshallingContext; // The bean context that created this object.
private final Supplier<BuilderSwap<T,?>> builderSwap; // The builder swap associated with this bean (if it has one).
private final Categories cat; // The class category.
private final Cache<Class<?>,ObjectSwap<?,?>> childSwapMap; // Maps normal subclasses to ObjectSwaps.
@@ -172,7 +172,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* Construct a new {@code ClassMeta} based on the specified {@link Class}.
*
* @param innerClass The class being wrapped.
- * @param beanContext The bean context that created this object.
+ * @param marshallingContext The bean context that created this object.
* @param delayedInit
* Don't call init() in constructor.
* Used for delayed initialization when the possibility of class reference loops exist.
@@ -180,16 +180,16 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
@SuppressWarnings({
"java:S3776" // Cognitive complexity acceptable for ClassMeta initialization with category detection
})
- ClassMeta(Class<T> innerClass, BeanContext beanContext) {
+ ClassMeta(Class<T> innerClass, MarshallingContext marshallingContext) {
super(innerClass);
- this.beanContext = beanContext;
+ this.marshallingContext = marshallingContext;
this.cat = new Categories();
// We always immediately add this class meta to the bean context cache so that we can resolve recursive references.
- if (nn(beanContext) && nn(beanContext.getCmCache()) && isCacheable(innerClass))
- beanContext.getCmCache().put(innerClass, this);
+ if (nn(marshallingContext) && nn(marshallingContext.getCmCache()) && isCacheable(innerClass))
+ marshallingContext.getCmCache().put(innerClass, this);
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
if (isAssignableTo(Delegate.class)) {
cat.set(DELEGATE);
@@ -294,7 +294,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
this.childSwapMap = null;
this.childUnswapMap = null;
this.cat = new Categories().set(ARGS);
- this.beanContext = null;
+ this.marshallingContext = null;
this.elementType = memoize(this::findElementType);
this.keyValueTypes = memoize(this::findKeyValueTypes);
this.beanMeta = memoize(this::findBeanMeta);
@@ -329,7 +329,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
this.childUnswapMap = mainType.childUnswapMap;
this.cat = mainType.cat;
this.fromStringMethod = mainType.fromStringMethod;
- this.beanContext = mainType.beanContext;
+ this.marshallingContext = mainType.marshallingContext;
this.elementType = elementType != null ? memoize(()->elementType) : mainType.elementType;
this.keyValueTypes = (keyType != null || valueType != null) ? memoize(()->new KeyValueTypes(keyType, valueType)) : mainType.keyValueTypes;
this.beanMeta = mainType.beanMeta;
@@ -437,8 +437,8 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* @return This object.
*/
public <A extends Annotation> ClassMeta<T> forEachAnnotation(Class<A> type, Predicate<A> filter, Consumer<A> action) {
- if (beanContext != null) {
- beanContext.getAnnotationProvider().find(type, this).stream().map(AnnotationInfo::inner).filter(x -> filter == null || filter.test(x)).forEach(action::accept);
+ if (marshallingContext != null) {
+ marshallingContext.getAnnotationProvider().find(type, this).stream().map(AnnotationInfo::inner).filter(x -> filter == null || filter.test(x)).forEach(action::accept);
}
return this;
}
@@ -464,11 +464,11 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
public List<ClassMeta<?>> getArgs() { return args; }
/**
- * Returns the {@link BeanContext} that created this object.
+ * Returns the {@link MarshallingContext} that created this object.
*
* @return The bean context.
*/
- public BeanContext getBeanContext() { return beanContext; }
+ public MarshallingContext getMarshallingContext() { return marshallingContext; }
/**
* Returns the {@link BeanMeta} associated with this class.
@@ -504,7 +504,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* @param session The current bean session.
* @return The builder swap associated with this class, or <jk>null</jk> if it doesn't exist.
*/
- public BuilderSwap<T,?> getBuilderSwap(BeanSession session) {
+ public BuilderSwap<T,?> getBuilderSwap(MarshallingSession session) {
return builderSwap.get();
}
@@ -543,7 +543,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
"unchecked", // Type erasure requires unchecked casts
"java:S3776", // Cognitive complexity acceptable for this specific logic
})
- public T getExample(BeanSession session, JsonParserSession jpSession) {
+ public T getExample(MarshallingSession session, JsonParserSession jpSession) {
try {
if (example.isPresent())
return jpSession.parse(example.get(), this);
@@ -725,7 +725,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* <br>Required because the swap used may depend on the media type being serialized or parsed.
* @return The serialized class type, or this object if no swap is associated with the class.
*/
- public ClassMeta<?> getSerializedClassMeta(BeanSession session) {
+ public ClassMeta<?> getSerializedClassMeta(MarshallingSession session) {
var ps = getSwap(session);
return (ps == null ? this : ps.getSwapClassMeta(session));
}
@@ -742,7 +742,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* The {@link ObjectSwap} associated with this class, or <jk>null</jk> if there are no POJO swaps associated with
* this class.
*/
- public ObjectSwap<T,?> getSwap(BeanSession session) {
+ public ObjectSwap<T,?> getSwap(MarshallingSession session) {
var swapsList = swaps.get();
if (! swapsList.isEmpty()) {
var matchQuant = 0;
@@ -862,11 +862,11 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
// Exclude strict supertype: if this type is already a strict supertype of c, it's assignability only.
if (inner().isAssignableFrom(c))
return false;
- // Exclude array→array: BeanSession handles those directly; BasicConverter infers
+ // Exclude array→array: MarshallingSession handles those directly; BasicConverter infers
// array conversions from element types, which can produce false positives here.
if (inner().isArray() && c.isArray())
return false;
- // Exclude Collections and Maps — BeanSession handles collection/map conversion directly.
+ // Exclude Collections and Maps — MarshallingSession handles collection/map conversion directly.
// BasicConverter's generic conversions produce false positives that Mutaters never did.
if (Collection.class.isAssignableFrom(inner()) || Map.class.isAssignableFrom(inner()))
return false;
@@ -900,11 +900,11 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
// Exclude strict supertype: if the target is already a strict supertype of this type, it's assignability only.
if (c.isAssignableFrom(inner()))
return false;
- // Exclude array→array: BeanSession handles those directly; BasicConverter infers
+ // Exclude array→array: MarshallingSession handles those directly; BasicConverter infers
// array conversions from element types, which can produce false positives here.
if (inner().isArray() && c.isArray())
return false;
- // Exclude Collection/Map targets — BeanSession handles collection/map conversion directly.
+ // Exclude Collection/Map targets — MarshallingSession handles collection/map conversion directly.
// BasicConverter's generic conversions produce false positives that Mutaters never did.
if (Collection.class.isAssignableFrom(c) || Map.class.isAssignableFrom(c))
return false;
@@ -944,7 +944,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
* <p>
* Delegates to {@link #hasMutaterFrom(Class)} with {@link String} as the source type, which applies the
* same exclusions: supertypes of {@link String} (e.g. {@link Object}), arrays, and {@link Collection}/{@link Map}
- * targets are excluded because those are handled by parsers or {@code BeanSession}, not explicit string transforms.
+ * targets are excluded because those are handled by parsers or {@code MarshallingSession}, not explicit string transforms.
*
* @return <jk>true</jk> if this class has a transform associated with it that allows it to be created from a String.
*/
@@ -1348,7 +1348,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
if (isEnum()) {
var t = (T)enumValues.get().getKey(arg);
- if (t == null && ! beanContext.isIgnoreUnknownEnumValues())
+ if (t == null && ! marshallingContext.isIgnoreUnknownEnumValues())
throw new ExecutableException("Could not resolve enum value ''{0}'' on class ''{1}''", arg, cn(inner()));
return t;
}
@@ -1401,7 +1401,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
public String toString(Object t) {
if (t == null)
return null;
- if (isEnum() && beanContext.isUseEnumNames())
+ if (isEnum() && marshallingContext.isUseEnumNames())
return ((Enum<?>)t).name();
return t.toString();
}
@@ -1425,7 +1425,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
if (ci.isAssignableTo(Surrogate.class)) {
- List<SurrogateSwap<?,?>> l = SurrogateSwap.findObjectSwaps(c, beanContext);
+ List<SurrogateSwap<?,?>> l = SurrogateSwap.findObjectSwaps(c, marshallingContext);
return first(l).map(x -> (ObjectSwap<T,?>)x).orElse(null);
}
@@ -1433,7 +1433,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
private String findBeanDictionaryName() {
- if (beanContext == null)
+ if (marshallingContext == null)
return null;
var d = beanMeta.get().optBeanMeta().map(x -> x.getDictionaryName()).orElse(null);
@@ -1442,7 +1442,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
// Note that @Marshalled(typeName) can be defined on non-bean types, so
// we have to check again.
- return beanContext.getAnnotationProvider().find(Marshalled.class, this)
+ return marshallingContext.getAnnotationProvider().find(Marshalled.class, this)
.stream()
.map(AnnotationInfo::inner)
.filter(x -> ! x.typeName().isEmpty())
@@ -1460,26 +1460,26 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
private KeyValueTypes findKeyValueTypes() {
if (cat.is(MAP) && ! cat.is(BEANMAP)) {
// If this is a MAP, see if it's parameterized (e.g. AddressBook extends HashMap<String,Person>)
- var typeParams = beanContext.findParameters(inner(), inner());
+ var typeParams = marshallingContext.findParameters(inner(), inner());
if (nn(typeParams) && typeParams.length == 2) {
return new KeyValueTypes(typeParams[0], typeParams[1]);
}
- return new KeyValueTypes(beanContext.getClassMeta(Object.class), beanContext.getClassMeta(Object.class));
+ return new KeyValueTypes(marshallingContext.getClassMeta(Object.class), marshallingContext.getClassMeta(Object.class));
}
return new KeyValueTypes(null, null);
}
private ClassMeta<?> findElementType() {
- if (beanContext == null)
+ if (marshallingContext == null)
return null;
if (cat.is(ARRAY)) {
- return beanContext.getClassMeta(inner().getComponentType());
+ return marshallingContext.getClassMeta(inner().getComponentType());
} else if (cat.is(COLLECTION) || cat.is(ITERABLE) || cat.is(ITERATOR) || cat.is(STREAM) || is(Optional.class)) {
- var typeParams = beanContext.findParameters(inner(), inner());
+ var typeParams = marshallingContext.findParameters(inner(), inner());
if (nn(typeParams) && typeParams.length == 1) {
return typeParams[0];
}
- return beanContext.getClassMeta(Object.class);
+ return marshallingContext.getClassMeta(Object.class);
}
return null;
}
@@ -1488,7 +1488,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
"unchecked" // Type erasure requires cast for BuilderSwap<T,?>
})
private BuilderSwap<T,?> findBuilderSwap() {
- var bc = beanContext;
+ var bc = marshallingContext;
if (bc == null)
return null;
return (BuilderSwap<T,?>)BuilderSwap.findSwapFromObjectClass(bc, inner(), bc.getBeanConstructorVisibility(), bc.getBeanMethodVisibility());
@@ -1499,11 +1499,11 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
"java:S3776" // Cognitive complexity acceptable for swap resolution logic
})
private List<ObjectSwap<T,?>> findSwaps() {
- if (beanContext == null)
+ if (marshallingContext == null)
return l();
var list = new ArrayList<ObjectSwap<T,?>>();
- var swapArray = beanContext.getSwaps();
+ var swapArray = marshallingContext.getSwaps();
if (! swapArray.isEmpty()) {
var innerClass = inner();
for (var f : swapArray)
@@ -1511,7 +1511,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
list.add((ObjectSwap<T,?>)f);
}
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
ap.find(Swap.class, this).stream().map(AnnotationInfo::inner).forEach(x -> list.add(createSwap(x)));
// @Marshalled(as=STRING) installs an AutoStringSwap before any auto-detection.
@@ -1526,19 +1526,19 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
// and the serializer correctly emits "null" when swap() returns null.
if (list.isEmpty() && ap.has(MarshalledIgnore.class, this))
list.add(new ObjectSwap<T,String>(inner(), String.class) {
- @Override public String swap(BeanSession session, T o) { return null; }
- @Override public T unswap(BeanSession session, String s, ClassMeta<?> hint) { return null; }
+ @Override public String swap(MarshallingSession session, T o) { return null; }
+ @Override public T unswap(MarshallingSession session, String s, ClassMeta<?> hint) { return null; }
});
var ds = DefaultSwaps.find(this);
if (ds == null && !isStreamable()) {
- ds = AutoObjectSwap.find(beanContext, this);
+ ds = AutoObjectSwap.find(marshallingContext, this);
if (ds == null)
- ds = AutoNumberSwap.find(beanContext, this);
+ ds = AutoNumberSwap.find(marshallingContext, this);
if (ds == null)
- ds = AutoMapSwap.find(beanContext, this);
+ ds = AutoMapSwap.find(marshallingContext, this);
if (ds == null)
- ds = AutoListSwap.find(beanContext, this);
+ ds = AutoListSwap.find(marshallingContext, this);
}
if (nn(ds))
@@ -1548,9 +1548,9 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
private List<ObjectSwap<?,?>> findChildSwaps() {
- if (beanContext == null)
+ if (marshallingContext == null)
return l();
- var swapArray = beanContext.getSwaps();
+ var swapArray = marshallingContext.getSwaps();
if (swapArray.isEmpty())
return l();
var list = new ArrayList<ObjectSwap<?,?>>();
@@ -1565,7 +1565,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
if (! isEnum())
return BidiMap.<Object,String>create().unmodifiable().build();
- var bc = beanContext;
+ var bc = marshallingContext;
var useEnumNames = nn(bc) && bc.isUseEnumNames();
var m = BidiMap.<Object,String>create().unmodifiable();
@@ -1580,8 +1580,8 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
if (ex == null)
ex = marshalledFilter.map(x -> x.getExample()).orElse(null);
- if (ex == null && nn(beanContext))
- ex = beanContext.getAnnotationProvider().find(Example.class, this).stream().map(x -> x.inner().value()).filter(Utils::ne).findFirst().orElse(null);
+ if (ex == null && nn(marshallingContext))
+ ex = marshallingContext.getAnnotationProvider().find(Example.class, this).stream().map(x -> x.inner().value()).filter(Utils::ne).findFirst().orElse(null);
if (ex == null) {
if (isAny(boolean.class, Boolean.class)) {
@@ -1592,7 +1592,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
ex = "foo";
} else if (cat.is(ENUM)) {
Optional<Enum<?>> e = first(EnumSet.allOf(asEnumClass(inner())));
- ex = e.map(x -> beanContext.isUseEnumNames() ? x.name() : x.toString()).orElse(null);
+ ex = e.map(x -> marshallingContext.isUseEnumNames() ? x.name() : x.toString()).orElse(null);
} else if (isAny(float.class, Float.class, double.class, Double.class)) {
ex = "1.0";
} else if (isAny(short.class, Short.class, int.class, Integer.class, long.class, Long.class)) {
@@ -1604,7 +1604,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
private FieldInfo findExampleField() {
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
return getDeclaredFields()
.stream()
@@ -1616,11 +1616,11 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
private MethodInfo findExampleMethod() {
// @formatter:off
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
// Option 1: Public example() or @Example method.
var m = getPublicMethod(
- x -> x.isStatic() && x.isNotDeprecated() && (x.hasName("example") || ap.has(Example.class, x)) && x.hasParameterTypesLenient(BeanSession.class)
+ x -> x.isStatic() && x.isNotDeprecated() && (x.hasName("example") || ap.has(Example.class, x)) && x.hasParameterTypesLenient(MarshallingSession.class)
);
if (m.isPresent()) return m.get();
@@ -1668,7 +1668,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
}
private MarshalledFilter findMarshalledFilter() {
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var l = ap.find(Marshalled.class, this);
if (l.isEmpty())
return null;
@@ -1679,7 +1679,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
"java:S3776" // Cognitive complexity acceptable for name property detection with annotation traversal
})
private Property<T,Object> findNameProperty() {
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var s = getAllFields()
.stream()
@@ -1774,7 +1774,7 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
"java:S3776" // Cognitive complexity acceptable for parent property detection with annotation traversal
})
private Property<T,Object> findParentProperty() {
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var s = getAllFields()
.stream()
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 b525b165a4..41b8616640 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
@@ -626,7 +626,7 @@ public abstract class Context {
* When bean getters throws exceptions, the exception includes the object stack information
* in order to determine how that method was invoked.
* <li>
- * Enables {@link BeanTraverseContext.Builder#detectRecursions()}.
+ * Enables {@link MarshallingTraverseContext.Builder#detectRecursions()}.
* </ul>
*
* <p>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.txt b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.txt
index afdcbd0629..697a4e1d7b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.txt
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/Context.txt
@@ -20,22 +20,22 @@ Classes that extend Context (directly or indirectly)
Direct subclasses of Context:
-----------------------------
-1. BeanContext
+1. MarshallingContext
2. Config
3. RestContext
4. RestOpContext
-5. BeanContextable (abstract)
+5. MarshallingContextable (abstract)
6. ConfigStore (abstract)
-Classes extending BeanContextable:
+Classes extending MarshallingContextable:
-----------------------------------
7. Parser
8. RestClient
-9. BeanTraverseContext (abstract)
+9. MarshallingTraverseContext (abstract)
10. BaseHttpPartSerializer (abstract)
11. BaseHttpPartParser (abstract)
-Classes extending BeanTraverseContext:
+Classes extending MarshallingTraverseContext:
--------------------------------------
12. Serializer
13. JsonSchemaGenerator
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.txt b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.txt
index cf4ece6658..11ae5769fa 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.txt
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.txt
@@ -22,17 +22,17 @@ Base class: ContextSession (abstract)
Direct subclasses of ContextSession:
------------------------------------
-1. BeanSession
+1. MarshallingSession
2. RestSession
3. RestOpSession
-Classes extending BeanSession:
+Classes extending MarshallingSession:
-------------------------------
4. ParserSession
-5. BeanTraverseSession
-6. RestRequest (in rest-client, extends BeanSession)
+5. MarshallingTraverseSession
+6. RestRequest (in rest-client, extends MarshallingSession)
-Classes extending BeanTraverseSession:
+Classes extending MarshallingTraverseSession:
--------------------------------------
7. SerializerSession
8. JsonSchemaGeneratorSession
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 50c2b05358..17f986a75e 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
@@ -73,7 +73,7 @@ import org.apache.juneau.swap.*;
* <h5 class='section'>See Also:</h5>
* <ul>
* <li class='ja'>{@link Marshalled @Marshalled}
- * <li class='jc'>{@link BeanInterceptor}
+ * <li class='jc'>{@link MarshallingInterceptor}
* <li class='jc'>{@link PropertyNamer}
* </ul>
*/
@@ -103,7 +103,7 @@ public class MarshalledFilter {
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);
+ private BeanInstantiator.Builder<MarshallingInterceptor> interceptor = BeanInstantiator.of(MarshallingInterceptor.class);
/**
* Constructor for non-bean POJO filters.
@@ -185,7 +185,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#dictionary()}
- * <li class='jm'>{@link BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @param values The values to add to this property.
@@ -234,9 +234,9 @@ public class MarshalledFilter {
*
* <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)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesExcludes(Class, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesExcludes(String, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesExcludes(Map)}
* </ul>
*
* @param value
@@ -259,7 +259,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#findFluentSetters()}
- * <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#findFluentSetters()}
* </ul>
*
* @return This object.
@@ -302,17 +302,17 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#interceptor()}
- * <li class='jc'>{@link BeanInterceptor}
+ * <li class='jc'>{@link MarshallingInterceptor}
* </ul>
*
* @param value
* The new value for this setting.
- * <br>The default value is {@link BeanInterceptor}.
+ * <br>The default value is {@link MarshallingInterceptor}.
* @return This object.
*/
@SuppressWarnings("unchecked")
public Builder interceptor(Class<?> value) {
- interceptor.type((Class<? extends BeanInterceptor>) value);
+ interceptor.type((Class<? extends MarshallingInterceptor>) value);
return this;
}
@@ -371,9 +371,9 @@ public class MarshalledFilter {
*
* <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)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanProperties(Class, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanProperties(String, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanProperties(Map)}
* </ul>
*
* @param value
@@ -396,7 +396,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#propertyNamer()}
- * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jm'>{@link MarshallingContext.Builder#propertyNamer(Class)}
* <li class='jc'>{@link PropertyNamer}
* </ul>
*
@@ -433,9 +433,9 @@ public class MarshalledFilter {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#readOnlyProperties()}
* <li class='ja'>{@link MarshalledProp#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)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesReadOnly(Class, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesReadOnly(String, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesReadOnly(Map)}
* </ul>
*
* @param value
@@ -455,7 +455,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#unsorted()}
- * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
+ * <li class='jf'>{@link MarshallingContext.Builder#unsortedProperties()}
* </ul>
*
* @return This object.
@@ -470,7 +470,7 @@ public class MarshalledFilter {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#unsorted()}
- * <li class='jf'>{@link BeanContext.Builder#unsortedProperties()}
+ * <li class='jf'>{@link MarshallingContext.Builder#unsortedProperties()}
* </ul>
*
* @param value
@@ -543,9 +543,9 @@ public class MarshalledFilter {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Marshalled#writeOnlyProperties()}
* <li class='ja'>{@link MarshalledProp#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)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesWriteOnly(Class, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesWriteOnly(String, String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanPropertiesWriteOnly(Map)}
* </ul>
*
* @param value
@@ -591,7 +591,7 @@ public class MarshalledFilter {
private final boolean fluentSetters;
private final ClassInfo implClass;
private final ClassInfo interfaceClass;
- private final BeanInterceptor interceptor;
+ private final MarshallingInterceptor interceptor;
private final Set<String> properties;
private final PropertyNamer propertyNamer;
private final Set<String> readOnlyProperties;
@@ -621,7 +621,7 @@ public class MarshalledFilter {
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);
+ this.interceptor = builder.interceptor.asOptional().orElse(MarshallingInterceptor.DEFAULT);
}
/**
@@ -736,7 +736,7 @@ public class MarshalledFilter {
public boolean isUnsortedProperties() { return unsortedProperties; }
/**
- * Calls the {@link BeanInterceptor#readProperty(Object, String, Object)} method on the registered property filters.
+ * Calls the {@link MarshallingInterceptor#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.
@@ -751,7 +751,7 @@ public class MarshalledFilter {
}
/**
- * Calls the {@link BeanInterceptor#writeProperty(Object, String, Object)} method on the registered property filters.
+ * Calls the {@link MarshallingInterceptor#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.
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/MarshallingContext.java
similarity index 95%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContext.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingContext.java
index 34fd538d5d..5fcb842777 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/MarshallingContext.java
@@ -66,26 +66,26 @@ import org.apache.juneau.utils.*;
* <h5 class='topic'>Bean Contexts</h5>
*
* <p>
- * Bean contexts are created through the {@link BeanContext#create() BeanContext.create()} and {@link Builder#build()} methods.
+ * Bean contexts are created through the {@link MarshallingContext#create() MarshallingContext.create()} and {@link Builder#build()} methods.
* <br>These context objects are read-only, reusable, and thread-safe.
*
* <p>
* Each bean context maintains a cache of {@link ClassMeta} objects that describe information about classes encountered.
* These <c>ClassMeta</c> objects are time-consuming to construct.
- * Therefore, instances of {@link BeanContext} that share the same <js>"BeanContext.*"</js> property values share
+ * Therefore, instances of {@link MarshallingContext} that share the same <js>"MarshallingContext.*"</js> property values share
* the same cache. This allows for efficient reuse of <c>ClassMeta</c> objects so that the information about
* classes only needs to be calculated once.
- * Because of this, many of the properties defined on the {@link BeanContext} class cannot be overridden on the session.
+ * Because of this, many of the properties defined on the {@link MarshallingContext} class cannot be overridden on the session.
*
* <h5 class='topic'>Bean Sessions</h5>
*
* <p>
- * Whereas <c>BeanContext</c> objects are permanent, unchangeable, cached, and thread-safe,
- * {@link BeanSession} objects are ephemeral and not thread-safe.
+ * Whereas <c>MarshallingContext</c> objects are permanent, unchangeable, cached, and thread-safe,
+ * {@link MarshallingSession} objects are ephemeral and not thread-safe.
* They are meant to be used as quickly-constructed scratchpads for creating bean maps.
* {@link BeanMap} objects can only be created through the session.
*
- * <h5 class='topic'>BeanContext configuration properties</h5>
+ * <h5 class='topic'>MarshallingContext configuration properties</h5>
*
* <p>
* <c>BeanContexts</c> have several configuration properties that can be used to tweak behavior on how beans are
@@ -109,7 +109,7 @@ import org.apache.juneau.utils.*;
*
* <p class='bjava'>
* <jc>// Construct a context from scratch.</jc>
- * BeanContext <jv>beanContext</jv> = BeanContext
+ * MarshallingContext <jv>marshallingContext</jv> = MarshallingContext
* .<jsm>create</jsm>()
* .beansRequireDefaultConstructor()
* .notBeanClasses(Foo.<jk>class</jk>)
@@ -125,9 +125,9 @@ import org.apache.juneau.utils.*;
* <p>
* Bean maps are created in two ways...
* <ol>
- * <li>{@link BeanSession#toBeanMap(Object) BeanSession.toBeanMap()} - Wraps an existing bean inside a {@code Map}
+ * <li>{@link MarshallingSession#toBeanMap(Object) MarshallingSession.toBeanMap()} - Wraps an existing bean inside a {@code Map}
* wrapper.
- * <li>{@link BeanSession#newBeanMap(Class) BeanSession.newBeanMap()} - Create a new bean instance wrapped in a
+ * <li>{@link MarshallingSession#newBeanMap(Class) MarshallingSession.newBeanMap()} - Create a new bean instance wrapped in a
* {@code Map} wrapper.
* </ol>
*
@@ -143,7 +143,7 @@ import org.apache.juneau.utils.*;
* }
*
* <jc>// Create a new bean session</jc>
- * BeanSession <jv>session</jv> = BeanContext.<jsf>DEFAULT</jsf>.createSession();
+ * MarshallingSession <jv>session</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.createSession();
*
* <jc>// Wrap an existing bean in a new bean map</jc>
* BeanMap<Person> <jv>map1</jv> = <jv>session</jv>.toBeanMap(<jk>new</jk> Person());
@@ -173,7 +173,7 @@ import org.apache.juneau.utils.*;
"java:S1452", // Wildcard required - ClassMeta<?> for parameter resolution and type variables
"java:S1612" // Lambdas used instead of method references for readability in complex chained expressions
})
-public class BeanContext extends Context implements ConversionFinder {
+public class MarshallingContext extends Context implements ConversionFinder {
// Property name constants
private static final String PROP_beanClassVisibility = "beanClassVisibility";
@@ -224,7 +224,7 @@ public class BeanContext extends Context implements ConversionFinder {
*/
public static class Builder extends Context.Builder {
- private static final Cache<HashKey,BeanContext> CACHE = Cache.of(HashKey.class, BeanContext.class).build();
+ private static final Cache<HashKey,MarshallingContext> CACHE = Cache.of(HashKey.class, MarshallingContext.class).build();
private static int integer(boolean...values) {
var n = 0;
@@ -270,36 +270,36 @@ public class BeanContext extends Context implements ConversionFinder {
* All default settings.
*/
protected Builder() {
- beanClassVisibility = env("BeanContext.beanClassVisibility", PUBLIC);
- beanConstructorVisibility = env("BeanContext.beanConstructorVisibility", PUBLIC);
+ beanClassVisibility = env("MarshallingContext.beanClassVisibility", PUBLIC);
+ beanConstructorVisibility = env("MarshallingContext.beanConstructorVisibility", PUBLIC);
beanDictionary = list();
- beanFieldVisibility = env("BeanContext.beanFieldVisibility", PUBLIC);
- beanMapPutReturnsOldValue = env("BeanContext.beanMapPutReturnsOldValue", false);
- beanMethodVisibility = env("BeanContext.beanMethodVisibility", PUBLIC);
- beansRequireDefaultConstructor = env("BeanContext.beansRequireDefaultConstructor", false);
- beansRequireSerializable = env("BeanContext.beansRequireSerializable", false);
- beansRequireSettersForGetters = env("BeanContext.beansRequireSettersForGetters", false);
- disableBeansRequireSomeProperties = env("BeanContext.disableBeansRequireSomeProperties", false);
- disableIgnoreMissingSetters = env("BeanContext.disableIgnoreMissingSetters", false);
- disableIgnoreTransientFields = env("BeanContext.disableIgnoreTransientFields", false);
- disableIgnoreUnknownNullBeanProperties = env("BeanContext.disableIgnoreUnknownNullBeanProperties", false);
- disableInterfaceProxies = env("BeanContext.disableInterfaceProxies", false);
- findFluentSetters = env("BeanContext.findFluentSetters", false);
- ignoreInvocationExceptionsOnGetters = env("BeanContext.ignoreInvocationExceptionsOnGetters", false);
- ignoreInvocationExceptionsOnSetters = env("BeanContext.ignoreInvocationExceptionsOnSetters", false);
- ignoreUnknownBeanProperties = env("BeanContext.ignoreUnknownBeanProperties", false);
- ignoreUnknownEnumValues = env("BeanContext.ignoreUnknownEnumValues", false);
- locale = env("BeanContext.locale").map(Locale::forLanguageTag).orElse(Locale.getDefault());
- mediaType = env("BeanContext.mediaType").map(MediaType::of).orElse(null);
+ beanFieldVisibility = env("MarshallingContext.beanFieldVisibility", PUBLIC);
+ beanMapPutReturnsOldValue = env("MarshallingContext.beanMapPutReturnsOldValue", false);
+ beanMethodVisibility = env("MarshallingContext.beanMethodVisibility", PUBLIC);
+ beansRequireDefaultConstructor = env("MarshallingContext.beansRequireDefaultConstructor", false);
+ beansRequireSerializable = env("MarshallingContext.beansRequireSerializable", false);
+ beansRequireSettersForGetters = env("MarshallingContext.beansRequireSettersForGetters", false);
+ disableBeansRequireSomeProperties = env("MarshallingContext.disableBeansRequireSomeProperties", false);
+ disableIgnoreMissingSetters = env("MarshallingContext.disableIgnoreMissingSetters", false);
+ disableIgnoreTransientFields = env("MarshallingContext.disableIgnoreTransientFields", false);
+ disableIgnoreUnknownNullBeanProperties = env("MarshallingContext.disableIgnoreUnknownNullBeanProperties", false);
+ disableInterfaceProxies = env("MarshallingContext.disableInterfaceProxies", false);
+ findFluentSetters = env("MarshallingContext.findFluentSetters", false);
+ ignoreInvocationExceptionsOnGetters = env("MarshallingContext.ignoreInvocationExceptionsOnGetters", false);
+ ignoreInvocationExceptionsOnSetters = env("MarshallingContext.ignoreInvocationExceptionsOnSetters", false);
+ ignoreUnknownBeanProperties = env("MarshallingContext.ignoreUnknownBeanProperties", false);
+ ignoreUnknownEnumValues = env("MarshallingContext.ignoreUnknownEnumValues", false);
+ locale = env("MarshallingContext.locale").map(Locale::forLanguageTag).orElse(Locale.getDefault());
+ mediaType = env("MarshallingContext.mediaType").map(MediaType::of).orElse(null);
notBeanClasses = new TreeSet<>();
notBeanPackages = new TreeSet<>();
propertyNamer = null;
- unsortedProperties = env("BeanContext.unsortedProperties", false);
+ unsortedProperties = env("MarshallingContext.unsortedProperties", false);
swaps = list();
- timeZone = env("BeanContext.timeZone").map(TimeZone::getTimeZone).orElse(null);
- typePropertyName = env("BeanContext.typePropertyName", "_type");
- useEnumNames = env("BeanContext.useEnumNames", false);
- useJavaBeanIntrospector = env("BeanContext.useJavaBeanIntrospector", false);
+ timeZone = env("MarshallingContext.timeZone").map(TimeZone::getTimeZone).orElse(null);
+ typePropertyName = env("MarshallingContext.typePropertyName", "_type");
+ useEnumNames = env("MarshallingContext.useEnumNames", false);
+ useJavaBeanIntrospector = env("MarshallingContext.useJavaBeanIntrospector", false);
beanStore = null;
}
@@ -308,7 +308,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* @param copyFrom The bean to copy from.
*/
- protected Builder(BeanContext copyFrom) {
+ protected Builder(MarshallingContext copyFrom) {
super(copyFrom);
beanClassVisibility = copyFrom.beanClassVisibility;
beanConstructorVisibility = copyFrom.beanConstructorVisibility;
@@ -612,7 +612,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledProp#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary_replace()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(ClassInfo...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(ClassInfo...)}
* </ul>
*
* @param values
@@ -707,7 +707,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Interceptor that strips out sensitive information.</jc>
- * <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> {
+ * <jk>public class</jk> AddressInterceptor <jk>extends</jk> MarshallingInterceptor<Address> {
*
* <jk>public</jk> Object readProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
* <jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>))
@@ -739,7 +739,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jc'>{@link BeanInterceptor}
+ * <li class='jc'>{@link MarshallingInterceptor}
* <li class='ja'>{@link Bean#interceptor() Bean(interceptor)}
* </ul>
*
@@ -750,7 +750,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public Builder beanInterceptor(Class<?> on, Class<? extends BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends MarshallingInterceptor<?>> value) {
assertArgNotNull(ARG_on, on);
assertArgNotNull(ARG_value, value);
return annotations(MarshalledApplyAnnotation.create(on).value(MarshalledAnnotation.create().interceptor(value).build()).build());
@@ -769,7 +769,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Create a context that creates BeanMaps with normal put() behavior.</jc>
- * BeanContext <jv>context</jv> = BeanContext
+ * MarshallingContext <jv>context</jv> = MarshallingContext
* .<jsm>create</jsm>()
* .beanMapPutReturnsOldValue()
* .build();
@@ -1742,7 +1742,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <ja>@Autowired</ja> ApplicationContext <jv>ctx</jv>;
*
* <ja>@Override</ja>
- * <jk>protected</jk> BeanContext createBeanContext(BeanContext.Builder <jv>builder</jv>) {
+ * <jk>protected</jk> MarshallingContext createBeanContext(MarshallingContext.Builder <jv>builder</jv>) {
* <jk>return</jk> <jv>builder</jv>.beanStore(<jk>new</jk> SpringBeanStore(<jv>ctx</jv>)).build();
* }
* }
@@ -1757,8 +1757,8 @@ public class BeanContext extends Context implements ConversionFinder {
}
@Override /* Overridden from Context.Builder */
- public BeanContext build() {
- return cache(CACHE).build(BeanContext.class);
+ public MarshallingContext build() {
+ return cache(CACHE).build(MarshallingContext.class);
}
@Override /* Overridden from Builder */
@@ -2089,8 +2089,8 @@ public class BeanContext extends Context implements ConversionFinder {
* 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.
+ * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link MarshallingSession} argument.
+ * <li>A static method with name <c>example</c> with no arguments or one {@link MarshallingSession} argument.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -2142,8 +2142,8 @@ public class BeanContext extends Context implements ConversionFinder {
* <ul class='spaced-list'>
* <li>The {@link Marshalled#example()} annotation on the class itself.
* <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.
+ * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link MarshallingSession} argument.
+ * <li>A static method with name <c>example</c> with no arguments or one {@link MarshallingSession} argument.
* </ul>
*
* @param <T> The POJO class.
@@ -2656,17 +2656,17 @@ public class BeanContext extends Context implements ConversionFinder {
* <i><l>Context</l> configuration property: </i> Locale.
*
* <p>
- * Specifies the default locale for serializer and parser sessions when not specified via {@link BeanSession.Builder#locale(Locale)}.
+ * Specifies the default locale for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#locale(Locale)}.
* Typically used for POJO swaps that need to deal with locales such as swaps that convert <l>Date</l> and <l>Calendar</l>
- * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(BeanSession, Object)} and
- * {@link ObjectSwap#unswap(BeanSession, Object, ClassMeta, String)} methods.
+ * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(MarshallingSession, Object)} and
+ * {@link ObjectSwap#unswap(MarshallingSession, Object, ClassMeta, String)} methods.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Define a POJO swap that skips serializing beans if we're in the UK.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getLocale().equals(Locale.<jsf>UK</jsf>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -2683,7 +2683,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#locale()}
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#locale(Locale)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#locale(Locale)}
* </ul>
*
* @param value The new value for this property.
@@ -2699,7 +2699,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <i><l>Context</l> configuration property: </i> Media type.
*
* <p>
- * Specifies the default media type for serializer and parser sessions when not specified via {@link BeanSession.Builder#mediaType(MediaType)}.
+ * Specifies the default media type for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#mediaType(MediaType)}.
* Typically used for POJO swaps that need to serialize the same POJO classes differently depending on
* the specific requested media type. For example, a swap could handle a request for media types <js>"application/json"</js>
* and <js>"application/json+foo"</js> slightly differently even though they're both being handled by the same JSON
@@ -2710,7 +2710,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <jc>// Define a POJO swap that skips serializing beans if the media type is application/json.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getMediaType().equals(<js>"application/json"</js>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -2726,7 +2726,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#mediaType()}
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#mediaType(MediaType)}
* </ul>
*
* @param value The new value for this property.
@@ -3230,12 +3230,12 @@ public class BeanContext extends Context implements ConversionFinder {
* <jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
*
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, Date <jv>date</jv>) {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, Date <jv>date</jv>) {
* <jk>return</jk> <jf>format</jf>.format(<jv>date</jv>);
* }
*
* <ja>@Override</ja>
- * <jk>public</jk> Date unswap(BeanSession <jv>session</jv>, String <jv>string</jv>, ClassMeta <jv>hint</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> Date unswap(MarshallingSession <jv>session</jv>, String <jv>string</jv>, ClassMeta <jv>hint</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> <jf>format</jf>.parse(<jv>string</jv>);
* }
* }
@@ -3290,17 +3290,17 @@ public class BeanContext extends Context implements ConversionFinder {
* <i><l>Context</l> configuration property: </i> TimeZone.
*
* <p>
- * Specifies the default time zone for serializer and parser sessions when not specified via {@link BeanSession.Builder#timeZone(TimeZone)}.
+ * Specifies the default time zone for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#timeZone(TimeZone)}.
* Typically used for POJO swaps that need to deal with timezones such as swaps that convert <l>Date</l> and <l>Calendar</l>
- * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(BeanSession, Object)} and
- * {@link ObjectSwap#unswap(BeanSession, Object, ClassMeta, String)} methods.
+ * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(MarshallingSession, Object)} and
+ * {@link ObjectSwap#unswap(MarshallingSession, Object, ClassMeta, String)} methods.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Define a POJO swap that skips serializing beans if the time zone is GMT.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getTimeZone().equals(TimeZone.<jsf>GMT</jsf>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -3316,7 +3316,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#timeZone()}
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#timeZone(TimeZone)}
* </ul>
*
* @param value The new value for this property.
@@ -3608,10 +3608,10 @@ public class BeanContext extends Context implements ConversionFinder {
// @formatter:on
/** Default config. All default settings. */
- public static final BeanContext DEFAULT = create().build();
+ public static final MarshallingContext DEFAULT = create().build();
/** Default reusable unmodifiable session. Can be used to avoid overhead of creating a session (for creating BeanMaps for example).*/
- public static final BeanSession DEFAULT_SESSION = DEFAULT.createSession().unmodifiable().build();
+ public static final MarshallingSession DEFAULT_SESSION = DEFAULT.createSession().unmodifiable().build();
/**
* Creates a new builder for this object.
@@ -3640,7 +3640,7 @@ public class BeanContext extends Context implements ConversionFinder {
private final NullableSupplier<WriterSerializer> beanToStringSerializer;
private final BeanRegistry beanRegistry;
- private final BeanSession defaultSession;
+ private final MarshallingSession defaultSession;
private final ConfigurableConverter converter;
private final boolean beanMapPutReturnsOldValue;
private final boolean beansRequireDefaultConstructor;
@@ -3687,7 +3687,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* @param builder The builder for this object.
*/
- public BeanContext(Builder builder) {
+ public MarshallingContext(Builder builder) {
super(builder);
beanClassVisibility = builder.beanClassVisibility;
@@ -3743,7 +3743,7 @@ public class BeanContext extends Context implements ConversionFinder {
else if (ci.isAssignableTo(Surrogate.class))
objectSwapsList.addAll(SurrogateSwap.findObjectSwaps(ci.inner(), this));
else
- throw rex("Invalid class {0} specified in BeanContext.swaps property. Must be a subclass of ObjectSwap or Surrogate.", cn(ci.inner()));
+ throw rex("Invalid class {0} specified in MarshallingContext.swaps property. Must be a subclass of ObjectSwap or Surrogate.", cn(ci.inner()));
}
});
objectSwaps = u(objectSwapsList);
@@ -3755,7 +3755,7 @@ public class BeanContext extends Context implements ConversionFinder {
beanRegistry = new BeanRegistry(this, null, list());
defaultSession = createSession().unmodifiable().build();
- beanToStringSerializer = memoize(() -> Json5Serializer.create().beanContext(this).build());
+ beanToStringSerializer = memoize(() -> Json5Serializer.create().marshallingContext(this).build());
}
/**
@@ -3769,7 +3769,7 @@ public class BeanContext extends Context implements ConversionFinder {
* @param type The class type to convert the value to.
* @throws InvalidDataConversionException If the specified value cannot be converted to the specified type.
* @return The converted value.
- * @see BeanSession#convertToType(Object, Class)
+ * @see MarshallingSession#convertToType(Object, Class)
*/
public final <T> T convertToType(Object value, Class<T> type) throws InvalidDataConversionException {
return defaultSession.convertToType(value, type);
@@ -3781,14 +3781,14 @@ public class BeanContext extends Context implements ConversionFinder {
}
@Override /* Overridden from Context */
- public BeanSession.Builder createSession() {
- return BeanSession.create(this);
+ public MarshallingSession.Builder createSession() {
+ return MarshallingSession.create(this);
}
/**
* Minimum bean class visibility.
*
- * @see BeanContext.Builder#beanClassVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanClassVisibility(Visibility)
* @return
* Classes are not considered beans unless they meet the minimum visibility requirements.
*/
@@ -3797,7 +3797,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Minimum bean constructor visibility.
*
- * @see BeanContext.Builder#beanConstructorVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanConstructorVisibility(Visibility)
* @return
* Only look for constructors with this specified minimum visibility.
*/
@@ -3806,7 +3806,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* The bean store used for factory-based instantiation.
*
- * @see BeanContext.Builder#beanStore(BeanStore)
+ * @see MarshallingContext.Builder#beanStore(BeanStore)
* @return The bean store, or <jk>null</jk> if none configured.
*/
public final BeanStore getBeanStore() { return beanStore; }
@@ -3814,7 +3814,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Bean dictionary.
*
- * @see BeanContext.Builder#beanDictionary()
+ * @see MarshallingContext.Builder#beanDictionary()
* @return
* The list of classes that make up the bean dictionary in this bean context.
* <br>Never <jk>null</jk>.
@@ -3826,7 +3826,7 @@ public class BeanContext extends Context implements ConversionFinder {
* Minimum bean field visibility.
*
*
- * @see BeanContext.Builder#beanFieldVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanFieldVisibility(Visibility)
* @return
* Only look for bean fields with this specified minimum visibility.
*/
@@ -3840,7 +3840,7 @@ public class BeanContext extends Context implements ConversionFinder {
public final ConfigurableConverter getConverter() { return converter; }
/**
- * Implements {@link ConversionFinder} to provide all BeanContext-specific type conversions that cannot
+ * Implements {@link ConversionFinder} to provide all MarshallingContext-specific type conversions that cannot
* be expressed in {@link BasicConverter} (which has no dependency on {@code juneau-marshall}).
*
* <p>
@@ -3877,7 +3877,7 @@ public class BeanContext extends Context implements ConversionFinder {
if (nc.isAssignableFrom(outType) && (fc.isAssignableFrom(inType) || Map.class.isAssignableFrom(inType) || Number.class.isAssignableFrom(inType))) {
return (in, memberOf, session, args) -> {
try {
- var bs = beanSession(session);
+ var bs = marshallingSession(session);
var resolvedSwap = bs != null ? toMeta.getSwap(bs) : null;
var activeSwap = (ObjectSwap<Object,Object>) (resolvedSwap != null ? resolvedSwap : swap);
var swapClass = activeSwap.getSwapClass().inner();
@@ -3900,7 +3900,7 @@ public class BeanContext extends Context implements ConversionFinder {
if (nc.isAssignableFrom(inType) && fc.isAssignableFrom(outType)) {
return (in, memberOf, session, args) -> {
try {
- var bs = beanSession(session);
+ var bs = marshallingSession(session);
return ((ObjectSwap<Object,Object>) swap).swap(bs, in);
} catch (Exception e) {
throw rex(e);
@@ -3919,7 +3919,7 @@ public class BeanContext extends Context implements ConversionFinder {
if (fcBoxed.isAssignableFrom(inType) || Map.class.isAssignableFrom(inType) || Number.class.isAssignableFrom(inType)) {
return (in, memberOf, session, args) -> {
try {
- var bs = beanSession(session);
+ var bs = marshallingSession(session);
var activeSwap = (ObjectSwap<Object,Object>) toMeta.getSwap(bs);
if (activeSwap == null) return null;
// Use boxed swap class to handle primitive return types (e.g. int.class → Integer.class)
@@ -3943,7 +3943,7 @@ public class BeanContext extends Context implements ConversionFinder {
if (fcBoxed.isAssignableFrom(outType) || outType == Object.class) {
return (in, memberOf, session, args) -> {
try {
- var bs = beanSession(session);
+ var bs = marshallingSession(session);
var activeSwap = (ObjectSwap<Object,Object>) fromMeta.getSwap(bs);
if (activeSwap == null) return null;
return activeSwap.swap(bs, in);
@@ -4250,7 +4250,7 @@ public class BeanContext extends Context implements ConversionFinder {
// --- Object → Bean via toString() + BeanMap.load() (fallback for bean-compatible types) ---
// Replicates the old convertToMemberType fallback for beans (newBeanMap + load + getBean).
- // Excludes cases where input is already assignable to output (handled by BeanSession isInstance shortcut).
+ // Excludes cases where input is already assignable to output (handled by MarshallingSession isInstance shortcut).
if (toMeta.isBean() && !Map.class.isAssignableFrom(inType) && !CharSequence.class.isAssignableFrom(inType)
&& !outType.isAssignableFrom(inType)) {
return (in, memberOf, session, args) -> {
@@ -4270,12 +4270,12 @@ public class BeanContext extends Context implements ConversionFinder {
return session == null ? null : session.get(TimeZone.class).orElse(null);
}
- private static BeanSession beanSession(ConverterSession session) {
- return session instanceof BeanSession bs ? bs : null;
+ private static MarshallingSession marshallingSession(ConverterSession session) {
+ return session instanceof MarshallingSession bs ? bs : null;
}
- private BeanSession beanSessionOrDefault(ConverterSession session) {
- return session instanceof BeanSession bs ? bs : defaultSession;
+ private MarshallingSession beanSessionOrDefault(ConverterSession session) {
+ return session instanceof MarshallingSession bs ? bs : defaultSession;
}
private static Collection<Object> newCollection(Class<?> outType) {
@@ -4310,7 +4310,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Minimum bean method visibility.
*
- * @see BeanContext.Builder#beanMethodVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanMethodVisibility(Visibility)
* @return
* Only look for bean methods with this specified minimum visibility.
*/
@@ -4320,7 +4320,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Bean type property name.
*
- * @see BeanContext.Builder#typePropertyName(String)
+ * @see MarshallingContext.Builder#typePropertyName(String)
* @return
* The name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
*/
@@ -4420,7 +4420,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Locale.
*
- * @see BeanContext.Builder#locale(Locale)
+ * @see MarshallingContext.Builder#locale(Locale)
* @return
* The default locale for serializer and parser sessions.
*/
@@ -4429,7 +4429,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Media type.
*
- * @see BeanContext.Builder#mediaType(MediaType)
+ * @see MarshallingContext.Builder#mediaType(MediaType)
* @return
* The default media type value for serializer and parser sessions.
*/
@@ -4438,7 +4438,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Time zone.
*
- * @see BeanContext.Builder#timeZone(TimeZone)
+ * @see MarshallingContext.Builder#timeZone(TimeZone)
* @return
* The default timezone for serializer and parser sessions.
*/
@@ -4447,7 +4447,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Bean package exclusions.
*
- * @see BeanContext.Builder#notBeanPackages(String...)
+ * @see MarshallingContext.Builder#notBeanPackages(String...)
* @return
* The set of fully-qualified package names to exclude from being classified as beans.
* <br>Never <jk>null</jk>.
@@ -4459,19 +4459,19 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Bean property namer.
*
- * @see BeanContext.Builder#propertyNamer(Class)
+ * @see MarshallingContext.Builder#propertyNamer(Class)
* @return
* The interface used to calculate bean property names.
*/
public final PropertyNamer getPropertyNamer() { return propertyNamerBean; }
@Override /* Overridden from Context */
- public BeanSession getSession() { return defaultSession; }
+ public MarshallingSession getSession() { return defaultSession; }
/**
* Java object swaps.
*
- * @see BeanContext.Builder#swaps(Class...)
+ * @see MarshallingContext.Builder#swaps(Class...)
* @return
* The list POJO swaps defined.
* <br>Never <jk>null</jk>.
@@ -4489,7 +4489,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <br>Cannot be <jk>null</jk>.
* @return <jk>true</jk> if the bean contexts have equivalent settings and thus share caches.
*/
- public final boolean hasSameCache(BeanContext bc) {
+ public final boolean hasSameCache(MarshallingContext bc) {
assertArgNotNull(ARG_bc, bc);
return bc.getCmCache() == this.getCmCache();
}
@@ -4497,7 +4497,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* BeanMap.put() returns old property value.
*
- * @see BeanContext.Builder#beanMapPutReturnsOldValue()
+ * @see MarshallingContext.Builder#beanMapPutReturnsOldValue()
* @return
* <jk>true</jk> if the {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property values.
* <br>Otherwise, it returns <jk>null</jk>.
@@ -4507,7 +4507,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Beans require no-arg constructors.
*
- * @see BeanContext.Builder#beansRequireDefaultConstructor()
+ * @see MarshallingContext.Builder#beansRequireDefaultConstructor()
* @return
* <jk>true</jk> if a Java class must implement a default no-arg constructor to be considered a bean.
* <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
@@ -4517,7 +4517,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Beans require Serializable interface.
*
- * @see BeanContext.Builder#beansRequireSerializable()
+ * @see MarshallingContext.Builder#beansRequireSerializable()
* @return
* <jk>true</jk> if a Java class must implement the {@link Serializable} interface to be considered a bean.
* <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
@@ -4527,7 +4527,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Beans require setters for getters.
*
- * @see BeanContext.Builder#beansRequireSettersForGetters()
+ * @see MarshallingContext.Builder#beansRequireSettersForGetters()
* @return
* <jk>true</jk> if only getters that have equivalent setters will be considered as properties on a bean.
* <br>Otherwise, they are ignored.
@@ -4537,7 +4537,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Beans require at least one property.
*
- * @see BeanContext.Builder#disableBeansRequireSomeProperties()
+ * @see MarshallingContext.Builder#disableBeansRequireSomeProperties()
* @return
* <jk>true</jk> if a Java class doesn't need to contain at least 1 property to be considered a bean.
* <br>Otherwise, the bean is serialized as a string using the {@link Object#toString()} method.
@@ -4550,7 +4550,7 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>Description:</h5>
* <p>
*
- * @see BeanContext.Builder#findFluentSetters()
+ * @see MarshallingContext.Builder#findFluentSetters()
* @return
* <jk>true</jk> if fluent setters are detected on beans.
*/
@@ -4559,7 +4559,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore invocation errors on getters.
*
- * @see BeanContext.Builder#ignoreInvocationExceptionsOnGetters()
+ * @see MarshallingContext.Builder#ignoreInvocationExceptionsOnGetters()
* @return
* <jk>true</jk> if errors thrown when calling bean getter methods are silently ignored.
*/
@@ -4568,7 +4568,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore invocation errors on setters.
*
- * @see BeanContext.Builder#ignoreInvocationExceptionsOnSetters()
+ * @see MarshallingContext.Builder#ignoreInvocationExceptionsOnSetters()
* @return
* <jk>true</jk> if errors thrown when calling bean setter methods are silently ignored.
*/
@@ -4577,7 +4577,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Silently ignore missing setters.
*
- * @see BeanContext.Builder#disableIgnoreMissingSetters()
+ * @see MarshallingContext.Builder#disableIgnoreMissingSetters()
* @return
* <jk>true</jk> if trying to set a value on a bean property without a setter should throw a {@link BeanRuntimeException}.
*/
@@ -4586,7 +4586,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore unknown properties.
*
- * @see BeanContext.Builder#ignoreUnknownBeanProperties()
+ * @see MarshallingContext.Builder#ignoreUnknownBeanProperties()
* @return
* <jk>true</jk> if trying to set a value on a non-existent bean property is silently ignored.
* <br>Otherwise, a {@code RuntimeException} is thrown.
@@ -4596,7 +4596,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore unknown enum values.
*
- * @see BeanContext.Builder#ignoreUnknownEnumValues()
+ * @see MarshallingContext.Builder#ignoreUnknownEnumValues()
* @return
* <jk>true</jk> if unknown enum values should be set as <jk>null</jk> instead of throwing an exception.
*/
@@ -4605,7 +4605,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore unknown properties with null values.
*
- * @see BeanContext.Builder#disableIgnoreUnknownNullBeanProperties()
+ * @see MarshallingContext.Builder#disableIgnoreUnknownNullBeanProperties()
* @return
* <jk>true</jk> if trying to set a <jk>null</jk> value on a non-existent bean property should throw a {@link BeanRuntimeException}.
*/
@@ -4614,7 +4614,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Returns whether bean properties are unsorted (i.e. in natural JVM order rather than alphabetical).
*
- * @see BeanContext.Builder#unsortedProperties()
+ * @see MarshallingContext.Builder#unsortedProperties()
* @return
* <jk>true</jk> if bean properties are in natural JVM order; <jk>false</jk> (the default) means alphabetical order.
*/
@@ -4623,7 +4623,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Use enum names.
*
- * @see BeanContext.Builder#useEnumNames()
+ * @see MarshallingContext.Builder#useEnumNames()
* @return
* <jk>true</jk> if enums are always serialized by name, not using {@link Object#toString()}.
*/
@@ -4632,7 +4632,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Use interface proxies.
*
- * @see BeanContext.Builder#disableInterfaceProxies()
+ * @see MarshallingContext.Builder#disableInterfaceProxies()
* @return
* <jk>true</jk> if interfaces will be instantiated as proxy classes through the use of an
* {@link InvocationHandler} if there is no other way of instantiating them.
@@ -4642,7 +4642,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Use Java Introspector.
*
- * @see BeanContext.Builder#useJavaBeanIntrospector()
+ * @see MarshallingContext.Builder#useJavaBeanIntrospector()
* @return
* <jk>true</jk> if the built-in Java bean introspector should be used for bean introspection.
*/
@@ -4658,14 +4658,14 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a new bean map wrapped around a new Person object</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>);
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>);
* </p>
*
* @param <T> The class of the object being wrapped.
* @param c The name of the class to create a new instance of.
* <br>Cannot be <jk>null</jk>.
* @return A new instance of the class.
- * @see BeanSession#newBeanMap(Class)
+ * @see MarshallingSession#newBeanMap(Class)
*/
public <T> BeanMap<T> newBeanMap(Class<T> c) {
assertArgNotNull(ARG_c, c);
@@ -4681,14 +4681,14 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a bean map around a bean instance</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person());
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person());
* </p>
*
* @param <T> The class of the object being wrapped.
* @param object The object to wrap in a map interface.
* <br>Cannot be <jk>null</jk>.
* @return The wrapped object.
- * @see BeanSession#toBeanMap(Object)
+ * @see MarshallingSession#toBeanMap(Object)
*/
public <T> BeanMap<T> toBeanMap(T object) {
assertArgNotNull(ARG_object, object);
@@ -4703,7 +4703,7 @@ public class BeanContext extends Context implements ConversionFinder {
protected final BeanRegistry getBeanRegistry() { return beanRegistry; }
/**
- * Returns the serializer to use for serializing beans when using the {@link BeanSession#convertToType(Object, Class)}
+ * Returns the serializer to use for serializing beans when using the {@link MarshallingSession#convertToType(Object, Class)}
* and related methods.
*
* @return The serializer. May be <jk>null</jk> if all initialization has occurred.
@@ -4744,7 +4744,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Bean class exclusions.
*
- * @see BeanContext.Builder#notBeanClasses(ClassInfo...)
+ * @see MarshallingContext.Builder#notBeanClasses(ClassInfo...)
* @return
* The list of classes that are explicitly not beans.
* <br>Never <jk>null</jk>.
@@ -4762,7 +4762,7 @@ public class BeanContext extends Context implements ConversionFinder {
/**
* Ignore transient fields.
*
- * @see BeanContext.Builder#disableIgnoreTransientFields()
+ * @see MarshallingContext.Builder#disableIgnoreTransientFields()
* @return
* <jk>true</jk> if fields and methods marked as transient should not be ignored.
*/
@@ -4977,7 +4977,7 @@ public class BeanContext extends Context implements ConversionFinder {
// This classmeta could have been created by a different context.
// Need to re-resolve it to pick up ObjectSwaps and stuff on this context.
- if (cm.getBeanContext() == this)
+ if (cm.getMarshallingContext() == this)
return cm;
if (cm.isMap())
return getClassMeta(cm.inner(), cm.getKeyType(), cm.getValueType());
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/MarshallingContextable.java
similarity index 94%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanContextable.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingContextable.java
index b314c431ee..e8dadb4eb5 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/MarshallingContextable.java
@@ -35,7 +35,7 @@ import org.apache.juneau.commons.reflect.Visibility;
import org.apache.juneau.swap.*;
/**
- * Context class for classes that use {@link BeanContext} objects.
+ * Context class for classes that use {@link MarshallingContext} objects.
*
* <p>
* This abstraction exists to allow different kinds of subclasses (e.g. JsonSerilalizer, XmlParser...) to share bean context objects since
@@ -48,10 +48,10 @@ import org.apache.juneau.swap.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_beanContext, ARG_value)
})
-public abstract class BeanContextable extends Context {
+public abstract class MarshallingContextable extends Context {
// Property name constants
- private static final String PROP_beanContext = "beanContext";
+ private static final String PROP_beanContext = "marshallingContext";
// Argument name constants for assertArgNotNull
private static final String ARG_value = "value";
@@ -76,8 +76,8 @@ public abstract class BeanContextable extends Context {
})
public abstract static class Builder extends Context.Builder {
- private BeanContext.Builder bcBuilder;
- private BeanContext bc;
+ private MarshallingContext.Builder bcBuilder;
+ private MarshallingContext bc;
/**
* Constructor.
@@ -85,7 +85,7 @@ public abstract class BeanContextable extends Context {
* All default settings.
*/
protected Builder() {
- this.bcBuilder = BeanContext.create();
+ this.bcBuilder = MarshallingContext.create();
registerBuilders(bcBuilder);
}
@@ -94,9 +94,9 @@ public abstract class BeanContextable extends Context {
*
* @param copyFrom The bean to copy from.
*/
- protected Builder(BeanContextable copyFrom) {
+ protected Builder(MarshallingContextable copyFrom) {
super(copyFrom);
- this.bcBuilder = copyFrom.getBeanContext().copy();
+ this.bcBuilder = copyFrom.getMarshallingContext().copy();
registerBuilders(bcBuilder);
}
@@ -239,7 +239,7 @@ public abstract class BeanContextable extends Context {
*
* @return The inner bean context builder.
*/
- public BeanContext.Builder beanContext() {
+ public MarshallingContext.Builder marshallingContext() {
return bcBuilder;
}
@@ -248,14 +248,14 @@ public abstract class BeanContextable extends Context {
*
* <p>
* Provides an optimization for cases where serializers and parsers can use an existing
- * bean context without having to go through <c><jv>beanContext</jv>.copy().build()</c>.
- * An example is {@link BeanContext#getBeanToStringSerializer()}.
+ * bean context without having to go through <c><jv>marshallingContext</jv>.copy().build()</c>.
+ * An example is {@link MarshallingContext#getBeanToStringSerializer()}.
*
* @param value The bean context to use.
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public Builder beanContext(BeanContext value) {
+ public Builder marshallingContext(MarshallingContext value) {
bc = assertArgNotNull(ARG_value, value);
return this;
}
@@ -272,7 +272,7 @@ public abstract class BeanContextable extends Context {
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public Builder beanContext(BeanContext.Builder value) {
+ public Builder marshallingContext(MarshallingContext.Builder value) {
bcBuilder = assertArgNotNull(ARG_value, value);
return this;
}
@@ -284,9 +284,9 @@ public abstract class BeanContextable extends Context {
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public final Builder beanContext(Consumer<BeanContext.Builder> operation) {
+ public final Builder marshallingContext(Consumer<MarshallingContext.Builder> operation) {
assertArgNotNull(ARG_operation, operation);
- operation.accept(beanContext());
+ operation.accept(marshallingContext());
return this;
}
@@ -453,7 +453,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Interceptor that strips out sensitive information.</jc>
- * <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> {
+ * <jk>public class</jk> AddressInterceptor <jk>extends</jk> MarshallingInterceptor<Address> {
*
* <jk>public</jk> Object readProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
* <jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>))
@@ -485,7 +485,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jc'>{@link BeanInterceptor}
+ * <li class='jc'>{@link MarshallingInterceptor}
* <li class='ja'>{@link Bean#interceptor() Bean(interceptor)}
* </ul>
*
@@ -496,7 +496,7 @@ public abstract class BeanContextable extends Context {
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public Builder beanInterceptor(Class<?> on, Class<? extends BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends MarshallingInterceptor<?>> value) {
bcBuilder.beanInterceptor(assertArgNotNull(ARG_on, on), assertArgNotNull(ARG_value, value));
return this;
}
@@ -514,7 +514,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Create a context that creates BeanMaps with normal put() behavior.</jc>
- * BeanContext <jv>context</jv> = BeanContext
+ * MarshallingContext <jv>context</jv> = MarshallingContext
* .<jsm>create</jsm>()
* .beanMapPutReturnsOldValue()
* .build();
@@ -526,7 +526,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#beanMapPutReturnsOldValue()}
- * <li class='jm'>{@link BeanContext.Builder#beanMapPutReturnsOldValue()}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanMapPutReturnsOldValue()}
* </ul>
*
* @return This object.
@@ -1322,7 +1322,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#beansRequireDefaultConstructor()}
- * <li class='jm'>{@link BeanContext.Builder#beansRequireDefaultConstructor()}
+ * <li class='jm'>{@link MarshallingContext.Builder#beansRequireDefaultConstructor()}
* </ul>
*
* @return This object.
@@ -1370,7 +1370,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#beansRequireSerializable()}
- * <li class='jm'>{@link BeanContext.Builder#beansRequireSerializable()}
+ * <li class='jm'>{@link MarshallingContext.Builder#beansRequireSerializable()}
* </ul>
*
* @return This object.
@@ -1416,7 +1416,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#beansRequireSettersForGetters()}
- * <li class='jm'>{@link BeanContext.Builder#beansRequireSettersForGetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#beansRequireSettersForGetters()}
* </ul>
*
* @return This object.
@@ -1477,7 +1477,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
- * <li class='jm'>{@link BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @param on The class that the dictionary values apply to.
@@ -1526,7 +1526,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#disableBeansRequireSomeProperties()}
- * <li class='jm'>{@link BeanContext.Builder#disableBeansRequireSomeProperties()}
+ * <li class='jm'>{@link MarshallingContext.Builder#disableBeansRequireSomeProperties()}
* </ul>
*
* @return This object.
@@ -1568,7 +1568,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#disableIgnoreMissingSetters()}
- * <li class='jm'>{@link BeanContext.Builder#disableIgnoreMissingSetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#disableIgnoreMissingSetters()}
* </ul>
*
* @return This object.
@@ -1607,7 +1607,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#disableIgnoreTransientFields()}
- * <li class='jm'>{@link BeanContext.Builder#disableIgnoreTransientFields()}
+ * <li class='jm'>{@link MarshallingContext.Builder#disableIgnoreTransientFields()}
* </ul>
*
* @return This object.
@@ -1643,7 +1643,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#disableIgnoreUnknownNullBeanProperties()}
- * <li class='jm'>{@link BeanContext.Builder#disableIgnoreUnknownNullBeanProperties()}
+ * <li class='jm'>{@link MarshallingContext.Builder#disableIgnoreUnknownNullBeanProperties()}
* </ul>
*
* @return This object.
@@ -1663,7 +1663,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#disableInterfaceProxies()}
- * <li class='jm'>{@link BeanContext.Builder#disableInterfaceProxies()}
+ * <li class='jm'>{@link MarshallingContext.Builder#disableInterfaceProxies()}
* </ul>
*
* @return This object.
@@ -1704,8 +1704,8 @@ public abstract class BeanContextable extends Context {
* 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.
+ * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link MarshallingSession} argument.
+ * <li>A static method with name <c>example</c> with no arguments or one {@link MarshallingSession} argument.
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
@@ -1758,8 +1758,8 @@ public abstract class BeanContextable extends Context {
* <ul class='spaced-list'>
* <li>The {@link Marshalled#example()} annotation on the class itself.
* <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.
+ * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link MarshallingSession} argument.
+ * <li>A static method with name <c>example</c> with no arguments or one {@link MarshallingSession} argument.
* </ul>
*
* @param <T> The POJO class.
@@ -1815,7 +1815,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#findFluentSetters()}
* <li class='ja'>{@link MarshalledConfig#findFluentSetters()}
- * <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#findFluentSetters()}
* </ul>
*
* @return This object.
@@ -1854,7 +1854,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#findFluentSetters()}
- * <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#findFluentSetters()}
* </ul>
*
* @param on The class that this applies to.
@@ -1905,7 +1905,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#ignoreInvocationExceptionsOnGetters()}
- * <li class='jm'>{@link BeanContext.Builder#ignoreInvocationExceptionsOnGetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#ignoreInvocationExceptionsOnGetters()}
* </ul>
*
* @return This object.
@@ -1943,7 +1943,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#ignoreInvocationExceptionsOnSetters()}
- * <li class='jm'>{@link BeanContext.Builder#ignoreInvocationExceptionsOnSetters()}
+ * <li class='jm'>{@link MarshallingContext.Builder#ignoreInvocationExceptionsOnSetters()}
* </ul>
*
* @return This object.
@@ -1979,7 +1979,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#ignoreUnknownBeanProperties()}
- * <li class='jm'>{@link BeanContext.Builder#ignoreUnknownBeanProperties()}
+ * <li class='jm'>{@link MarshallingContext.Builder#ignoreUnknownBeanProperties()}
* </ul>
*
* @return This object.
@@ -1997,7 +1997,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#ignoreUnknownEnumValues()}
- * <li class='jm'>{@link BeanContext.Builder#ignoreUnknownEnumValues()}
+ * <li class='jm'>{@link MarshallingContext.Builder#ignoreUnknownEnumValues()}
* </ul>
*
* @return This object.
@@ -2193,17 +2193,17 @@ public abstract class BeanContextable extends Context {
* <i><l>Context</l> configuration property: </i> Locale.
*
* <p>
- * Specifies the default locale for serializer and parser sessions when not specified via {@link BeanSession.Builder#locale(Locale)}.
+ * Specifies the default locale for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#locale(Locale)}.
* Typically used for POJO swaps that need to deal with locales such as swaps that convert <l>Date</l> and <l>Calendar</l>
- * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(BeanSession, Object)} and
- * {@link ObjectSwap#unswap(BeanSession, Object, ClassMeta, String)} methods.
+ * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(MarshallingSession, Object)} and
+ * {@link ObjectSwap#unswap(MarshallingSession, Object, ClassMeta, String)} methods.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Define a POJO swap that skips serializing beans if we're in the UK.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getLocale().equals(Locale.<jsf>UK</jsf>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -2220,8 +2220,8 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#locale()}
- * <li class='jm'>{@link BeanContext.Builder#locale(Locale)}
- * <li class='jm'>{@link BeanSession.Builder#locale(Locale)}
+ * <li class='jm'>{@link MarshallingContext.Builder#locale(Locale)}
+ * <li class='jm'>{@link MarshallingSession.Builder#locale(Locale)}
* </ul>
*
* @param value The new value for this property.
@@ -2237,7 +2237,7 @@ public abstract class BeanContextable extends Context {
* <i><l>Context</l> configuration property: </i> Media type.
*
* <p>
- * Specifies the default media type for serializer and parser sessions when not specified via {@link BeanSession.Builder#mediaType(MediaType)}.
+ * Specifies the default media type for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#mediaType(MediaType)}.
* Typically used for POJO swaps that need to serialize the same POJO classes differently depending on
* the specific requested media type. For example, a swap could handle a request for media types <js>"application/json"</js>
* and <js>"application/json+foo"</js> slightly differently even though they're both being handled by the same JSON
@@ -2248,7 +2248,7 @@ public abstract class BeanContextable extends Context {
* <jc>// Define a POJO swap that skips serializing beans if the media type is application/json.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getMediaType().equals(<js>"application/json"</js>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -2264,8 +2264,8 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#mediaType()}
- * <li class='jm'>{@link BeanContext.Builder#mediaType(MediaType)}
- * <li class='jm'>{@link BeanSession.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link MarshallingContext.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link MarshallingSession.Builder#mediaType(MediaType)}
* </ul>
*
* @param value The new value for this property.
@@ -2319,7 +2319,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledIgnore}
* <li class='ja'>{@link MarshalledConfig#notBeanClasses()}
- * <li class='jf'>{@link BeanContext.Builder#notBeanClasses()}
+ * <li class='jf'>{@link MarshallingContext.Builder#notBeanClasses()}
* </ul>
*
* @param values
@@ -2342,7 +2342,7 @@ public abstract class BeanContextable extends Context {
* Bean package exclusions.
*
* <p>
- * Used as a convenient way of defining the {@link BeanContext.Builder#notBeanClasses(Class...)} property for entire packages.
+ * Used as a convenient way of defining the {@link MarshallingContext.Builder#notBeanClasses(Class...)} property for entire packages.
* Any classes within these packages will be serialized to strings using {@link Object#toString()}.
*
* <p>
@@ -2365,7 +2365,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link BeanContext.Builder#notBeanPackages(String...)}
+ * <li class='jm'>{@link MarshallingContext.Builder#notBeanPackages(String...)}
* </ul>
*
* @param values
@@ -2411,7 +2411,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#propertyNamer() Bean(propertyNamer)}
- * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jm'>{@link MarshallingContext.Builder#propertyNamer(Class)}
* </ul>
*
* @param on The class that the namer applies to.
@@ -2460,7 +2460,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jm'>{@link MarshallingContext.Builder#propertyNamer(Class)}
* </ul>
*
* @param value
@@ -2481,7 +2481,7 @@ public abstract class BeanContextable extends Context {
* When called, bean properties will be serialized in natural JVM-dependent order instead of the default alphabetical order.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link BeanContext.Builder#unsortedProperties()}
+ * <li class='jm'>{@link MarshallingContext.Builder#unsortedProperties()}
* </ul>
*
* @return This object.
@@ -2496,7 +2496,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#unsorted() Bean(unsorted)}
- * <li class='jm'>{@link BeanContext.Builder#unsortedProperties(Class...)}
+ * <li class='jm'>{@link MarshallingContext.Builder#unsortedProperties(Class...)}
* </ul>
*
* @param on The bean classes to opt out of sorted properties.
@@ -2663,12 +2663,12 @@ public abstract class BeanContextable extends Context {
* <jk>private</jk> DateFormat <jf>format</jf> = <jk>new</jk> SimpleDateFormat(<js>"yyyy-MM-dd'T'HH:mm:ssZ"</js>);
*
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, Date <jv>date</jv>) {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, Date <jv>date</jv>) {
* <jk>return</jk> <jf>format</jf>.format(<jv>date</jv>);
* }
*
* <ja>@Override</ja>
- * <jk>public</jk> Date unswap(BeanSession <jv>session</jv>, String <jv>string</jv>, ClassMeta <jv>hint</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> Date unswap(MarshallingSession <jv>session</jv>, String <jv>string</jv>, ClassMeta <jv>hint</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> <jf>format</jf>.parse(<jv>string</jv>);
* }
* }
@@ -2703,7 +2703,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jf'>{@link BeanContext.Builder#swaps(Class...)}
+ * <li class='jf'>{@link MarshallingContext.Builder#swaps(Class...)}
* </ul>
*
* @param values
@@ -2727,17 +2727,17 @@ public abstract class BeanContextable extends Context {
* <i><l>Context</l> configuration property: </i> TimeZone.
*
* <p>
- * Specifies the default time zone for serializer and parser sessions when not specified via {@link BeanSession.Builder#timeZone(TimeZone)}.
+ * Specifies the default time zone for serializer and parser sessions when not specified via {@link MarshallingSession.Builder#timeZone(TimeZone)}.
* Typically used for POJO swaps that need to deal with timezones such as swaps that convert <l>Date</l> and <l>Calendar</l>
- * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(BeanSession, Object)} and
- * {@link ObjectSwap#unswap(BeanSession, Object, ClassMeta, String)} methods.
+ * objects to strings by accessing it via the session passed into the {@link ObjectSwap#swap(MarshallingSession, Object)} and
+ * {@link ObjectSwap#unswap(MarshallingSession, Object, ClassMeta, String)} methods.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Define a POJO swap that skips serializing beans if the time zone is GMT.</jc>
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> StringSwap<MyBean> {
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>if</jk> (<jv>session</jv>.getTimeZone().equals(TimeZone.<jsf>GMT</jsf>))
* <jk>return null</jk>;
* <jk>return</jk> <jv>bean</jv>.toString();
@@ -2753,8 +2753,8 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#timeZone()}
- * <li class='jm'>{@link BeanContext.Builder#timeZone(TimeZone)}
- * <li class='jm'>{@link BeanSession.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link MarshallingContext.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link MarshallingSession.Builder#timeZone(TimeZone)}
* </ul>
*
* @param value The new value for this property.
@@ -2804,7 +2804,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='jc'>{@link Bean#typeName() Bean(typeName)}
- * <li class='jm'>{@link BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @param on
@@ -2851,7 +2851,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#typePropertyName() Bean(typePropertyName)}
- * <li class='jm'>{@link BeanContext.Builder#typePropertyName(String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#typePropertyName(String)}
* </ul>
*
* @param on The class the type property name applies to.
@@ -2910,7 +2910,7 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#typePropertyName()}
* <li class='ja'>{@link MarshalledConfig#typePropertyName()}
- * <li class='jm'>{@link BeanContext.Builder#typePropertyName(String)}
+ * <li class='jm'>{@link MarshallingContext.Builder#typePropertyName(String)}
* </ul>
*
* @param value
@@ -2959,7 +2959,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link BeanContext.Builder#useEnumNames()}
+ * <li class='jm'>{@link MarshallingContext.Builder#useEnumNames()}
* </ul>
*
* @return This object.
@@ -2986,7 +2986,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jmf'>{@link BeanContext.Builder#useJavaBeanIntrospector()}
+ * <li class='jmf'>{@link MarshallingContext.Builder#useJavaBeanIntrospector()}
* </ul>
*
* @return This object.
@@ -2997,16 +2997,16 @@ public abstract class BeanContextable extends Context {
}
}
- protected final BeanContext beanContext;
+ protected final MarshallingContext marshallingContext;
/**
* Constructor.
*
* @param b The builder for this object.
*/
- protected BeanContextable(Builder b) {
+ protected MarshallingContextable(Builder b) {
super(b);
- beanContext = nn(b.bc) ? b.bc : b.bcBuilder.build();
+ marshallingContext = nn(b.bc) ? b.bc : b.bcBuilder.build();
}
/**
@@ -3014,11 +3014,11 @@ public abstract class BeanContextable extends Context {
*
* @return The bean context for this object.
*/
- public BeanContext getBeanContext() { return beanContext; }
+ public MarshallingContext getMarshallingContext() { return marshallingContext; }
@Override /* Overridden from Context */
protected FluentMap<String,Object> properties() {
return super.properties()
- .a(PROP_beanContext, beanContext.properties());
+ .a(PROP_beanContext, marshallingContext.properties());
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingRecursionException.java
similarity index 90%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingRecursionException.java
index 6bd3c23cf1..970a65f52a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanRecursionException.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingRecursionException.java
@@ -26,7 +26,7 @@ import java.text.*;
*
* @serial exclude
*/
-public class BeanRecursionException extends Exception {
+public class MarshallingRecursionException extends Exception {
private static final long serialVersionUID = 1L;
@@ -36,7 +36,7 @@ public class BeanRecursionException extends Exception {
* @param message The {@link MessageFormat}-style message.
* @param args Optional {@link MessageFormat}-style arguments.
*/
- public BeanRecursionException(String message, Object...args) {
+ public MarshallingRecursionException(String message, Object...args) {
super(f(message, args));
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingSession.java
similarity index 89%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingSession.java
index e44d8f4747..0608212e4b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingSession.java
@@ -39,7 +39,7 @@ import org.apache.juneau.commons.reflect.*;
import org.apache.juneau.swap.*;
/**
- * Session object that lives for the duration of a single use of {@link BeanContext}.
+ * Session object that lives for the duration of a single use of {@link MarshallingContext}.
*
* <ul class='spaced-list'>
* <li class='info'>Typically session objects are not thread safe nor reusable. However, bean sessions do not maintain any state and
@@ -53,15 +53,15 @@ import org.apache.juneau.swap.*;
"java:S115", // Constants use UPPER_snakeCase naming convention
"java:S1452" // Wildcard required - ClassMeta<?>, ObjectSwap<?,?>, etc. for bean metadata
})
-public class BeanSession extends ContextSession implements ConverterSession {
+public class MarshallingSession extends ContextSession implements ConverterSession {
// Property name constants
private static final String PROP_locale = "locale";
private static final String PROP_mediaType = "mediaType";
private static final String PROP_timeZone = "timeZone";
- private static final String PROP_BeanSession_locale = "BeanSession.locale";
- private static final String PROP_BeanSession_mediaType = "BeanSession.mediaType";
- private static final String PROP_BeanSession_timeZone = "BeanSession.timeZone";
+ private static final String PROP_BeanSession_locale = "MarshallingSession.locale";
+ private static final String PROP_BeanSession_mediaType = "MarshallingSession.mediaType";
+ private static final String PROP_BeanSession_timeZone = "MarshallingSession.timeZone";
// Argument name constants for assertArgNotNull
private static final String ARG_ctx = "ctx";
@@ -74,7 +74,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
*/
public static class Builder extends ContextSession.Builder {
- private BeanContext ctx;
+ private MarshallingContext ctx;
private Locale locale;
private MediaType mediaType;
private TimeZone timeZone;
@@ -85,7 +85,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* @param ctx The context creating this session.
* <br>Cannot be <jk>null</jk>.
*/
- protected Builder(BeanContext ctx) {
+ protected Builder(MarshallingContext ctx) {
super(assertArgNotNull(ARG_ctx, ctx));
this.ctx = ctx;
mediaType = ctx.getMediaType();
@@ -104,8 +104,8 @@ public class BeanSession extends ContextSession implements ConverterSession {
* @return The built object.
*/
@Override
- public BeanSession build() {
- return new BeanSession(this);
+ public MarshallingSession build() {
+ return new MarshallingSession(this);
}
@Override /* Overridden from Builder */
@@ -121,16 +121,16 @@ public class BeanSession extends ContextSession implements ConverterSession {
* Specifies the default locale for serializer and parser sessions.
*
* <p>
- * If not specified, defaults to {@link BeanContext.Builder#locale(Locale)}.
+ * If not specified, defaults to {@link MarshallingContext.Builder#locale(Locale)}.
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#locale()}
- * <li class='jm'>{@link BeanContext.Builder#locale(Locale)}
+ * <li class='jm'>{@link MarshallingContext.Builder#locale(Locale)}
* </ul>
*
* @param value
* The new value for this property.
- * <br>If <jk>null</jk> defaults to {@link BeanContext#getLocale()}
+ * <br>If <jk>null</jk> defaults to {@link MarshallingContext#getLocale()}
* @return This object.
*/
public Builder locale(Locale value) {
@@ -145,16 +145,16 @@ public class BeanSession extends ContextSession implements ConverterSession {
* Specifies the default media type value for serializer and parser sessions.
*
* <p>
- * If not specified, defaults to {@link BeanContext.Builder#mediaType(MediaType)}.
+ * If not specified, defaults to {@link MarshallingContext.Builder#mediaType(MediaType)}.
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#mediaType()}
- * <li class='jm'>{@link BeanContext.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link MarshallingContext.Builder#mediaType(MediaType)}
* </ul>
*
* @param value
* The new value for this property.
- * <br>If <jk>null</jk> defaults to {@link BeanContext#getMediaType()}.
+ * <br>If <jk>null</jk> defaults to {@link MarshallingContext#getMediaType()}.
* @return This object.
*/
public Builder mediaType(MediaType value) {
@@ -208,16 +208,16 @@ public class BeanSession extends ContextSession implements ConverterSession {
* Specifies the default timezone for serializer and parser sessions.
*
* <p>
- * If not specified, defaults to {@link BeanContext.Builder#timeZone(TimeZone)}.
+ * If not specified, defaults to {@link MarshallingContext.Builder#timeZone(TimeZone)}.
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#timeZone()}
- * <li class='jm'>{@link BeanContext.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link MarshallingContext.Builder#timeZone(TimeZone)}
* </ul>
*
* @param value
* The new value for this property.
- * <br>If <jk>null</jk> defaults to {@link BeanContext#getTimeZone()}.
+ * <br>If <jk>null</jk> defaults to {@link MarshallingContext#getTimeZone()}.
* @return This object.
*/
public Builder timeZone(TimeZone value) {
@@ -246,7 +246,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
}
}
- private static final Logger LOG = Logger.getLogger(cn(BeanSession.class));
+ private static final Logger LOG = Logger.getLogger(cn(MarshallingSession.class));
/**
* Creates a builder of this object.
@@ -255,7 +255,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <br>Cannot be <jk>null</jk>.
* @return A new builder.
*/
- public static Builder create(BeanContext ctx) {
+ public static Builder create(MarshallingContext ctx) {
return new Builder(assertArgNotNull(ARG_ctx, ctx));
}
@@ -267,7 +267,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
*/
public static final String NAME_PROPERTY_NAME = "_name";
- private final BeanContext ctx;
+ private final MarshallingContext ctx;
private final Locale locale;
private final MediaType mediaType;
@@ -278,7 +278,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
*
* @param builder The builder for this object.
*/
- protected BeanSession(Builder builder) {
+ protected MarshallingSession(Builder builder) {
super(builder);
ctx = builder.ctx;
locale = opt(builder.locale).orElse(ctx.getLocale());
@@ -508,7 +508,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Minimum bean class visibility.
*
- * @see BeanContext.Builder#beanClassVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanClassVisibility(Visibility)
* @return
* Classes are not considered beans unless they meet the minimum visibility requirements.
*/
@@ -517,7 +517,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Minimum bean constructor visibility.
*
- * @see BeanContext.Builder#beanConstructorVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanConstructorVisibility(Visibility)
* @return
* Only look for constructors with this specified minimum visibility.
*/
@@ -526,7 +526,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Bean dictionary.
*
- * @see BeanContext.Builder#beanDictionary(ClassInfo...)
+ * @see MarshallingContext.Builder#beanDictionary(ClassInfo...)
* @return
* The list of classes that make up the bean dictionary in this bean context.
* <br>Never <jk>null</jk>.
@@ -538,7 +538,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* Minimum bean field visibility.
*
*
- * @see BeanContext.Builder#beanFieldVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanFieldVisibility(Visibility)
* @return
* Only look for bean fields with this specified minimum visibility.
*/
@@ -562,14 +562,14 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Minimum bean method visibility.
*
- * @see BeanContext.Builder#beanMethodVisibility(Visibility)
+ * @see MarshallingContext.Builder#beanMethodVisibility(Visibility)
* @return
* Only look for bean methods with this specified minimum visibility.
*/
public final Visibility getBeanMethodVisibility() { return ctx.getBeanMethodVisibility(); }
/**
- * Returns the bean registry defined in this bean context defined by {@link BeanContext.Builder#beanDictionary(ClassInfo...)}.
+ * Returns the bean registry defined in this bean context defined by {@link MarshallingContext.Builder#beanDictionary(ClassInfo...)}.
*
* @return The bean registry defined in this bean context. Never <jk>null</jk>.
*/
@@ -578,14 +578,14 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Bean type property name.
*
- * @see BeanContext.Builder#typePropertyName(String)
+ * @see MarshallingContext.Builder#typePropertyName(String)
* @return
* The name of the bean property used to store the dictionary name of a bean type so that the parser knows the data type to reconstruct.
*/
public final String getBeanTypePropertyName() { return ctx.getBeanTypePropertyName(); }
/**
- * Returns the type property name as defined by {@link BeanContext.Builder#typePropertyName(String)}.
+ * Returns the type property name as defined by {@link MarshallingContext.Builder#typePropertyName(String)}.
*
* @param cm
* The class meta of the type we're trying to resolve the type name for.
@@ -677,11 +677,11 @@ public class BeanSession extends ContextSession implements ConverterSession {
* The locale is determined in the following order:
* <ol>
* <li><c>locale</c> parameter passed in through constructor.
- * <li>{@link BeanContext.Builder#locale(Locale)} setting on bean context.
+ * <li>{@link MarshallingContext.Builder#locale(Locale)} setting on bean context.
* <li>Locale returned by {@link Locale#getDefault()}.
* </ol>
*
- * @see BeanContext.Builder#locale(Locale)
+ * @see MarshallingContext.Builder#locale(Locale)
* @return The session locale.
*/
public Locale getLocale() { return locale; }
@@ -692,7 +692,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <p>
* For example, <js>"application/json"</js>.
*
- * @see BeanContext.Builder#mediaType(MediaType)
+ * @see MarshallingContext.Builder#mediaType(MediaType)
* @return The media type for this session, or <jk>null</jk> if not specified.
*/
public final MediaType getMediaType() { return mediaType; }
@@ -700,7 +700,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Bean class exclusions.
*
- * @see BeanContext.Builder#notBeanClasses(ClassInfo...)
+ * @see MarshallingContext.Builder#notBeanClasses(ClassInfo...)
* @return
* The list of classes that are explicitly not beans.
* <br>Never <jk>null</jk>.
@@ -711,7 +711,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Bean package exclusions.
*
- * @see BeanContext.Builder#notBeanPackages(String...)
+ * @see MarshallingContext.Builder#notBeanPackages(String...)
* @return
* The set of fully-qualified package names to exclude from being classified as beans.
* <br>Never <jk>null</jk>.
@@ -722,7 +722,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Bean property namer.
*
- * @see BeanContext.Builder#propertyNamer(Class)
+ * @see MarshallingContext.Builder#propertyNamer(Class)
* @return
* The interface used to calculate bean property names.
*/
@@ -731,7 +731,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Java object swaps.
*
- * @see BeanContext.Builder#swaps(Class...)
+ * @see MarshallingContext.Builder#swaps(Class...)
* @return
* The list POJO swaps defined.
* <br>Never <jk>null</jk>.
@@ -746,10 +746,10 @@ public class BeanSession extends ContextSession implements ConverterSession {
* The timezone is determined in the following order:
* <ol>
* <li><c>timeZone</c> parameter passed in through constructor.
- * <li>{@link BeanContext.Builder#timeZone(TimeZone)} setting on bean context.
+ * <li>{@link MarshallingContext.Builder#timeZone(TimeZone)} setting on bean context.
* </ol>
*
- * @see BeanContext.Builder#timeZone(TimeZone)
+ * @see MarshallingContext.Builder#timeZone(TimeZone)
* @return The session timezone, or <jk>null</jk> if timezone not specified.
*/
public final TimeZone getTimeZone() { return timeZone; }
@@ -761,10 +761,10 @@ public class BeanSession extends ContextSession implements ConverterSession {
* The timezone is determined in the following order:
* <ol>
* <li><c>timeZone</c> parameter passed in through constructor.
- * <li>{@link BeanContext.Builder#timeZone(TimeZone)} setting on bean context.
+ * <li>{@link MarshallingContext.Builder#timeZone(TimeZone)} setting on bean context.
* </ol>
*
- * @see BeanContext.Builder#timeZone(TimeZone)
+ * @see MarshallingContext.Builder#timeZone(TimeZone)
* @return The session timezone, or the system timezone if not specified. Never <jk>null</jk>.
*/
public final ZoneId getTimeZoneId() { return timeZone == null ? ZoneId.systemDefault() : timeZone.toZoneId(); }
@@ -794,7 +794,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* BeanMap.put() returns old property value.
*
- * @see BeanContext.Builder#beanMapPutReturnsOldValue()
+ * @see MarshallingContext.Builder#beanMapPutReturnsOldValue()
* @return
* <jk>true</jk> if the {@link BeanMap#put(String,Object) BeanMap.put()} method will return old property values.
* <br>Otherwise, it returns <jk>null</jk>.
@@ -804,7 +804,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Beans require no-arg constructors.
*
- * @see BeanContext.Builder#beansRequireDefaultConstructor()
+ * @see MarshallingContext.Builder#beansRequireDefaultConstructor()
* @return
* <jk>true</jk> if a Java class must implement a default no-arg constructor to be considered a bean.
* <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
@@ -814,7 +814,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Beans require Serializable interface.
*
- * @see BeanContext.Builder#beansRequireSerializable()
+ * @see MarshallingContext.Builder#beansRequireSerializable()
* @return
* <jk>true</jk> if a Java class must implement the {@link Serializable} interface to be considered a bean.
* <br>Otherwise, the bean will be serialized as a string using the {@link Object#toString()} method.
@@ -824,7 +824,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Beans require setters for getters.
*
- * @see BeanContext.Builder#beansRequireSettersForGetters()
+ * @see MarshallingContext.Builder#beansRequireSettersForGetters()
* @return
* <jk>true</jk> if only getters that have equivalent setters will be considered as properties on a bean.
* <br>Otherwise, they are ignored.
@@ -834,7 +834,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Beans require at least one property.
*
- * @see BeanContext.Builder#disableBeansRequireSomeProperties()
+ * @see MarshallingContext.Builder#disableBeansRequireSomeProperties()
* @return
* <jk>true</jk> if a Java class doesn't need to contain at least 1 property to be considered a bean.
* <br>Otherwise, the bean is serialized as a string using the {@link Object#toString()} method.
@@ -847,7 +847,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Description:</h5>
* <p>
*
- * @see BeanContext.Builder#findFluentSetters()
+ * @see MarshallingContext.Builder#findFluentSetters()
* @return
* <jk>true</jk> if fluent setters are detected on beans.
*/
@@ -856,7 +856,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Ignore invocation errors on getters.
*
- * @see BeanContext.Builder#ignoreInvocationExceptionsOnGetters()
+ * @see MarshallingContext.Builder#ignoreInvocationExceptionsOnGetters()
* @return
* <jk>true</jk> if errors thrown when calling bean getter methods are silently ignored.
*/
@@ -865,7 +865,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Ignore invocation errors on setters.
*
- * @see BeanContext.Builder#ignoreInvocationExceptionsOnSetters()
+ * @see MarshallingContext.Builder#ignoreInvocationExceptionsOnSetters()
* @return
* <jk>true</jk> if errors thrown when calling bean setter methods are silently ignored.
*/
@@ -874,7 +874,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Silently ignore missing setters.
*
- * @see BeanContext.Builder#disableIgnoreMissingSetters()
+ * @see MarshallingContext.Builder#disableIgnoreMissingSetters()
* @return
* <jk>true</jk> if trying to set a value on a bean property without a setter should throw a {@link BeanRuntimeException}.
*/
@@ -883,7 +883,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Ignore unknown properties.
*
- * @see BeanContext.Builder#ignoreUnknownBeanProperties()
+ * @see MarshallingContext.Builder#ignoreUnknownBeanProperties()
* @return
* <jk>true</jk> if trying to set a value on a non-existent bean property is silently ignored.
* <br>Otherwise, a {@code RuntimeException} is thrown.
@@ -893,7 +893,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Ignore unknown properties with null values.
*
- * @see BeanContext.Builder#disableIgnoreUnknownNullBeanProperties()
+ * @see MarshallingContext.Builder#disableIgnoreUnknownNullBeanProperties()
* @return
* <jk>true</jk> if trying to set a <jk>null</jk> value on a non-existent bean property should not throw a {@link BeanRuntimeException}.
*/
@@ -902,7 +902,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Unsorted properties.
*
- * @see BeanContext.Builder#unsortedProperties()
+ * @see MarshallingContext.Builder#unsortedProperties()
* @return
* <jk>true</jk> if bean properties are serialized in natural JVM-dependent order instead of alphabetically.
*/
@@ -911,7 +911,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Use enum names.
*
- * @see BeanContext.Builder#useEnumNames()
+ * @see MarshallingContext.Builder#useEnumNames()
* @return
* <jk>true</jk> if enums are always serialized by name, not using {@link Object#toString()}.
*/
@@ -920,7 +920,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Use interface proxies.
*
- * @see BeanContext.Builder#disableInterfaceProxies()
+ * @see MarshallingContext.Builder#disableInterfaceProxies()
* @return
* <jk>true</jk> if interfaces will be instantiated as proxy classes through the use of an
* {@link InvocationHandler} if there is no other way of instantiating them.
@@ -930,7 +930,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
/**
* Use Java Introspector.
*
- * @see BeanContext.Builder#useJavaBeanIntrospector()
+ * @see MarshallingContext.Builder#useJavaBeanIntrospector()
* @return
* <jk>true</jk> if the built-in Java bean introspector should be used for bean introspection.
*/
@@ -943,7 +943,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a new instance of the specified bean class</jc>
- * Person <jv>person</jv> = BeanContext.<jsf>DEFAULT</jsf>.newBean(Person.<jk>class</jk>);
+ * Person <jv>person</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.newBean(Person.<jk>class</jk>);
* </p>
*
* @param <T> The class type of the bean being created.
@@ -995,7 +995,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a new bean map wrapped around a new Person object</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>);
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.newBeanMap(Person.<jk>class</jk>);
* </p>
*
* @param <T> The class of the object being wrapped.
@@ -1076,7 +1076,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a bean map around a bean instance</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person());
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person());
* </p>
*
* @param <T> The class of the object being wrapped.
@@ -1099,10 +1099,10 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a bean map for new bean using only properties defined in a superclass</jc>
- * BeanMap<MySubBean> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> MySubBean(), MySuperBean.<jk>class</jk>);
+ * BeanMap<MySubBean> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> MySubBean(), MySuperBean.<jk>class</jk>);
*
* <jc>// Construct a bean map for new bean using only properties defined in an interface</jc>
- * BeanMap<MySubBean> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> MySubBean(), MySuperInterface.<jk>class</jk>);
+ * BeanMap<MySubBean> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> MySubBean(), MySuperInterface.<jk>class</jk>);
* </p>
*
* @param <T> The class of the object being wrapped.
@@ -1137,7 +1137,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Construct a bean map around a bean instance</jc>
- * BeanMap<Person> <jv>beanMap</jv> = BeanContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person(), PropertyNamerDLC.<jsf>INSTANCE</jsf>);
+ * BeanMap<Person> <jv>beanMap</jv> = MarshallingContext.<jsf>DEFAULT</jsf>.toBeanMap(<jk>new</jk> Person(), PropertyNamerDLC.<jsf>INSTANCE</jsf>);
* </p>
*
* @param <T> The class of the object being wrapped.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseContext.java
similarity index 95%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseContext.java
index 9bbe59d49a..6b14795158 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseContext.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseContext.java
@@ -41,7 +41,7 @@ import org.apache.juneau.commons.reflect.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_detectRecursions)
})
-public abstract class BeanTraverseContext extends BeanContextable {
+public abstract class MarshallingTraverseContext extends MarshallingContextable {
// Property name constants
private static final String PROP_detectRecursions = "detectRecursions";
@@ -52,7 +52,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
/**
* Builder class.
*/
- public abstract static class Builder extends BeanContextable.Builder {
+ public abstract static class Builder extends MarshallingContextable.Builder {
private boolean detectRecursions;
private boolean ignoreRecursions;
@@ -63,10 +63,10 @@ public abstract class BeanTraverseContext extends BeanContextable {
* Constructor, default settings.
*/
protected Builder() {
- detectRecursions = env("BeanTraverseContext.detectRecursions", false);
- ignoreRecursions = env("BeanTraverseContext.ignoreRecursions", false);
- initialDepth = env("BeanTraverseContext.initialDepth", 0);
- maxDepth = env("BeanTraverseContext.maxDepth", 100);
+ detectRecursions = env("MarshallingTraverseContext.detectRecursions", false);
+ ignoreRecursions = env("MarshallingTraverseContext.ignoreRecursions", false);
+ initialDepth = env("MarshallingTraverseContext.initialDepth", 0);
+ maxDepth = env("MarshallingTraverseContext.maxDepth", 100);
}
/**
@@ -74,7 +74,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
*
* @param copyFrom The bean to copy from.
*/
- protected Builder(BeanTraverseContext copyFrom) {
+ protected Builder(MarshallingTraverseContext copyFrom) {
super(copyFrom);
detectRecursions = copyFrom.getDetectRecursions();
ignoreRecursions = copyFrom.getIgnoreRecursions();
@@ -132,14 +132,14 @@ public abstract class BeanTraverseContext extends BeanContextable {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -156,7 +156,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -293,7 +293,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
* <p>
* Recursions can occur when traversing models that aren't true trees but rather contain loops.
* <br>In general, unchecked recursions cause stack-overflow-errors.
- * <br>These show up as {@link BeanRecursionException BeanRecursionException} with the message <js>"Depth too deep. Stack overflow occurred."</js>.
+ * <br>These show up as {@link MarshallingRecursionException MarshallingRecursionException} with the message <js>"Depth too deep. Stack overflow occurred."</js>.
*
* <h5 class='section'>Notes:</h5><ul>
* <li class='note'>
@@ -717,7 +717,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
*
* @param builder The builder for this object.
*/
- protected BeanTraverseContext(Builder builder) {
+ protected MarshallingTraverseContext(Builder builder) {
super(builder);
detectRecursions = builder.detectRecursions;
@@ -789,7 +789,7 @@ public abstract class BeanTraverseContext extends BeanContextable {
*/
protected final boolean getIgnoreRecursions() { return ignoreRecursions; }
- @Override /* Overridden from BeanContextable */
+ @Override /* Overridden from MarshallingContextable */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_detectRecursions, detectRecursions)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseSession.java
similarity index 88%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseSession.java
index 0b760e5cb7..2837e70da3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanTraverseSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/MarshallingTraverseSession.java
@@ -30,7 +30,7 @@ import org.apache.juneau.commons.collections.FluentMap;
import org.apache.juneau.commons.utils.*;
/**
- * ContextSession that lives for the duration of a single use of {@link BeanTraverseContext}.
+ * ContextSession that lives for the duration of a single use of {@link MarshallingTraverseContext}.
*
* <p>
* Used by serializers and other classes that traverse POJOs for the following purposes:
@@ -52,13 +52,13 @@ import org.apache.juneau.commons.utils.*;
"java:S115", // Constants use UPPER_snakeCase naming convention
"java:S1452" // Wildcard required - ClassMeta<?>, ObjectSwap<?,?> for traversal metadata
})
-public class BeanTraverseSession extends BeanSession {
+public class MarshallingTraverseSession extends MarshallingSession {
// Property name constants
private static final String PROP_indent = "indent";
private static final String PROP_depth = "depth";
private static final String PROP_initialDepth = "initialDepth";
- private static final String PROP_BeanTraverseSession_initialDepth = "BeanTraverseSession.initialDepth";
+ private static final String PROP_BeanTraverseSession_initialDepth = "MarshallingTraverseSession.initialDepth";
// Argument name constants for assertArgNotNull
private static final String ARG_ctx = "ctx";
@@ -66,9 +66,9 @@ public class BeanTraverseSession extends BeanSession {
/**
* Builder class.
*/
- public abstract static class Builder extends BeanSession.Builder {
+ public abstract static class Builder extends MarshallingSession.Builder {
- private BeanTraverseContext ctx;
+ private MarshallingTraverseContext ctx;
private int initialDepth;
/**
@@ -77,8 +77,8 @@ public class BeanTraverseSession extends BeanSession {
* @param ctx The context creating this session.
* <br>Cannot be <jk>null</jk>.
*/
- protected Builder(BeanTraverseContext ctx) {
- super(assertArgNotNull(ARG_ctx, ctx).getBeanContext());
+ protected Builder(MarshallingTraverseContext ctx) {
+ super(assertArgNotNull(ARG_ctx, ctx).getMarshallingContext());
this.ctx = ctx;
initialDepth = ctx.getInitialDepth();
}
@@ -182,13 +182,13 @@ public class BeanTraverseSession extends BeanSession {
var sb = new StringBuilder().append('[').append(depth).append(']').append(' ');
sb.append(e(name) ? "<noname>" : name).append(':');
sb.append(aType.toString(simple));
- if (aType != aType.getSerializedClassMeta(BeanTraverseSession.this))
- sb.append('/').append(aType.getSerializedClassMeta(BeanTraverseSession.this).toString(simple));
+ if (aType != aType.getSerializedClassMeta(MarshallingTraverseSession.this))
+ sb.append('/').append(aType.getSerializedClassMeta(MarshallingTraverseSession.this).toString(simple));
return sb.toString();
}
}
- private final BeanTraverseContext ctx;
+ private final MarshallingTraverseContext ctx;
private final LinkedList<StackElement> stack = new LinkedList<>(); // Contains the current objects in the current branch of the model.
private final Map<Object,Object> set; // Contains the current objects in the current branch of the model.
private BeanPropertyMeta currentProperty;
@@ -206,7 +206,7 @@ public class BeanTraverseSession extends BeanSession {
*
* @param builder The builder for this object.
*/
- protected BeanTraverseSession(Builder builder) {
+ protected MarshallingTraverseSession(Builder builder) {
super(builder);
ctx = builder.ctx;
indent = builder.initialDepth;
@@ -220,7 +220,7 @@ public class BeanTraverseSession extends BeanSession {
/**
* Initial depth.
*
- * @see BeanTraverseContext.Builder#initialDepth(int)
+ * @see MarshallingTraverseContext.Builder#initialDepth(int)
* @return
* The initial indentation level at the root.
*/
@@ -246,7 +246,7 @@ public class BeanTraverseSession extends BeanSession {
/**
* Max traversal depth.
*
- * @see BeanTraverseContext.Builder#maxDepth(int)
+ * @see MarshallingTraverseContext.Builder#maxDepth(int)
* @return
* The depth at which traversal is aborted if depth is reached in the POJO tree.
* <br>If this depth is exceeded, an exception is thrown.
@@ -256,7 +256,7 @@ public class BeanTraverseSession extends BeanSession {
/**
* Automatically detect POJO recursions.
*
- * @see BeanTraverseContext.Builder#detectRecursions()
+ * @see MarshallingTraverseContext.Builder#detectRecursions()
* @return
* <jk>true</jk> if recursions should be checked for during traversal.
*/
@@ -265,10 +265,10 @@ public class BeanTraverseSession extends BeanSession {
/**
* Ignore recursion errors.
*
- * @see BeanTraverseContext.Builder#ignoreRecursions()
+ * @see MarshallingTraverseContext.Builder#ignoreRecursions()
* @return
* <jk>true</jk> if when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>.
- * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
+ * <br>Otherwise, a {@link MarshallingRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
*/
public final boolean isIgnoreRecursions() { return ctx.isIgnoreRecursions(); }
@@ -368,7 +368,7 @@ public class BeanTraverseSession extends BeanSession {
isBottom = false;
}
- @Override /* Overridden from BeanSession */
+ @Override /* Overridden from MarshallingSession */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_indent, indent)
@@ -384,9 +384,9 @@ public class BeanTraverseSession extends BeanSession {
* @return
* The {@link ClassMeta} of the object so that <c>instanceof</c> operations only need to be performed
* once (since they can be expensive).
- * @throws BeanRecursionException If recursion occurred.
+ * @throws MarshallingRecursionException If recursion occurred.
*/
- protected final ClassMeta<?> push(String attrName, Object o, ClassMeta<?> eType) throws BeanRecursionException {
+ protected final ClassMeta<?> push(String attrName, Object o, ClassMeta<?> eType) throws MarshallingRecursionException {
indent++;
depth++;
isBottom = true;
@@ -439,22 +439,22 @@ public class BeanTraverseSession extends BeanSession {
}
/**
- * Returns <jk>true</jk> if {@link BeanTraverseContext.Builder#detectRecursions()} is enabled, and the specified
+ * Returns <jk>true</jk> if {@link MarshallingTraverseContext.Builder#detectRecursions()} is enabled, and the specified
* object is already higher up in the traversal chain.
*
* @param attrName The bean property attribute name, or some other identifier.
* @param o The object to check for recursion.
* @param cm The metadata on the object class.
* @return <jk>true</jk> if recursion detected.
- * @throws BeanRecursionException If recursion occurred.
+ * @throws MarshallingRecursionException If recursion occurred.
*/
- protected final boolean willRecurse(String attrName, Object o, ClassMeta<?> cm) throws BeanRecursionException {
+ protected final boolean willRecurse(String attrName, Object o, ClassMeta<?> cm) throws MarshallingRecursionException {
if (! (isDetectRecursions() || isDebug()) || ! set.containsKey(o))
return false;
if (isIgnoreRecursions() && ! isDebug())
return true;
stack.add(new StackElement(stack.size(), attrName, o, cm));
- throw new BeanRecursionException("Recursion occurred, stack={0}", getStack(true));
+ throw new MarshallingRecursionException("Recursion occurred, stack={0}", getStack(true));
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java
index 5a41ee0618..3b9966fdd1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleAnnotation.java
@@ -37,7 +37,7 @@ public class ExampleAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleApplyAnnotation.java
index cf26f692d2..5d8a5cf554 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExampleApplyAnnotation.java
@@ -70,7 +70,7 @@ public class ExampleApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExternalDocsAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExternalDocsAnnotation.java
index 41fe1813c3..6fbe62fbf5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExternalDocsAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ExternalDocsAnnotation.java
@@ -42,7 +42,7 @@ public class ExternalDocsAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ItemsAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ItemsAnnotation.java
index 30575ffb40..2f64fa1313 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ItemsAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ItemsAnnotation.java
@@ -37,7 +37,7 @@ public class ItemsAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
@SuppressWarnings({
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 cb363df6f6..6fd9f49d4e 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
@@ -46,7 +46,7 @@ import org.apache.juneau.swap.*;
@Retention(RUNTIME)
@Inherited
@SuppressWarnings({
- "java:S1452" // Wildcard required - Class<? extends BeanInterceptor<?>> for interceptor definition
+ "java:S1452" // Wildcard required - Class<? extends MarshallingInterceptor<?>> for interceptor definition
})
public @interface Marshalled {
@@ -57,7 +57,7 @@ public @interface Marshalled {
* Defaults to {@link MarshalledAs#DETECT} (auto-detection).
* Use {@link MarshalledAs#STRING} to serialize via {@code toString()} and deserialize via
* {@code fromString}/{@code valueOf}/single-String constructor — equivalent to the former
- * {@code BeanStringSwap} pattern.
+ * {@code MarshallingStringSwap} pattern.
*
* @return The marshalling strategy.
*/
@@ -81,7 +81,7 @@ public @interface Marshalled {
* <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link MarshalledConfig#dictionary()}
* <li class='ja'>{@link MarshalledConfig#dictionary_replace()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @return The annotation value.
@@ -113,8 +113,8 @@ public @interface Marshalled {
* 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.
+ * <li>A static method annotated with {@link Example @Example} with zero arguments or one {@link MarshallingSession} argument.
+ * <li>A static method with name <c>example</c> with no arguments or one {@link MarshallingSession} 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>).
@@ -152,9 +152,9 @@ public @interface Marshalled {
* </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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesExcludes(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesExcludes(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesExcludes(Map)}
* </ul>
*
* @return The annotation value.
@@ -171,7 +171,7 @@ public @interface Marshalled {
* <h5 class='section'>See Also:</h5><ul>
* <li class='jc'>{@link org.apache.juneau.commons.function.BeanFactory}
* <li class='ja'>{@link MarshalledProp#factory()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
* </ul>
*
* @return The annotation value.
@@ -207,7 +207,7 @@ public @interface Marshalled {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#findFluentSetters()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#findFluentSetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#findFluentSetters()}
* </ul>
*
* @return The annotation value.
@@ -239,12 +239,12 @@ public @interface Marshalled {
* 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}
+ * <li class='jc'>{@link MarshallingInterceptor}
* </ul>
*
* @return The annotation value.
*/
- Class<? extends BeanInterceptor<?>> interceptor() default BeanInterceptor.Void.class;
+ Class<? extends MarshallingInterceptor<?>> interceptor() default MarshallingInterceptor.Void.class;
/**
* Identifies a class to be used as the interface class for this and all subclasses.
@@ -307,9 +307,9 @@ public @interface Marshalled {
* </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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanProperties(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanProperties(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanProperties(Map)}
* </ul>
*
* @return The annotation value.
@@ -330,7 +330,7 @@ public @interface Marshalled {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#propertyNamer(Class)}
* </ul>
*
* @return The annotation value.
@@ -357,9 +357,9 @@ public @interface Marshalled {
* </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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(Map)}
* </ul>
*
* @return The annotation value.
@@ -421,7 +421,7 @@ public @interface Marshalled {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @return The annotation value.
@@ -446,7 +446,7 @@ public @interface Marshalled {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledConfig#typePropertyName()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#typePropertyName(String)}
* </ul>
*
* @return The annotation value.
@@ -480,9 +480,9 @@ public @interface Marshalled {
* </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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(Map)}
* </ul>
*
* @return The annotation value.
@@ -511,7 +511,7 @@ public @interface Marshalled {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#unsortedProperties()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#unsortedProperties()}
* </ul>
*
* @return The annotation value.
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 4d2354a105..49f7fe311f 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
@@ -40,7 +40,7 @@ public class MarshalledAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
@@ -51,7 +51,7 @@ public class MarshalledAnnotation {
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 MarshallingInterceptor<?>> interceptor = MarshallingInterceptor.Void.class;
private Class<? extends PropertyNamer> propertyNamer = BasicPropertyNamer.class;
@SuppressWarnings("rawtypes")
private Class<? extends BeanFactory> factory = BeanFactory.Void.class;
@@ -180,7 +180,7 @@ public class MarshalledAnnotation {
* @param value The new value for this property.
* @return This object.
*/
- public Builder interceptor(Class<? extends BeanInterceptor<?>> value) {
+ public Builder interceptor(Class<? extends MarshallingInterceptor<?>> value) {
interceptor = value;
return this;
}
@@ -339,7 +339,7 @@ public class MarshalledAnnotation {
private final String[] description;
private final boolean findFluentSetters;
private final boolean unsorted;
- private final Class<? extends BeanInterceptor<?>> interceptor;
+ private final Class<? extends MarshallingInterceptor<?>> interceptor;
private final Class<? extends PropertyNamer> propertyNamer;
private final Class<?> implClass;
private final Class<?> interfaceClass;
@@ -422,7 +422,7 @@ public class MarshalledAnnotation {
}
@Override /* Overridden from Marshalled */
- public Class<? extends BeanInterceptor<?>> interceptor() {
+ public Class<? extends MarshallingInterceptor<?>> interceptor() {
return interceptor;
}
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 402bb5b02e..a93552fca3 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
@@ -70,7 +70,7 @@ public class MarshalledApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
index 39be624e80..aecf492b87 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledAs.java
@@ -35,7 +35,7 @@ public enum MarshalledAs {
* {@code valueOf(String)}, or single-{@code String}-argument constructor.
*
* <p>
- * Replaces the common {@code BeanStringSwap} use case without requiring a separate swap class.
+ * Replaces the common {@code MarshallingStringSwap} use case without requiring a separate swap class.
*/
STRING
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfig.java
index 361905f3a5..e35eb0266d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfig.java
@@ -30,7 +30,7 @@ import org.apache.juneau.commons.reflect.Visibility;
import org.apache.juneau.swap.*;
/**
- * Annotation for specifying config properties defined in {@link BeanContext} and {@link BeanTraverseContext}.
+ * Annotation for specifying config properties defined in {@link MarshallingContext} and {@link MarshallingTraverseContext}.
*
* <p>
* Used primarily for specifying marshalling configuration properties on REST classes and methods.
@@ -69,7 +69,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanClassVisibility(Visibility)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanClassVisibility(Visibility)}
* </ul>
*
* @return The annotation value.
@@ -100,7 +100,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanConstructorVisibility(Visibility)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanConstructorVisibility(Visibility)}
* </ul>
*
* @return The annotation value.
@@ -131,7 +131,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanFieldVisibility(Visibility)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanFieldVisibility(Visibility)}
* </ul>
*
* @return The annotation value.
@@ -157,7 +157,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanMapPutReturnsOldValue()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanMapPutReturnsOldValue()}
* </ul>
*
* @return The annotation value.
@@ -188,7 +188,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanMethodVisibility(Visibility)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanMethodVisibility(Visibility)}
* </ul>
*
* @return The annotation value.
@@ -215,7 +215,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beansRequireDefaultConstructor()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beansRequireDefaultConstructor()}
* </ul>
*
* @return The annotation value.
@@ -242,7 +242,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beansRequireSerializable()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beansRequireSerializable()}
* </ul>
*
* @return The annotation value.
@@ -267,7 +267,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beansRequireSettersForGetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beansRequireSettersForGetters()}
* </ul>
*
* @return The annotation value.
@@ -284,7 +284,7 @@ public @interface MarshalledConfig {
* When bean getters throws exceptions, the exception includes the object stack information
* in order to determine how that method was invoked.
* <li>
- * Enables {@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}.
+ * Enables {@link org.apache.juneau.MarshallingTraverseContext.Builder#detectRecursions()}.
* </ul>
*
* <p>
@@ -333,7 +333,7 @@ public @interface MarshalledConfig {
* <li class='ja'>{@link Bean#dictionary()}
* <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link MarshalledConfig#dictionary_replace()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(Class...)}
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanDictionaryBasics">Bean Dictionary Basics</a>
* </ul>
*
@@ -351,7 +351,7 @@ public @interface MarshalledConfig {
* <li class='ja'>{@link Bean#dictionary()}
* <li class='ja'>{@link MarshalledProp#dictionary()}
* <li class='ja'>{@link MarshalledConfig#dictionary()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* @return The annotation value.
@@ -376,7 +376,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#disableBeansRequireSomeProperties()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#disableBeansRequireSomeProperties()}
* </ul>
*
* @return The annotation value.
@@ -401,7 +401,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#disableIgnoreMissingSetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#disableIgnoreMissingSetters()}
* </ul>
*
* @return The annotation value.
@@ -425,7 +425,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#disableIgnoreTransientFields()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#disableIgnoreTransientFields()}
* </ul>
*
* @return The annotation value.
@@ -450,7 +450,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#disableIgnoreUnknownNullBeanProperties()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#disableIgnoreUnknownNullBeanProperties()}
* </ul>
*
* @return The annotation value.
@@ -476,7 +476,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#disableInterfaceProxies()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#disableInterfaceProxies()}
* </ul>
*
* @return The annotation value.
@@ -510,7 +510,7 @@ public @interface MarshalledConfig {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#findFluentSetters()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#findFluentSetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#findFluentSetters()}
* </ul>
*
* @return The annotation value.
@@ -535,7 +535,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#ignoreInvocationExceptionsOnGetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#ignoreInvocationExceptionsOnGetters()}
* </ul>
*
* @return The annotation value.
@@ -560,7 +560,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#ignoreInvocationExceptionsOnSetters()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#ignoreInvocationExceptionsOnSetters()}
* </ul>
*
* @return The annotation value.
@@ -585,7 +585,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#ignoreUnknownBeanProperties()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#ignoreUnknownBeanProperties()}
* </ul>
*
* @return The annotation value.
@@ -609,7 +609,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#ignoreUnknownEnumValues()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#ignoreUnknownEnumValues()}
* </ul>
*
* @return The annotation value.
@@ -666,8 +666,8 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#locale(Locale)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#locale(Locale)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#locale(Locale)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#locale(Locale)}
* </ul>
*
* @return The annotation value.
@@ -686,8 +686,8 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#mediaType(MediaType)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#mediaType(MediaType)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#mediaType(MediaType)}
* </ul>
*
* @return The annotation value.
@@ -708,7 +708,7 @@ public @interface MarshalledConfig {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledIgnore}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#notBeanClasses(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#notBeanClasses(Class...)}
* </ul>
*
* @return The annotation value.
@@ -722,7 +722,7 @@ public @interface MarshalledConfig {
* Same as {@link #notBeanClasses()} but replaces any existing value.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#notBeanClasses(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#notBeanClasses(Class...)}
* </ul>
*
* @return The annotation value.
@@ -759,7 +759,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#notBeanPackages(String...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#notBeanPackages(String...)}
* </ul>
*
* @return The annotation value.
@@ -773,7 +773,7 @@ public @interface MarshalledConfig {
* Same as {@link #notBeanPackages()} but replaces any existing value.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#notBeanPackages(String...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#notBeanPackages(String...)}
* </ul>
*
* @return The annotation value.
@@ -795,7 +795,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#propertyNamer(Class)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#propertyNamer(Class)}
* </ul>
*
* @return The annotation value.
@@ -829,7 +829,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#unsortedProperties()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#unsortedProperties()}
* </ul>
*
* @return The annotation value.
@@ -852,7 +852,7 @@ public @interface MarshalledConfig {
* {@link ObjectSwap#forMediaTypes()} or {@link Swap#mediaTypes() @Swap(mediaTypes)} are used to come up with the best match.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#swaps(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...)}
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/SwapBasics">Swap Basics</a>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/PerMediaTypeSwaps">Per-media-type Swaps</a>
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/OneWaySwaps">One-way Swaps</a>
@@ -872,7 +872,7 @@ public @interface MarshalledConfig {
* Same as {@link #swaps()} but replaces any existing value.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#swaps(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...)}
* </ul>
*
* @return The annotation value.
@@ -891,8 +891,8 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#timeZone(TimeZone)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingSession.Builder#timeZone(TimeZone)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#timeZone(TimeZone)}
* </ul>
*
* @return The annotation value.
@@ -915,7 +915,7 @@ public @interface MarshalledConfig {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#typePropertyName()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#typePropertyName(String)}
* </ul>
*
* @return The annotation value.
@@ -939,7 +939,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#useEnumNames()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#useEnumNames()}
* </ul>
*
* @return The annotation value.
@@ -964,7 +964,7 @@ public @interface MarshalledConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#useJavaBeanIntrospector()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#useJavaBeanIntrospector()}
* </ul>
*
* @return The annotation value.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfigAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfigAnnotation.java
index ddb48f8fc2..6b669cc157 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfigAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfigAnnotation.java
@@ -37,9 +37,9 @@ public class MarshalledConfigAnnotation {
private MarshalledConfigAnnotation() {}
/**
- * Applies {@link MarshalledConfig} annotations to a {@link org.apache.juneau.BeanContext.Builder}.
+ * Applies {@link MarshalledConfig} annotations to a {@link org.apache.juneau.MarshallingContext.Builder}.
*/
- public static class Applier extends AnnotationApplier<MarshalledConfig,BeanContext.Builder> {
+ public static class Applier extends AnnotationApplier<MarshalledConfig,MarshallingContext.Builder> {
/**
* Constructor.
@@ -47,11 +47,11 @@ public class MarshalledConfigAnnotation {
* @param vr The resolver for resolving values in annotations.
*/
public Applier(VarResolverSession vr) {
- super(MarshalledConfig.class, BeanContext.Builder.class, vr);
+ super(MarshalledConfig.class, MarshallingContext.Builder.class, vr);
}
@Override
- public void apply(AnnotationInfo<MarshalledConfig> ai, BeanContext.Builder b) {
+ public void apply(AnnotationInfo<MarshalledConfig> ai, MarshallingContext.Builder b) {
MarshalledConfig a = ai.inner();
// @formatter:off
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
index 544dbfe26e..d6cc70ed8d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorAnnotation.java
@@ -37,7 +37,7 @@ public class MarshalledCtorAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
index 82b84a9341..2990cf3744 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledCtorApplyAnnotation.java
@@ -64,7 +64,7 @@ public class MarshalledCtorApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
index 3bd402f0df..0b46d43316 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnore.java
@@ -73,7 +73,7 @@ public @interface MarshalledIgnore {
*
* <p>
* Default is <jk>false</jk>: {@code @MarshalledIgnore} on a field only excludes the field from field-based discovery;
- * accessors can still expose the property (for example when {@link org.apache.juneau.BeanContext.Builder#beanFieldVisibility(Visibility) beanFieldVisibility} is {@link Visibility#NONE NONE}). Set to <jk>true</jk> to
+ * accessors can still expose the property (for example when {@link org.apache.juneau.MarshallingContext.Builder#beanFieldVisibility(Visibility) beanFieldVisibility} is {@link Visibility#NONE NONE}). Set to <jk>true</jk> to
* omit the property from serialization and parsing while keeping accessors for other frameworks.
*
* @return The annotation value.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
index 8c0126ed0b..a78e194bf8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreAnnotation.java
@@ -37,7 +37,7 @@ public class MarshalledIgnoreAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
index fb1f05a025..8da3dc384a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledIgnoreApplyAnnotation.java
@@ -64,7 +64,7 @@ public class MarshalledIgnoreApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
index 36be654be5..7fef514db5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
@@ -66,7 +66,7 @@ public @interface MarshalledProp {
* <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary_replace()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanDictionary(Class...)}
* </ul>
*
* <p>
@@ -142,7 +142,7 @@ public @interface MarshalledProp {
* <h5 class='section'>See Also:</h5><ul>
* <li class='jc'>{@link org.apache.juneau.commons.function.BeanFactory}
* <li class='ja'>{@link Bean#factory()}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanStore(org.apache.juneau.commons.inject.BeanStore)}
* </ul>
*
* @return The annotation value.
@@ -160,7 +160,7 @@ public @interface MarshalledProp {
*
* <p>
* During parsing, we will attempt to convert the value to the original form by using the
- * {@link BeanSession#convertToType(Object, Class)} but there is no guarantee that this will succeed.
+ * {@link MarshallingSession#convertToType(Object, Class)} but there is no guarantee that this will succeed.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
@@ -196,7 +196,7 @@ public @interface MarshalledProp {
* However, this property can be used to assign a different property name from the automatically inferred value.
*
* <p>
- * If the {@link org.apache.juneau.BeanContext.Builder#beanFieldVisibility(Visibility)} setting on the bean context excludes this field (e.g. the
+ * If the {@link org.apache.juneau.MarshallingContext.Builder#beanFieldVisibility(Visibility)} setting on the bean context excludes this field (e.g. the
* visibility is set to PUBLIC, but the field is PROTECTED), this annotation can be used to force the field to be
* identified as a property.
*
@@ -297,7 +297,7 @@ public @interface MarshalledProp {
*
* <div class='info'>
* Note that if you're not interested in these additional properties, you can also use the
- * {@link org.apache.juneau.BeanContext.Builder#ignoreUnknownBeanProperties()} setting to ignore values that don't fit into existing
+ * {@link org.apache.juneau.MarshallingContext.Builder#ignoreUnknownBeanProperties()} setting to ignore values that don't fit into existing
* properties.
* </div>
* <div class='info'>
@@ -415,9 +415,9 @@ public @interface MarshalledProp {
* </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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesReadOnly(Map)}
* </ul>
*
* @return The annotation value.
@@ -497,9 +497,9 @@ public @interface MarshalledProp {
* </p>
*
* <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)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(Class, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(String, String)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanPropertiesWriteOnly(Map)}
* </ul>
*
* @return The annotation value.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
index c1cf0892b1..19bc7f6ac1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropAnnotation.java
@@ -38,7 +38,7 @@ public class MarshalledPropAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
index ca920b77ed..85c3e8f861 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledPropApplyAnnotation.java
@@ -64,7 +64,7 @@ public class MarshalledPropApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java
index de1acf0835..beab135edb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyAnnotation.java
@@ -37,7 +37,7 @@ public class NamePropertyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyApplyAnnotation.java
index de4a3068a1..391e72fe08 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/NamePropertyApplyAnnotation.java
@@ -70,7 +70,7 @@ public class NamePropertyApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java
index bf0ceeab7c..cf5743fcdb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyAnnotation.java
@@ -37,7 +37,7 @@ public class ParentPropertyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyApplyAnnotation.java
index 0157c107f1..a2b4c187eb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/ParentPropertyApplyAnnotation.java
@@ -70,7 +70,7 @@ public class ParentPropertyApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaAnnotation.java
index c0f46b83b6..bad1b235c5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaAnnotation.java
@@ -93,7 +93,7 @@ public class SchemaAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
@SuppressWarnings({
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaApplyAnnotation.java
index 018b134039..fdfe5a35e9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SchemaApplyAnnotation.java
@@ -70,7 +70,7 @@ public class SchemaApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SubItemsAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SubItemsAnnotation.java
index 61f9ef618a..d94f7e2f86 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SubItemsAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SubItemsAnnotation.java
@@ -65,7 +65,7 @@ public class SubItemsAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
@SuppressWarnings({
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
index 4f488b337e..d8c89687c2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/Swap.java
@@ -75,7 +75,7 @@ public @interface Swap {
* <jk>public class</jk> MyBean { ... }
*
* <jk>public class</jk> ToStringSwap <jk>extends</jk> ObjectSwap<Object,String> {
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, Object <jv>value</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, Object <jv>value</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> <jv>value</jv>.toString();
* }
* }
@@ -109,7 +109,7 @@ public @interface Swap {
* <jk>return</jk> MediaType.<jsm>forStrings</jsm>(<js>"*/html"</js>);
* }
*
- * <jk>public</jk> Reader swap(BeanSession <jv>session</jv>, Object <jv>value</jv>, String <jv>template</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> Reader swap(MarshallingSession <jv>session</jv>, Object <jv>value</jv>, String <jv>template</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> <jsm>getFreeMarkerReader</jsm>(<jv>template</jv>, <jv>value</jv>); <jc>// Some method that creates raw HTML.</jc>
* }
* }
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java
index b083f90a50..0eb1630d98 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapAnnotation.java
@@ -56,7 +56,7 @@ public class SwapAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapApplyAnnotation.java
index d10d44829a..195137453e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/SwapApplyAnnotation.java
@@ -70,7 +70,7 @@ public class SwapApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
index 3b58ffc898..ed0596a77f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriAnnotation.java
@@ -37,7 +37,7 @@ public class UriAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriApplyAnnotation.java
index 838dd5cdde..376585bc80 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/UriApplyAnnotation.java
@@ -70,7 +70,7 @@ public class UriApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/bson/annotation/BsonApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/bson/annotation/BsonApplyAnnotation.java
index 7a3ec2dcee..cea50fb9d1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/bson/annotation/BsonApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/bson/annotation/BsonApplyAnnotation.java
@@ -64,7 +64,7 @@ public class BsonApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborAnnotation.java
index d866cd7cf2..e433a58a28 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborAnnotation.java
@@ -39,7 +39,7 @@ public class CborAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborApplyAnnotation.java
index 97d0904bbc..2b5de77c17 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/cbor/annotation/CborApplyAnnotation.java
@@ -64,7 +64,7 @@ public class CborApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
index f537ba27a2..8fd014bbf5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/Args.java
@@ -325,13 +325,13 @@ public class Args extends JsonMap {
}
@Override /* Overridden from JsonMap */
- public Args session(BeanSession session) {
+ public Args session(MarshallingSession session) {
super.session(session);
return this;
}
@Override /* Overridden from JsonMap */
- public Args setBeanSession(BeanSession value) {
+ public Args setBeanSession(MarshallingSession value) {
super.setBeanSession(value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonList.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonList.java
index 39fb2606e1..b0c572e22f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonList.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonList.java
@@ -329,7 +329,7 @@ public class JsonList extends LinkedList<Object> {
return in == null ? null : new JsonList(in);
}
- transient BeanSession session = null;
+ transient MarshallingSession session = null;
private transient ObjectRest objectRest;
@@ -343,7 +343,7 @@ public class JsonList extends LinkedList<Object> {
*
* @param session The bean session to use for creating beans.
*/
- public JsonList(BeanSession session) {
+ public JsonList(MarshallingSession session) {
this.session = session;
}
@@ -371,7 +371,7 @@ public class JsonList extends LinkedList<Object> {
* @throws ParseException Malformed input encountered.
*/
public JsonList(CharSequence in, Parser p) throws ParseException {
- this(p == null ? BeanContext.DEFAULT_SESSION : p.getBeanContext().getSession());
+ this(p == null ? MarshallingContext.DEFAULT_SESSION : p.getMarshallingContext().getSession());
if (p == null)
p = Json5Parser.DEFAULT;
if (nn(in))
@@ -422,7 +422,7 @@ public class JsonList extends LinkedList<Object> {
* @throws ParseException Malformed input encountered.
*/
public JsonList(Reader in, Parser p) throws ParseException {
- this(p == null ? BeanContext.DEFAULT_SESSION : p.getBeanContext().getSession());
+ this(p == null ? MarshallingContext.DEFAULT_SESSION : p.getMarshallingContext().getSession());
parse(in, p);
}
@@ -631,7 +631,7 @@ public class JsonList extends LinkedList<Object> {
* the next element cannot be converted to the specified type.
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for a description of valid conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for a description of valid conversions.
*
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
@@ -708,7 +708,7 @@ public class JsonList extends LinkedList<Object> {
* </p>
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
*
* @param index The index into this list.
* @param type The type of object to convert the entry to.
@@ -755,7 +755,7 @@ public class JsonList extends LinkedList<Object> {
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
*
* @param index The index into this list.
* @param type The type of object to convert the entry to.
@@ -813,11 +813,11 @@ public class JsonList extends LinkedList<Object> {
}
/**
- * Returns the {@link BeanSession} currently associated with this list.
+ * Returns the {@link MarshallingSession} currently associated with this list.
*
- * @return The {@link BeanSession} currently associated with this list.
+ * @return The {@link MarshallingSession} currently associated with this list.
*/
- public BeanSession getBeanSession() { return session; }
+ public MarshallingSession getMarshallingSession() { return session; }
/**
* Shortcut for calling <code>get(index, Boolean.<jk>class</jk>)</code>.
@@ -1004,7 +1004,7 @@ public class JsonList extends LinkedList<Object> {
* Override the default bean session used for converting POJOs.
*
* <p>
- * Default is {@link BeanContext#DEFAULT}, which is sufficient in most cases.
+ * Default is {@link MarshallingContext#DEFAULT}, which is sufficient in most cases.
*
* <p>
* Useful if you're serializing/parsing beans with transforms defined.
@@ -1012,18 +1012,18 @@ public class JsonList extends LinkedList<Object> {
* @param session The new bean session.
* @return This object.
*/
- public JsonList session(BeanSession session) {
+ public JsonList session(MarshallingSession session) {
this.session = session;
return this;
}
/**
- * Sets the {@link BeanSession} currently associated with this list.
+ * Sets the {@link MarshallingSession} currently associated with this list.
*
- * @param value The {@link BeanSession} currently associated with this list.
+ * @param value The {@link MarshallingSession} currently associated with this list.
* @return This object.
*/
- public JsonList setBeanSession(BeanSession value) {
+ public JsonList setBeanSession(MarshallingSession value) {
session = value;
return this;
}
@@ -1070,9 +1070,9 @@ public class JsonList extends LinkedList<Object> {
p.parseIntoCollection(r, this, bs().object());
}
- BeanSession bs() {
+ MarshallingSession bs() {
if (session == null)
- session = BeanContext.DEFAULT_SESSION;
+ session = MarshallingContext.DEFAULT_SESSION;
return session;
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
index 6aaa617fb1..271af569b9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/collections/JsonMap.java
@@ -304,7 +304,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
return c2;
}
- private transient BeanSession session;
+ private transient MarshallingSession session;
private transient Map<String,Object> inner;
private transient ObjectRest objectRest;
@@ -321,7 +321,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
*
* @param session The bean session to use for creating beans.
*/
- public JsonMap(BeanSession session) {
+ public JsonMap(MarshallingSession session) {
this.session = session;
}
@@ -349,7 +349,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* @throws ParseException Malformed input encountered.
*/
public JsonMap(CharSequence in, Parser p) throws ParseException {
- this(p == null ? BeanContext.DEFAULT_SESSION : p.getBeanContext().getSession());
+ this(p == null ? MarshallingContext.DEFAULT_SESSION : p.getMarshallingContext().getSession());
if (p == null)
p = Json5Parser.DEFAULT;
if (ne(in))
@@ -410,7 +410,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* @throws ParseException Malformed input encountered.
*/
public JsonMap(Reader in, Parser p) throws ParseException {
- this(p == null ? BeanContext.DEFAULT_SESSION : p.getBeanContext().getSession());
+ this(p == null ? MarshallingContext.DEFAULT_SESSION : p.getMarshallingContext().getSession());
parse(in, p);
}
@@ -594,7 +594,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
"unchecked" // Type erasure requires unchecked casts
})
public <T> T cast(Class<T> type) {
- BeanSession bs = bs();
+ MarshallingSession bs = bs();
ClassMeta<?> c2 = bs.getClassMeta(type);
String typePropertyName = bs.getBeanTypePropertyName(c2);
ClassMeta<?> c1 = bs.getBeanRegistry().getClassMeta((String)get(typePropertyName));
@@ -617,7 +617,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
"unchecked" // Type erasure requires cast for ClassMeta<T>
})
public <T> T cast(ClassMeta<T> cm) {
- BeanSession bs = bs();
+ MarshallingSession bs = bs();
var c1 = bs.getBeanRegistry().getClassMeta((String)get(bs.getBeanTypePropertyName(cm)));
var c = narrowClassMeta(c1, cm);
return (T)cast2(c);
@@ -806,7 +806,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* Casts or converts the value to the specified class type.
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
*
* @param type The class type to convert the value to.
* @param <T> The class type to convert the value to.
@@ -978,7 +978,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* </p>
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
*
* @param key The key.
* @param <T> The class type returned.
@@ -1025,7 +1025,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* The array can be arbitrarily long to indicate arbitrarily complex data structures.
*
* <p>
- * See {@link BeanSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
+ * See {@link MarshallingSession#convertToType(Object, ClassMeta)} for the list of valid data conversions.
*
* <h5 class='section'>Notes:</h5><ul>
* <li class='note'>
@@ -1092,11 +1092,11 @@ public class JsonMap extends LinkedHashMap<String,Object> {
}
/**
- * Returns the {@link BeanSession} currently associated with this map.
+ * Returns the {@link MarshallingSession} currently associated with this map.
*
- * @return The {@link BeanSession} currently associated with this map.
+ * @return The {@link MarshallingSession} currently associated with this map.
*/
- public BeanSession getBeanSession() { return session; }
+ public MarshallingSession getMarshallingSession() { return session; }
/**
* Returns the specified entry value converted to a {@link Boolean}.
@@ -1773,7 +1773,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* Override the default bean session used for converting POJOs.
*
* <p>
- * Default is {@link BeanContext#DEFAULT}, which is sufficient in most cases.
+ * Default is {@link MarshallingContext#DEFAULT}, which is sufficient in most cases.
*
* <p>
* Useful if you're serializing/parsing beans with transforms defined.
@@ -1781,18 +1781,18 @@ public class JsonMap extends LinkedHashMap<String,Object> {
* @param session The new bean session.
* @return This object.
*/
- public JsonMap session(BeanSession session) {
+ public JsonMap session(MarshallingSession session) {
this.session = session;
return this;
}
/**
- * Sets the {@link BeanSession} currently associated with this map.
+ * Sets the {@link MarshallingSession} currently associated with this map.
*
- * @param value The {@link BeanSession} currently associated with this map.
+ * @param value The {@link MarshallingSession} currently associated with this map.
* @return This object.
*/
- public JsonMap setBeanSession(BeanSession value) {
+ public JsonMap setBeanSession(MarshallingSession value) {
session = value;
return this;
}
@@ -1827,9 +1827,9 @@ public class JsonMap extends LinkedHashMap<String,Object> {
return this;
}
- private BeanSession bs() {
+ private MarshallingSession bs() {
if (session == null)
- session = BeanContext.DEFAULT_SESSION;
+ session = MarshallingContext.DEFAULT_SESSION;
return session;
}
@@ -1843,7 +1843,7 @@ public class JsonMap extends LinkedHashMap<String,Object> {
})
private <T> T cast2(ClassMeta<T> cm) {
- BeanSession bs = bs();
+ MarshallingSession bs = bs();
try {
Object value = get("value");
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParser.java
index a0745ebd59..fba5a5de5e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvParser.java
@@ -216,14 +216,14 @@ public class CsvParser extends ReaderParser implements CsvMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -240,7 +240,7 @@ public class CsvParser extends ReaderParser implements CsvMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializer.java
index b334e2da40..e5b9c628b9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/csv/CsvSerializer.java
@@ -238,14 +238,14 @@ public class CsvSerializer extends WriterSerializer implements CsvMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -262,7 +262,7 @@ public class CsvSerializer extends WriterSerializer implements CsvMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonParserSession.java
index e7cef13d9a..d2f8d7c0ce 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonParserSession.java
@@ -287,7 +287,7 @@ public class HjsonParserSession extends ReaderParserSession {
// For array types, convert to the appropriate array
if (type.inner() != null && type.inner().isArray())
return toArray(type, converted);
- // For specific collection subtypes (e.g. Vector, LinkedList), convert via BeanSession
+ // For specific collection subtypes (e.g. Vector, LinkedList), convert via MarshallingSession
if (!type.isObject())
return convertToMemberType(null, converted, type);
return converted;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonSerializer.java
index 634bcf7f29..8e3a3cc039 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/HjsonSerializer.java
@@ -61,7 +61,7 @@ import org.apache.juneau.serializer.*;
* The types above are considered "Hjson-primitive" object types.
* Any non-Hjson-primitive object types are transformed into Hjson-primitive object types through
* {@link org.apache.juneau.swap.ObjectSwap ObjectSwaps} associated through the
- * {@link org.apache.juneau.BeanContext.Builder#swaps(Class...) BeanContext.Builder.swaps(Class...)} method.
+ * {@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...) MarshallingContext.Builder.swaps(Class...)} method.
* Several default transforms are provided for transforming Dates, Enums, Iterators, etc.
*
* <h5 class='section'>Example:</h5>
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/annotation/HjsonApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/annotation/HjsonApplyAnnotation.java
index 0a506ac176..b942214828 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/annotation/HjsonApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hjson/annotation/HjsonApplyAnnotation.java
@@ -64,7 +64,7 @@ public class HjsonApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hocon/annotation/HoconApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hocon/annotation/HoconApplyAnnotation.java
index fc03858e5e..a6193b20b7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hocon/annotation/HoconApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/hocon/annotation/HoconApplyAnnotation.java
@@ -64,7 +64,7 @@ public class HoconApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
index 37ec28e1d2..f48fac609f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlDocSerializer.java
@@ -415,14 +415,14 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -439,7 +439,7 @@ public class HtmlDocSerializer extends HtmlStrippedDocSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -1728,7 +1728,7 @@ final AsideFloat asideFloat;
public HtmlSerializer getSchemaSerializer() {
HtmlSchemaDocSerializer result = schemaSerializer.get();
if (result == null) {
- result = HtmlSchemaDocSerializer.create().beanContext(getBeanContext()).build();
+ result = HtmlSchemaDocSerializer.create().marshallingContext(getMarshallingContext()).build();
if (! schemaSerializer.compareAndSet(null, result)) {
result = schemaSerializer.get();
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParser.java
index fbf142a3e0..25ef9f748a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlParser.java
@@ -144,14 +144,14 @@ public class HtmlParser extends XmlParser implements HtmlMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -168,7 +168,7 @@ public class HtmlParser extends XmlParser implements HtmlMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
index d3826c6d26..c5ab474d4a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializer.java
@@ -77,7 +77,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
protected Builder() {
produces("text/html");
accept("text/html+schema");
- generatorBuilder = JsonSchemaGenerator.create().beanContext(beanContext());
+ generatorBuilder = JsonSchemaGenerator.create().marshallingContext(marshallingContext());
}
/**
@@ -87,7 +87,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
*/
protected Builder(Builder copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generatorBuilder.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generatorBuilder.copy().marshallingContext(marshallingContext());
}
/**
@@ -97,7 +97,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
*/
protected Builder(HtmlSchemaDocSerializer copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generator.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generator.copy().marshallingContext(marshallingContext());
}
@Override /* Overridden from Builder */
@@ -170,7 +170,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
* <p>
* Identifies which categories of types that examples should be automatically added to generated schemas.
* <p>
- * The examples come from calling {@link ClassMeta#getExample(BeanSession,JsonParserSession)} which in turn gets examples
+ * The examples come from calling {@link ClassMeta#getExample(MarshallingSession,JsonParserSession)} which in turn gets examples
* from the following:
* <ul class='javatree'>
* <li class='ja'>{@link Example}
@@ -310,14 +310,14 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -340,7 +340,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
* <br>The default is {@link org.apache.juneau.jsonschema.BasicBeanDefMapper}.
* @return This object.
*/
- public Builder beanDefMapper(Class<? extends BeanDefMapper> value) {
+ public Builder beanDefMapper(Class<? extends MarshallingDefMapper> value) {
generatorBuilder.beanDefMapper(value);
return this;
}
@@ -358,7 +358,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -1118,7 +1118,7 @@ public class HtmlSchemaDocSerializer extends HtmlDocSerializer {
public HtmlSchemaDocSerializer(HtmlDocSerializer.Builder builder) {
super(builder.detectRecursions().ignoreRecursions());
- generator = JsonSchemaGenerator.create().beanContext(getBeanContext()).build();
+ generator = JsonSchemaGenerator.create().marshallingContext(getMarshallingContext()).build();
}
@Override /* Overridden from Context */
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializerSession.java
index b6920778ec..61cc7f23ea 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaDocSerializerSession.java
@@ -202,7 +202,7 @@ public class HtmlSchemaDocSerializerSession extends HtmlDocSerializerSession {
protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException {
try {
super.doSerialize(out, genSession.getSchema(o));
- } catch (BeanRecursionException e) {
+ } catch (MarshallingRecursionException e) {
throw new SerializeException(e);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializer.java
index 3dc770cc6c..fe27b0f34d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializer.java
@@ -83,7 +83,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
protected Builder() {
produces("text/html");
accept("text/html+schema");
- generatorBuilder = JsonSchemaGenerator.create().beanContext(beanContext());
+ generatorBuilder = JsonSchemaGenerator.create().marshallingContext(marshallingContext());
}
/**
@@ -93,7 +93,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
*/
protected Builder(Builder copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generatorBuilder.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generatorBuilder.copy().marshallingContext(marshallingContext());
}
/**
@@ -103,7 +103,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
*/
protected Builder(HtmlSchemaSerializer copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generator.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generator.copy().marshallingContext(marshallingContext());
}
@Override /* Overridden from Builder */
@@ -176,7 +176,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
* <p>
* Identifies which categories of types that examples should be automatically added to generated schemas.
* <p>
- * The examples come from calling {@link ClassMeta#getExample(BeanSession,JsonParserSession)} which in turn gets examples
+ * The examples come from calling {@link ClassMeta#getExample(MarshallingSession,JsonParserSession)} which in turn gets examples
* from the following:
* <ul class='javatree'>
* <li class='ja'>{@link Example}
@@ -304,14 +304,14 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -334,7 +334,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
* <br>The default is {@link org.apache.juneau.jsonschema.BasicBeanDefMapper}.
* @return This object.
*/
- public Builder beanDefMapper(Class<? extends BeanDefMapper> value) {
+ public Builder beanDefMapper(Class<? extends MarshallingDefMapper> value) {
generatorBuilder.beanDefMapper(value);
return this;
}
@@ -352,7 +352,7 @@ public class HtmlSchemaSerializer extends HtmlSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializerSession.java
index 578d6f7df9..239181934f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSchemaSerializerSession.java
@@ -202,7 +202,7 @@ public class HtmlSchemaSerializerSession extends HtmlSerializerSession {
protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException {
try {
super.doSerialize(out, genSession.getSchema(o));
- } catch (BeanRecursionException e) {
+ } catch (MarshallingRecursionException e) {
throw new SerializeException(e);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializer.java
index 09b48d0543..2976aa4ff2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlSerializer.java
@@ -412,14 +412,14 @@ public class HtmlSerializer extends XmlSerializer implements HtmlMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -436,7 +436,7 @@ public class HtmlSerializer extends XmlSerializer implements HtmlMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -1504,7 +1504,7 @@ public class HtmlSerializer extends XmlSerializer implements HtmlMetaProvider {
public HtmlSerializer getSchemaSerializer() {
HtmlSchemaSerializer result = schemaSerializer.get();
if (result == null) {
- result = HtmlSchemaSerializer.create().beanContext(getBeanContext()).build();
+ result = HtmlSchemaSerializer.create().marshallingContext(getMarshallingContext()).build();
if (! schemaSerializer.compareAndSet(null, result)) {
result = schemaSerializer.get();
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
index 8157bcffb9..08c90cd4d0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/HtmlStrippedDocSerializer.java
@@ -204,14 +204,14 @@ public class HtmlStrippedDocSerializer extends HtmlSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -228,7 +228,7 @@ public class HtmlStrippedDocSerializer extends HtmlSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlAnnotation.java
index 0ae6ab7144..9508743044 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlAnnotation.java
@@ -43,7 +43,7 @@ public class HtmlAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlApplyAnnotation.java
index 3f662cc108..104895b3a9 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlApplyAnnotation.java
@@ -64,7 +64,7 @@ public class HtmlApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation.java
index e1ccf825ed..1a84952299 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkAnnotation.java
@@ -40,7 +40,7 @@ public class HtmlLinkAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkApplyAnnotation.java
index df91bf0ff9..3e8b5f21f7 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/html/annotation/HtmlLinkApplyAnnotation.java
@@ -63,7 +63,7 @@ public class HtmlLinkApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderT {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartParser.java
index dbb874f63b..d4054a1d7e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartParser.java
@@ -38,7 +38,7 @@ import org.apache.juneau.parser.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public abstract class BaseHttpPartParser extends BeanContextable implements HttpPartParser {
+public abstract class BaseHttpPartParser extends MarshallingContextable implements HttpPartParser {
// Argument name constants for assertArgNotNull
private static final String ARG_toType = "toType";
@@ -48,7 +48,7 @@ public abstract class BaseHttpPartParser extends BeanContextable implements Http
/**
* Builder class.
*/
- public abstract static class Builder extends BeanContextable.Builder {
+ public abstract static class Builder extends MarshallingContextable.Builder {
/**
* Constructor.
@@ -77,12 +77,12 @@ public abstract class BaseHttpPartParser extends BeanContextable implements Http
@Override /* Overridden from HttpPartParser */
public <T> ClassMeta<T> getClassMeta(Class<T> c) {
- return BeanContext.DEFAULT.getClassMeta(c);
+ return MarshallingContext.DEFAULT.getClassMeta(c);
}
@Override /* Overridden from HttpPartParser */
public <T> ClassMeta<T> getClassMeta(Type t, Type...args) {
- return BeanContext.DEFAULT.getClassMeta(t, args);
+ return MarshallingContext.DEFAULT.getClassMeta(t, args);
}
/**
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartSerializer.java
index 3e624fef44..084e04167b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/BaseHttpPartSerializer.java
@@ -36,7 +36,7 @@ import org.apache.juneau.serializer.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public abstract class BaseHttpPartSerializer extends BeanContextable implements HttpPartSerializer {
+public abstract class BaseHttpPartSerializer extends MarshallingContextable implements HttpPartSerializer {
// Argument name constants for assertArgNotNull
private static final String ARG_builder = "builder";
@@ -44,7 +44,7 @@ public abstract class BaseHttpPartSerializer extends BeanContextable implements
/**
* Builder class.
*/
- public abstract static class Builder extends BeanContextable.Builder {
+ public abstract static class Builder extends MarshallingContextable.Builder {
/**
* Constructor.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartParser.java
index 23642649b6..11d2fbd774 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartParser.java
@@ -59,8 +59,8 @@ public interface HttpPartParser {
* @param value The value for this setting.
* @return This object.
*/
- public Creator beanContext(BeanContext.Builder value) {
- builder(BeanContextable.Builder.class).ifPresent(x -> x.beanContext(value));
+ public Creator marshallingContext(MarshallingContext.Builder value) {
+ builder(MarshallingContextable.Builder.class).ifPresent(x -> x.marshallingContext(value));
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSerializer.java
index 31f959dfb0..98d0720898 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/httppart/HttpPartSerializer.java
@@ -66,8 +66,8 @@ public interface HttpPartSerializer {
* @param value The value for this setting.
* @return This object.
*/
- public Creator beanContext(BeanContext.Builder value) {
- builder(BeanContextable.Builder.class).ifPresent(x -> x.beanContext(value));
+ public Creator marshallingContext(MarshallingContext.Builder value) {
+ builder(MarshallingContextable.Builder.class).ifPresent(x -> x.marshallingContext(value));
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/IniSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/IniSerializerSession.java
index 42f053e920..63c4038d3c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/IniSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/IniSerializerSession.java
@@ -295,7 +295,7 @@ public class IniSerializerSession extends WriterSerializerSession {
}
private JsonSerializer getJson5Serializer() {
- var b = Json5Serializer.create().beanContext((BeanContext)getContext());
+ var b = Json5Serializer.create().marshallingContext((MarshallingContext)getContext());
if (isAddBeanTypes())
b.addBeanTypes();
if (isAddRootType())
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/annotation/IniApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/annotation/IniApplyAnnotation.java
index fd97820f81..1e8c5203a8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/annotation/IniApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ini/annotation/IniApplyAnnotation.java
@@ -64,7 +64,7 @@ public class IniApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ConverterUtils.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ConverterUtils.java
index 5077cde3a8..c897d5d2a0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ConverterUtils.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/ConverterUtils.java
@@ -79,7 +79,7 @@ public class ConverterUtils {
* Converts the specified object to the specified type.
*
* <p>
- * Uses the full {@link BeanContextConverter} to support bean-aware conversions such as
+ * Uses the full {@link MarshallingContextConverter} to support bean-aware conversions such as
* {@link java.util.Map} to bean, bean to bean, and {@link org.apache.juneau.swap.ObjectSwap} transforms.
*
* @param <T> The class type to convert the value to.
@@ -88,7 +88,7 @@ public class ConverterUtils {
* @return The converted value.
*/
public static <T> T toType(Object value, Class<T> type) {
- return BeanContextConverter.INSTANCE.to(value, type);
+ return MarshallingContextConverter.INSTANCE.to(value, type);
}
/**
@@ -109,7 +109,7 @@ public class ConverterUtils {
* @return A new {@link Lists} containing the converted elements.
*/
public static <T> Lists<T> toListBuilder(Object value, Class<T> type) {
- return listb(type).elementFunction(o -> BeanContextConverter.INSTANCE.to(o, type)).addAny(value);
+ return listb(type).elementFunction(o -> MarshallingContextConverter.INSTANCE.to(o, type)).addAny(value);
}
/**
@@ -132,8 +132,8 @@ public class ConverterUtils {
*/
public static <K,V> Maps<K,V> toMapBuilder(Object value, Class<K> keyType, Class<V> valueType) {
return mapb(keyType, valueType)
- .keyFunction(o -> BeanContextConverter.INSTANCE.to(o, keyType))
- .valueFunction(o -> BeanContextConverter.INSTANCE.to(o, valueType))
+ .keyFunction(o -> MarshallingContextConverter.INSTANCE.to(o, keyType))
+ .valueFunction(o -> MarshallingContextConverter.INSTANCE.to(o, valueType))
.addAny(value);
}
@@ -158,6 +158,6 @@ public class ConverterUtils {
* @return A new {@link Sets} containing the converted elements.
*/
public static <T> Sets<T> toSetBuilder(Object value, Class<T> type) {
- return setb(type).elementFunction(o -> BeanContextConverter.INSTANCE.to(o, type)).addAny(value);
+ return setb(type).elementFunction(o -> MarshallingContextConverter.INSTANCE.to(o, type)).addAny(value);
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
index d309f517ce..77e8b33cf8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateBeanMap.java
@@ -63,7 +63,7 @@ public class DelegateBeanMap<T> extends BeanMap<T> {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for BeanMap creation
})
- public DelegateBeanMap(T bean, BeanSession session) {
+ public DelegateBeanMap(T bean, MarshallingSession session) {
super(session, bean, session.getBeanMeta((Class<T>)bean.getClass()));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateList.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateList.java
index c7d80c222a..f574ba96ba 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateList.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateList.java
@@ -44,7 +44,7 @@ public class DelegateList<T extends Collection<?>> extends JsonList implements D
*/
public DelegateList(ClassMeta<T> classMeta) {
if (classMeta.isArray())
- classMeta = classMeta.getBeanContext().<T>getClassMeta(List.class, classMeta.getElementType());
+ classMeta = classMeta.getMarshallingContext().<T>getClassMeta(List.class, classMeta.getElementType());
this.classMeta = classMeta;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateMap.java
index d5f34cd5ea..5035a39337 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/internal/DelegateMap.java
@@ -47,7 +47,7 @@ public class DelegateMap<T extends Map> extends JsonMap implements Delegate<T> {
@SuppressWarnings({
"unchecked" // Type erasure requires cast for Map operations
})
- public DelegateMap(T m, BeanSession session) {
+ public DelegateMap(T m, MarshallingSession session) {
this.classMeta = session.getClassMetaForObject(m);
m.forEach((k, v) -> put(s(k), v));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParser.java
index 07d9217685..72f5100662 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonParser.java
@@ -63,7 +63,7 @@ import org.apache.juneau.parser.*;
* JSON objects (<js>"{...}"</js>) are converted to {@link JsonMap JsonMaps}.
* <b>Note:</b> If a <code><xa>_type</xa>=<xs>'xxx'</xs></code> attribute is specified on the object, then an
* attempt is made to convert the object to an instance of the specified Java bean class.
- * See the {@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)} setting for more information about parsing
+ * See the {@link org.apache.juneau.MarshallingContext.Builder#typePropertyName(String)} setting for more information about parsing
* beans from JSON.
* <li>
* JSON arrays (<js>"[...]"</js>) are converted to {@link JsonList JsonLists}.
@@ -220,14 +220,14 @@ public class JsonParser extends ReaderParser implements JsonMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -244,7 +244,7 @@ public class JsonParser extends ReaderParser implements JsonMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
index 83f6a6ad60..2dd9700a44 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializer.java
@@ -75,7 +75,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
protected Builder() {
produces("application/json");
accept("application/json+schema,text/json+schema");
- generatorBuilder = JsonSchemaGenerator.create().beanContext(beanContext());
+ generatorBuilder = JsonSchemaGenerator.create().marshallingContext(marshallingContext());
}
/**
@@ -85,7 +85,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
*/
protected Builder(Builder copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generatorBuilder.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generatorBuilder.copy().marshallingContext(marshallingContext());
}
/**
@@ -95,7 +95,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
*/
protected Builder(JsonSchemaSerializer copyFrom) {
super(copyFrom);
- generatorBuilder = copyFrom.generator.copy().beanContext(beanContext());
+ generatorBuilder = copyFrom.generator.copy().marshallingContext(marshallingContext());
}
@Override /* Overridden from Builder */
@@ -156,7 +156,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
* <p>
* Identifies which categories of types that examples should be automatically added to generated schemas.
* <p>
- * The examples come from calling {@link ClassMeta#getExample(BeanSession,JsonParserSession)} which in turn gets examples
+ * The examples come from calling {@link ClassMeta#getExample(MarshallingSession,JsonParserSession)} which in turn gets examples
* from the following:
* <ul class='javatree'>
* <li class='ja'>{@link Example}
@@ -260,14 +260,14 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -290,7 +290,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
* <br>The default is {@link org.apache.juneau.jsonschema.BasicBeanDefMapper}.
* @return This object.
*/
- public Builder beanDefMapper(Class<? extends BeanDefMapper> value) {
+ public Builder beanDefMapper(Class<? extends MarshallingDefMapper> value) {
generatorBuilder.beanDefMapper(value);
return this;
}
@@ -308,7 +308,7 @@ public class JsonSchemaSerializer extends JsonSerializer implements JsonSchemaMe
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializerSession.java
index 22b65eba0e..d4ce042a38 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSchemaSerializerSession.java
@@ -204,7 +204,7 @@ public class JsonSchemaSerializerSession extends JsonSerializerSession {
protected void doSerialize(SerializerPipe out, Object o) throws IOException, SerializeException {
try {
super.doSerialize(out, genSession.getSchema(o));
- } catch (BeanRecursionException e) {
+ } catch (MarshallingRecursionException e) {
throw new SerializeException(e);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializer.java
index d1ffca81d8..14b1f64f62 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/JsonSerializer.java
@@ -73,7 +73,7 @@ import org.apache.juneau.serializer.*;
* The types above are considered "JSON-primitive" object types.
* Any non-JSON-primitive object types are transformed into JSON-primitive object types through
* {@link org.apache.juneau.swap.ObjectSwap ObjectSwaps} associated through the
- * {@link org.apache.juneau.BeanContext.Builder#swaps(Class...)} method.
+ * {@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...)} method.
* Several default transforms are provided for transforming Dates, Enums, Iterators, etc...
*
* <p>
@@ -277,14 +277,14 @@ public class JsonSerializer extends WriterSerializer implements JsonMetaProvider
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -301,7 +301,7 @@ public class JsonSerializer extends WriterSerializer implements JsonMetaProvider
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -999,7 +999,7 @@ public class JsonSerializer extends WriterSerializer implements JsonMetaProvider
public JsonSchemaSerializer getSchemaSerializer() {
JsonSchemaSerializer result = schemaSerializer.get();
if (result == null) {
- result = JsonSchemaSerializer.create().beanContext(getBeanContext()).build();
+ result = JsonSchemaSerializer.create().marshallingContext(getMarshallingContext()).build();
if (! schemaSerializer.compareAndSet(null, result)) {
result = schemaSerializer.get();
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonAnnotation.java
index 5b9d7ebed1..08bef94baf 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonAnnotation.java
@@ -40,7 +40,7 @@ public class JsonAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonApplyAnnotation.java
index 04300ddc7b..6206fc87cd 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json/annotation/JsonApplyAnnotation.java
@@ -70,7 +70,7 @@ public class JsonApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Parser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Parser.java
index 3b06245b21..b51bbbad76 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Parser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Parser.java
@@ -162,14 +162,14 @@ public class Json5Parser extends JsonParser {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -186,7 +186,7 @@ public class Json5Parser extends JsonParser {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Serializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Serializer.java
index 268322f7bf..d7ff53814c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Serializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/json5/Json5Serializer.java
@@ -197,14 +197,14 @@ public class Json5Serializer extends JsonSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -221,7 +221,7 @@ public class Json5Serializer extends JsonSerializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BasicBeanDefMapper.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BasicBeanDefMapper.java
index 95236a8ad0..4db84ceb82 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BasicBeanDefMapper.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BasicBeanDefMapper.java
@@ -24,7 +24,7 @@ import java.text.*;
import org.apache.juneau.*;
/**
- * Simple implementation of the {@link BeanDefMapper} interface.
+ * Simple implementation of the {@link MarshallingDefMapper} interface.
*
* <p>
* IDs are created by calling {@link Class#getSimpleName()}.
@@ -35,7 +35,7 @@ import org.apache.juneau.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JsonSchemaDetails">JSON-Schema Support</a>
* </ul>
*/
-public class BasicBeanDefMapper implements BeanDefMapper {
+public class BasicBeanDefMapper implements MarshallingDefMapper {
private final MessageFormat format;
@@ -55,17 +55,17 @@ public class BasicBeanDefMapper implements BeanDefMapper {
format = new MessageFormat(uriPattern);
}
- @Override /* Overridden from BeanDefMapper */
+ @Override /* Overridden from MarshallingDefMapper */
public String getId(ClassMeta<?> cm) {
return cm.getNameSimple();
}
- @Override /* Overridden from BeanDefMapper */
+ @Override /* Overridden from MarshallingDefMapper */
public URI getURI(ClassMeta<?> cm) {
return getURI(getId(cm));
}
- @Override /* Overridden from BeanDefMapper */
+ @Override /* Overridden from MarshallingDefMapper */
public URI getURI(String id) {
return URI.create(format.format(a(id)));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGenerator.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGenerator.java
index 01e13b469f..def2119a24 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGenerator.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGenerator.java
@@ -52,7 +52,7 @@ import org.apache.juneau.json5.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSchemaMetaProvider {
+public class JsonSchemaGenerator extends MarshallingTraverseContext implements JsonSchemaMetaProvider {
// Argument name constants for assertArgNotNull
private static final String ARG_value = "value";
@@ -71,7 +71,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
/**
* Builder class.
*/
- public static class Builder extends BeanTraverseContext.Builder {
+ public static class Builder extends MarshallingTraverseContext.Builder {
private static final Cache<HashKey,JsonSchemaGenerator> CACHE = Cache.of(HashKey.class, JsonSchemaGenerator.class).build();
@@ -81,7 +81,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
private boolean allowNestedDescriptions;
private boolean allowNestedExamples;
private boolean useBeanDefs;
- private Class<? extends BeanDefMapper> beanDefMapper;
+ private Class<? extends MarshallingDefMapper> beanDefMapper;
private SortedSet<TypeCategory> addDescriptionsTo;
private SortedSet<TypeCategory> addExamplesTo;
private SortedSet<String> ignoreTypes;
@@ -90,9 +90,9 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
* Constructor, default settings.
*/
protected Builder() {
- BeanContext.Builder bc = beanContext();
- jsonSerializerBuilder = JsonSerializer.create().beanContext(bc);
- jsonParserBuilder = Json5Parser.create().beanContext(bc);
+ MarshallingContext.Builder bc = marshallingContext();
+ jsonSerializerBuilder = JsonSerializer.create().marshallingContext(bc);
+ jsonParserBuilder = Json5Parser.create().marshallingContext(bc);
registerBuilders(jsonSerializerBuilder, jsonParserBuilder);
addDescriptionsTo = null;
addExamplesTo = null;
@@ -111,9 +111,9 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
*/
protected Builder(Builder copyFrom) {
super(assertArgNotNull(ARG_copyFrom, copyFrom));
- BeanContext.Builder bc = beanContext();
- jsonSerializerBuilder = copyFrom.jsonSerializerBuilder.copy().beanContext(bc);
- jsonParserBuilder = copyFrom.jsonParserBuilder.copy().beanContext(bc);
+ MarshallingContext.Builder bc = marshallingContext();
+ jsonSerializerBuilder = copyFrom.jsonSerializerBuilder.copy().marshallingContext(bc);
+ jsonParserBuilder = copyFrom.jsonParserBuilder.copy().marshallingContext(bc);
registerBuilders(jsonSerializerBuilder, jsonParserBuilder);
addDescriptionsTo = copyFrom.addDescriptionsTo == null ? null : new TreeSet<>(copyFrom.addDescriptionsTo);
addExamplesTo = copyFrom.addExamplesTo == null ? null : new TreeSet<>(copyFrom.addExamplesTo);
@@ -132,9 +132,9 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
*/
protected Builder(JsonSchemaGenerator copyFrom) {
super(assertArgNotNull(ARG_copyFrom, copyFrom));
- BeanContext.Builder bc = beanContext();
- jsonSerializerBuilder = copyFrom.jsonSerializer.copy().beanContext(bc);
- jsonParserBuilder = copyFrom.jsonParser.copy().beanContext(bc);
+ MarshallingContext.Builder bc = marshallingContext();
+ jsonSerializerBuilder = copyFrom.jsonSerializer.copy().marshallingContext(bc);
+ jsonParserBuilder = copyFrom.jsonParser.copy().marshallingContext(bc);
registerBuilders(jsonSerializerBuilder, jsonParserBuilder);
addDescriptionsTo = copyFrom.addDescriptionsTo.isEmpty() ? null : new TreeSet<>(copyFrom.addDescriptionsTo);
addExamplesTo = copyFrom.addExamplesTo.isEmpty() ? null : new TreeSet<>(copyFrom.addExamplesTo);
@@ -183,7 +183,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
* <p>
* Identifies which categories of types that examples should be automatically added to generated schemas.
* <p>
- * The examples come from calling {@link ClassMeta#getExample(BeanSession,JsonParserSession)} which in turn gets examples
+ * The examples come from calling {@link ClassMeta#getExample(MarshallingSession,JsonParserSession)} which in turn gets examples
* from the following:
* <ul class='javatree'>
* <li class='ja'>{@link Example}
@@ -300,14 +300,14 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -327,7 +327,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
* <br>Cannot be <jk>null</jk>.
* @return This object.
*/
- public Builder beanDefMapper(Class<? extends BeanDefMapper> value) {
+ public Builder beanDefMapper(Class<? extends MarshallingDefMapper> value) {
beanDefMapper = assertArgNotNull(ARG_value, value);
return this;
}
@@ -345,7 +345,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -860,13 +860,13 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
protected final boolean allowNestedDescriptions;
protected final boolean allowNestedExamples;
protected final boolean useBeanDefs;
- protected final Class<? extends BeanDefMapper> beanDefMapper;
+ protected final Class<? extends MarshallingDefMapper> beanDefMapper;
protected final JsonParser jsonParser;
protected final JsonSerializer jsonSerializer;
protected final Set<TypeCategory> addDescriptionsTo;
protected final Set<TypeCategory> addExamplesTo;
protected final Set<String> ignoreTypes;
- private final BeanDefMapper beanDefMapperBean;
+ private final MarshallingDefMapper beanDefMapperBean;
private final Map<BeanPropertyMeta,JsonSchemaBeanPropertyMeta> jsonSchemaBeanPropertyMetas = new ConcurrentHashMap<>();
private final Map<ClassMeta<?>,JsonSchemaClassMeta> jsonSchemaClassMetas = new ConcurrentHashMap<>();
private final List<Pattern> ignoreTypePatterns;
@@ -898,7 +898,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
}
jsonSerializer = builder.jsonSerializerBuilder.build();
- jsonParser = builder.jsonParserBuilder.beanContext(getBeanContext()).build();
+ jsonParser = builder.jsonParserBuilder.marshallingContext(getMarshallingContext()).build();
}
@Override /* Overridden from Context */
@@ -977,7 +977,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
* @return
* Interface to use for converting Bean classes to definition IDs and URIs.
*/
- protected final BeanDefMapper getBeanDefMapper() { return beanDefMapperBean; }
+ protected final MarshallingDefMapper getBeanDefMapper() { return beanDefMapperBean; }
/**
* Allow nested descriptions.
@@ -1006,7 +1006,7 @@ public class JsonSchemaGenerator extends BeanTraverseContext implements JsonSche
*/
protected final boolean isUseBeanDefs() { return useBeanDefs; }
- @Override /* Overridden from BeanTraverseContext */
+ @Override /* Overridden from MarshallingTraverseContext */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_addDescriptionsTo, addDescriptionsTo)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGeneratorSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGeneratorSession.java
index e77906f11d..4e4befe4b5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGeneratorSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/JsonSchemaGeneratorSession.java
@@ -50,7 +50,7 @@ import org.apache.juneau.serializer.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public class JsonSchemaGeneratorSession extends BeanTraverseSession {
+public class JsonSchemaGeneratorSession extends MarshallingTraverseSession {
// Argument name constants for assertArgNotNull
private static final String ARG_ctx = "ctx";
@@ -73,7 +73,7 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
/**
* Builder class.
*/
- public static class Builder extends BeanTraverseSession.Builder {
+ public static class Builder extends MarshallingTraverseSession.Builder {
private JsonSchemaGenerator ctx;
@@ -262,10 +262,10 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
*
* @param cm The object type.
* @return The schema for the type.
- * @throws BeanRecursionException Bean recursion occurred.
+ * @throws MarshallingRecursionException Bean recursion occurred.
* @throws SerializeException Error occurred.
*/
- public JsonMap getSchema(ClassMeta<?> cm) throws BeanRecursionException, SerializeException {
+ public JsonMap getSchema(ClassMeta<?> cm) throws MarshallingRecursionException, SerializeException {
return getSchema(cm, "root", null, false, false, null);
}
@@ -276,10 +276,10 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
* The object.
* <br>Can either be a POJO or a <c>Class</c>/<c>Type</c>.
* @return The schema for the type.
- * @throws BeanRecursionException Bean recursion occurred.
+ * @throws MarshallingRecursionException Bean recursion occurred.
* @throws SerializeException Error occurred.
*/
- public JsonMap getSchema(Object o) throws BeanRecursionException, SerializeException {
+ public JsonMap getSchema(Object o) throws MarshallingRecursionException, SerializeException {
return getSchema(toClassMeta(o), "root", null, false, false, null);
}
@@ -288,10 +288,10 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
*
* @param type The object type.
* @return The schema for the type.
- * @throws BeanRecursionException Bean recursion occurred.
+ * @throws MarshallingRecursionException Bean recursion occurred.
* @throws SerializeException Error occurred.
*/
- public JsonMap getSchema(Type type) throws BeanRecursionException, SerializeException {
+ public JsonMap getSchema(Type type) throws MarshallingRecursionException, SerializeException {
return getSchema(getClassMeta(type), "root", null, false, false, null);
}
@@ -335,7 +335,7 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
"unchecked", // Type erasure requires unchecked casts
})
private JsonMap getSchema(ClassMeta<?> eType, String attrName, List<String> pNames, boolean exampleAdded, boolean descriptionAdded, JsonSchemaBeanPropertyMeta jsbpm)
- throws BeanRecursionException, SerializeException {
+ throws MarshallingRecursionException, SerializeException {
if (ctx.isIgnoredType(eType))
return null;
@@ -537,7 +537,7 @@ public class JsonSchemaGeneratorSession extends BeanTraverseSession {
* @return
* Interface to use for converting Bean classes to definition IDs and URIs.
*/
- protected final BeanDefMapper getBeanDefMapper() { return ctx.getBeanDefMapper(); }
+ protected final MarshallingDefMapper getBeanDefMapper() { return ctx.getBeanDefMapper(); }
/**
* Ignore types from schema definitions.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BeanDefMapper.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/MarshallingDefMapper.java
similarity index 94%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BeanDefMapper.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/MarshallingDefMapper.java
index 5326e82310..f254e3b819 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/BeanDefMapper.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/MarshallingDefMapper.java
@@ -27,12 +27,12 @@ import org.apache.juneau.*;
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JsonSchemaDetails">JSON-Schema Support</a>
* </ul>
*/
-public interface BeanDefMapper {
+public interface MarshallingDefMapper {
/**
* Represents the absence of a bean definition mapper class.
*/
- public interface Void extends BeanDefMapper {}
+ public interface Void extends MarshallingDefMapper {}
/**
* Returns the ID for the specified class.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
index 0dc47dbd71..0da44960b0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/jsonschema/annotation/JsonSchemaConfig.java
@@ -85,7 +85,7 @@ public @interface JsonSchemaConfig {
* <p>
* Identifies which categories of types that examples should be automatically added to generated schemas.
* <p>
- * The examples come from calling {@link ClassMeta#getExample(BeanSession,JsonParserSession)} which in turn gets examples
+ * The examples come from calling {@link ClassMeta#getExample(MarshallingSession,JsonParserSession)} which in turn gets examples
* from the following:
* <ul class='javatree'>
* <li class='ja'>{@link Example}
@@ -186,7 +186,7 @@ public @interface JsonSchemaConfig {
*
* @return The annotation value.
*/
- Class<? extends BeanDefMapper> beanDefMapper() default BeanDefMapper.Void.class;
+ Class<? extends MarshallingDefMapper> beanDefMapper() default MarshallingDefMapper.Void.class;
/**
* Automatically detect POJO recursions.
@@ -200,7 +200,7 @@ public @interface JsonSchemaConfig {
* <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>.
*
* <p>
- * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}.
+ * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.MarshallingTraverseContext.Builder#ignoreRecursions()}.
*
* <p>
* For example, if a model contains the links A->B->C->A, then the JSON generated will look like
@@ -223,7 +223,7 @@ public @interface JsonSchemaConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#detectRecursions()}
* </ul>
*
* @return The annotation value.
@@ -234,12 +234,12 @@ public @interface JsonSchemaConfig {
* Ignore recursion errors.
*
* <p>
- * Used in conjunction with {@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}.
+ * Used in conjunction with {@link org.apache.juneau.MarshallingTraverseContext.Builder#detectRecursions()}.
* <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>.
*
* <p>
* If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>.
- * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
+ * <br>Otherwise, a {@link MarshallingRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
*
* <ul class='values'>
* <li><js>"true"</js>
@@ -252,7 +252,7 @@ public @interface JsonSchemaConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#ignoreRecursions()}
* </ul>
*
* @return The annotation value.
@@ -298,7 +298,7 @@ public @interface JsonSchemaConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#initialDepth(int)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#initialDepth(int)}
* </ul>
*
* @return The annotation value.
@@ -322,7 +322,7 @@ public @interface JsonSchemaConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#maxDepth(int)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#maxDepth(int)}
* </ul>
*
* @return The annotation value.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParser.java
index 771f77a66e..cbefc0e389 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParser.java
@@ -205,14 +205,14 @@ public class MarkdownParser extends ReaderParser implements MarkdownMetaProvider
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -229,7 +229,7 @@ public class MarkdownParser extends ReaderParser implements MarkdownMetaProvider
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParserSession.java
index 50af635509..89ad73a8a3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownParserSession.java
@@ -603,7 +603,7 @@ public class MarkdownParserSession extends ReaderParserSession {
*/
private JsonParser getJson5Parser() {
if (json5Parser == null) {
- var b = Json5Parser.create().beanContext((BeanContext) getContext());
+ var b = Json5Parser.create().marshallingContext((MarshallingContext) getContext());
if (isTrimStrings())
b = b.trimStrings();
json5Parser = b.build();
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializer.java
index a87e6c8b8e..fea9a46c5c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializer.java
@@ -237,14 +237,14 @@ public class MarkdownSerializer extends WriterSerializer implements MarkdownMeta
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -261,7 +261,7 @@ public class MarkdownSerializer extends WriterSerializer implements MarkdownMeta
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializerSession.java
index 36d202014a..bdf680f573 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/MarkdownSerializerSession.java
@@ -502,7 +502,7 @@ public class MarkdownSerializerSession extends WriterSerializerSession {
* Creates a new serializer each time to ensure settings are current.
*/
private JsonSerializer getJson5Serializer() {
- var b = Json5Serializer.create().beanContext((BeanContext) getContext());
+ var b = Json5Serializer.create().marshallingContext((MarshallingContext) getContext());
if (isAddBeanTypes())
b = b.addBeanTypes();
if (isAddRootType())
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/annotation/MarkdownApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/annotation/MarkdownApplyAnnotation.java
index c307e6261b..0f8a0d361f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/annotation/MarkdownApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/markdown/annotation/MarkdownApplyAnnotation.java
@@ -64,7 +64,7 @@ public class MarkdownApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Bson.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Bson.java
index 659d825cda..3c67702d53 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Bson.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Bson.java
@@ -125,7 +125,7 @@ public class Bson extends StreamMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(byte[] input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
@@ -184,7 +184,7 @@ public class Bson extends StreamMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException If an I/O error occurs.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/CharMarshaller.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/CharMarshaller.java
index 79eeb71571..864f8be0d2 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/CharMarshaller.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/CharMarshaller.java
@@ -99,7 +99,7 @@ public class CharMarshaller extends Marshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T read(String input, Type type, Type...args) throws ParseException {
return p.parse(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Csv.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Csv.java
index 60f1b0fb67..4f9a06a7cb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Csv.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Csv.java
@@ -171,7 +171,7 @@ public class Csv extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -210,7 +210,7 @@ public class Csv extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Html.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Html.java
index 5f5837c46f..4359caeaaf 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Html.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Html.java
@@ -156,7 +156,7 @@ public class Html extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -195,7 +195,7 @@ public class Html extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jcs.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jcs.java
index 4f0ab16127..7e035a8a6c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jcs.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jcs.java
@@ -174,7 +174,7 @@ public class Jcs extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type... args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -213,7 +213,7 @@ public class Jcs extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type... args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json.java
index de25dbb771..690b94396c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json.java
@@ -166,7 +166,7 @@ public class Json extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -205,7 +205,7 @@ public class Json extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json5.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json5.java
index e718452181..7e5db9335c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json5.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Json5.java
@@ -171,7 +171,7 @@ public class Json5 extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -210,7 +210,7 @@ public class Json5 extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jsonl.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jsonl.java
index 15c5519cb7..38f2cc8b66 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jsonl.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Jsonl.java
@@ -165,7 +165,7 @@ public class Jsonl extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -204,7 +204,7 @@ public class Jsonl extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Markdown.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Markdown.java
index 5ec9028628..1162612b4d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Markdown.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Markdown.java
@@ -161,7 +161,7 @@ public class Markdown extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -199,7 +199,7 @@ public class Markdown extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MarkdownDoc.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MarkdownDoc.java
index 5b97d003a4..f633e00a2c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MarkdownDoc.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MarkdownDoc.java
@@ -158,7 +158,7 @@ public class MarkdownDoc extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -194,7 +194,7 @@ public class MarkdownDoc extends CharMarshaller {
* The type arguments of the class if it's a collection or map.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Marshaller.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Marshaller.java
index d2c50b1b3a..cb218b7708 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Marshaller.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Marshaller.java
@@ -211,7 +211,7 @@ public abstract class Marshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T read(Object input, Type type, Type...args) throws ParseException, IOException {
return p.parse(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MsgPack.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MsgPack.java
index 1a8d35914d..2e0245c0b8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MsgPack.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/MsgPack.java
@@ -125,7 +125,7 @@ public class MsgPack extends StreamMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(byte[] input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
@@ -184,7 +184,7 @@ public class MsgPack extends StreamMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/OpenApi.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/OpenApi.java
index aeeea4d0d4..d801552ba3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/OpenApi.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/OpenApi.java
@@ -190,7 +190,7 @@ public class OpenApi extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -229,7 +229,7 @@ public class OpenApi extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Parquet.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Parquet.java
index e9d532b521..3f904be194 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Parquet.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Parquet.java
@@ -194,7 +194,7 @@ public class Parquet extends StreamMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(byte[] input, Type type, Type... args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/PlainText.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/PlainText.java
index 6c220960bc..f85dce728e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/PlainText.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/PlainText.java
@@ -156,7 +156,7 @@ public class PlainText extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -195,7 +195,7 @@ public class PlainText extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/StreamMarshaller.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/StreamMarshaller.java
index b8679650b0..2b42b3868d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/StreamMarshaller.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/StreamMarshaller.java
@@ -104,7 +104,7 @@ public class StreamMarshaller extends Marshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T read(byte[] input, Type type, Type...args) throws ParseException {
try {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Uon.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Uon.java
index 6c955cb766..ed76c8af85 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Uon.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Uon.java
@@ -166,7 +166,7 @@ public class Uon extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -205,7 +205,7 @@ public class Uon extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/UrlEncoding.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/UrlEncoding.java
index ac4893e414..a4a1364ea4 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/UrlEncoding.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/UrlEncoding.java
@@ -156,7 +156,7 @@ public class UrlEncoding extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -195,7 +195,7 @@ public class UrlEncoding extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Xml.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Xml.java
index fbf71174e5..a0311227a1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Xml.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Xml.java
@@ -182,7 +182,7 @@ public class Xml extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -221,7 +221,7 @@ public class Xml extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Yaml.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Yaml.java
index c7f6126e9e..a5fa5a61ca 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Yaml.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/marshaller/Yaml.java
@@ -176,7 +176,7 @@ public class Yaml extends CharMarshaller {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(Object input, Type type, Type...args) throws ParseException, IOException {
return DEFAULT.read(input, type, args);
@@ -215,7 +215,7 @@ public class Yaml extends CharMarshaller {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public static <T> T to(String input, Type type, Type...args) throws ParseException {
return DEFAULT.read(input, type, args);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
index b31787311c..f66ab9a73f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackParser.java
@@ -164,14 +164,14 @@ public class MsgPackParser extends InputStreamParser implements MsgPackMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -188,7 +188,7 @@ public class MsgPackParser extends InputStreamParser implements MsgPackMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
index 5cba48dbbe..ae3fe9c5a5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/MsgPackSerializer.java
@@ -223,14 +223,14 @@ public class MsgPackSerializer extends OutputStreamSerializer implements MsgPack
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -247,7 +247,7 @@ public class MsgPackSerializer extends OutputStreamSerializer implements MsgPack
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation.java
index 531060e411..e37f1975a5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackAnnotation.java
@@ -39,7 +39,7 @@ public class MsgPackAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackApplyAnnotation.java
index f6ad05444a..2693b02e0e 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/msgpack/annotation/MsgPackApplyAnnotation.java
@@ -64,7 +64,7 @@ public class MsgPackApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParser.java
index b6600809dd..3827c99d40 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParser.java
@@ -137,14 +137,14 @@ public class OpenApiParser extends UonParser implements OpenApiMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -161,7 +161,7 @@ public class OpenApiParser extends UonParser implements OpenApiMetaProvider {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParserSession.java
index a268eec499..14c24327b3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiParserSession.java
@@ -185,7 +185,7 @@ public class OpenApiParserSession extends UonParserSession {
}
// Cache these for faster lookup
- private static final BeanContext BC = BeanContext.DEFAULT;
+ private static final MarshallingContext BC = MarshallingContext.DEFAULT;
private static final ClassMeta<Long> CM_Long = BC.getClassMeta(Long.class);
private static final ClassMeta<Integer> CM_Integer = BC.getClassMeta(Integer.class);
private static final ClassMeta<Double> CM_Double = BC.getClassMeta(Double.class);
@@ -427,7 +427,7 @@ public class OpenApiParserSession extends UonParserSession {
}
if (type.isBean()) {
- var m = ctx.getBeanContext().newBeanMap(type.inner());
+ var m = ctx.getMarshallingContext().newBeanMap(type.inner());
for (var s : ss) {
var kv = StringUtils.splita(s, '=', 2);
if (kv.length != 2)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializer.java
index bf05b9c89b..c6dd362259 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializer.java
@@ -167,14 +167,14 @@ public class OpenApiSerializer extends UonSerializer implements OpenApiMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -191,7 +191,7 @@ public class OpenApiSerializer extends UonSerializer implements OpenApiMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializerSession.java
index 06d0f700cc..a8ef9f6f8b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/OpenApiSerializerSession.java
@@ -248,7 +248,7 @@ public class OpenApiSerializerSession extends UonSerializerSession {
}
// Cache these for faster lookup
- private static final BeanContext BC = BeanContext.DEFAULT;
+ private static final MarshallingContext BC = MarshallingContext.DEFAULT;
private static final ClassMeta<byte[]> CM_ByteArray = BC.getClassMeta(byte[].class);
private static final ClassMeta<String[]> CM_StringArray = BC.getClassMeta(String[].class);
private static final ClassMeta<Calendar> CM_Calendar = BC.getClassMeta(Calendar.class);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation.java
index 29045dfee8..2e7d4c4a58 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiAnnotation.java
@@ -39,7 +39,7 @@ public class OpenApiAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiApplyAnnotation.java
index cd153be61b..e3fe2abd2b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/oapi/annotation/OpenApiApplyAnnotation.java
@@ -64,7 +64,7 @@ public class OpenApiApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectIntrospector.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectIntrospector.java
index ea80c38998..3de712b883 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectIntrospector.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectIntrospector.java
@@ -243,7 +243,7 @@ public class ObjectIntrospector {
public Object invokeMethod(String method, String args) throws NoSuchMethodException, IllegalArgumentException, InvocationTargetException, IllegalAccessException, ParseException, IOException {
if (object == null)
return null;
- var m = parser.getBeanContext()
+ var m = parser.getMarshallingContext()
.getClassMeta(object.getClass())
.getPublicMethods()
.stream()
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectPaginator.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectPaginator.java
index 3a678b386a..342efabf9f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectPaginator.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectPaginator.java
@@ -70,7 +70,7 @@ public class ObjectPaginator implements ObjectTool<PageArgs> {
"unchecked", // Type erasure requires unchecked casts
"java:S3776", // Cognitive complexity acceptable for this specific logic
})
- public Object run(BeanSession session, Object input, PageArgs args) {
+ public Object run(MarshallingSession session, Object input, PageArgs args) {
if (input == null)
return null;
@@ -126,8 +126,8 @@ public class ObjectPaginator implements ObjectTool<PageArgs> {
"unchecked" // Type erasure requires cast to R for list elements
})
public <R> List<R> run(Object input, int pos, int limit) {
- var bs = BeanContext.DEFAULT_SESSION;
- var r = run(BeanContext.DEFAULT_SESSION, input, PageArgs.create(pos, limit));
+ var bs = MarshallingContext.DEFAULT_SESSION;
+ var r = run(MarshallingContext.DEFAULT_SESSION, input, PageArgs.create(pos, limit));
if (r instanceof List r2)
return r2;
return bs.convertToType(r, List.class);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectRest.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectRest.java
index 6eb021f98d..6d3a6a6743 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectRest.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectRest.java
@@ -215,7 +215,7 @@ public class ObjectRest {
private ReaderParser parser = Json5Parser.DEFAULT;
- final BeanSession session;
+ final MarshallingSession session;
/** If true, the root cannot be overwritten */
private boolean rootLocked;
@@ -227,7 +227,7 @@ public class ObjectRest {
* Create a new instance of a REST interface over the specified object.
*
* <p>
- * Uses {@link BeanContext#DEFAULT} for working with Java beans.
+ * Uses {@link MarshallingContext#DEFAULT} for working with Java beans.
*
* @param o The object to be wrapped.
*/
@@ -245,7 +245,7 @@ public class ObjectRest {
* @param parser The parser to use for parsing arguments and converting objects to the correct data type.
*/
public ObjectRest(Object o, ReaderParser parser) {
- this.session = parser == null ? BeanContext.DEFAULT_SESSION : parser.getBeanContext().getSession();
+ this.session = parser == null ? MarshallingContext.DEFAULT_SESSION : parser.getMarshallingContext().getSession();
if (parser == null)
parser = Json5Parser.DEFAULT;
this.parser = parser;
@@ -283,7 +283,7 @@ public class ObjectRest {
* Retrieves the element addressed by the URL as the specified object type.
*
* <p>
- * Will convert object to the specified type per {@link BeanSession#convertToType(Object, Class)}.
+ * Will convert object to the specified type per {@link MarshallingSession#convertToType(Object, Class)}.
*
* <h5 class='section'>Examples:</h5>
* <p class='bjava'>
@@ -321,7 +321,7 @@ public class ObjectRest {
* Retrieves the element addressed by the URL as the specified object type.
*
* <p>
- * Will convert object to the specified type per {@link BeanSession#convertToType(Object, Class)}.
+ * Will convert object to the specified type per {@link MarshallingSession#convertToType(Object, Class)}.
*
* <p>
* The type can be a simple type (e.g. beans, strings, numbers) or parameterized type (collections/maps).
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSearcher.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSearcher.java
index caaf2df985..608002ccbf 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSearcher.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSearcher.java
@@ -113,9 +113,9 @@ public class ObjectSearcher implements ObjectTool<SearchArgs> {
String searchPattern;
AbstractMatcher[] matchers;
- BeanSession bs;
+ MarshallingSession bs;
- ColumnMatcher(BeanSession bs, String searchPattern) {
+ ColumnMatcher(MarshallingSession bs, String searchPattern) {
this.bs = bs;
this.searchPattern = searchPattern;
this.matchers = new AbstractMatcher[factories.length];
@@ -157,12 +157,12 @@ public class ObjectSearcher implements ObjectTool<SearchArgs> {
private class RowMatcher {
Map<String,ColumnMatcher> entryMatchers = new HashMap<>();
- BeanSession bs;
+ MarshallingSession bs;
@SuppressWarnings({
"unchecked" // Type erasure requires unchecked cast for Map query
})
- RowMatcher(BeanSession bs, Map query) {
+ RowMatcher(MarshallingSession bs, Map query) {
this.bs = bs;
query.forEach((k, v) -> entryMatchers.put(s(k), new ColumnMatcher(bs, s(v))));
}
@@ -246,7 +246,7 @@ public class ObjectSearcher implements ObjectTool<SearchArgs> {
}
@Override /* Overridden from ObjectTool */
- public Object run(BeanSession session, Object input, SearchArgs args) {
+ public Object run(MarshallingSession session, Object input, SearchArgs args) {
var type = session.getClassMetaForObject(input);
Map<String,String> search = args.getSearch();
@@ -292,7 +292,7 @@ public class ObjectSearcher implements ObjectTool<SearchArgs> {
"unchecked", // Type erasure requires unchecked casts
})
public <R> List<R> run(Object input, String searchArgs) {
- Object r = run(BeanContext.DEFAULT_SESSION, input, SearchArgs.create(searchArgs));
+ Object r = run(MarshallingContext.DEFAULT_SESSION, input, SearchArgs.create(searchArgs));
if (r instanceof List r2)
return r2;
if (r instanceof Collection r3)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSorter.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSorter.java
index d70af28d47..675be801c8 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSorter.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectSorter.java
@@ -66,12 +66,12 @@ public class ObjectSorter implements ObjectTool<SortArgs> {
private static class SortEntry implements Comparable {
Object o;
ClassMeta<?> cm;
- BeanSession bs;
+ MarshallingSession bs;
Object sortVal;
boolean isDesc;
- SortEntry(BeanSession bs, Object o) {
+ SortEntry(MarshallingSession bs, Object o) {
this.o = o;
this.bs = bs;
this.cm = bs.getClassMetaForObject(o);
@@ -130,7 +130,7 @@ public class ObjectSorter implements ObjectTool<SortArgs> {
}
@Override /* Overridden from ObjectTool */
- public Object run(BeanSession session, Object input, SortArgs args) {
+ public Object run(MarshallingSession session, Object input, SortArgs args) {
if (input == null)
return null;
@@ -189,7 +189,7 @@ public class ObjectSorter implements ObjectTool<SortArgs> {
"java:S1168" // TODO: null when result not list/collection/array. Consider empty list.
})
public <R> List<R> run(Object input, String sortArgs) {
- var r = run(BeanContext.DEFAULT_SESSION, input, SortArgs.create(sortArgs));
+ var r = run(MarshallingContext.DEFAULT_SESSION, input, SortArgs.create(sortArgs));
if (r instanceof List r2)
return r2;
if (r instanceof Collection r2)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectTool.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectTool.java
index 5cdb065e92..973fd11f7d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectTool.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectTool.java
@@ -37,5 +37,5 @@ public interface ObjectTool<T> {
* @param args The arguments.
* @return The output POJO.
*/
- Object run(BeanSession session, Object input, T args);
+ Object run(MarshallingSession session, Object input, T args);
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectViewer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectViewer.java
index ed6d362196..8a9d165e71 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectViewer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/objecttools/ObjectViewer.java
@@ -83,7 +83,7 @@ public class ObjectViewer implements ObjectTool<ViewArgs> {
}
@Override /* Overridden from ObjectTool */
- public Object run(BeanSession session, Object input, ViewArgs args) {
+ public Object run(MarshallingSession session, Object input, ViewArgs args) {
if (input == null)
return null;
@@ -141,7 +141,7 @@ public class ObjectViewer implements ObjectTool<ViewArgs> {
* @return The extracted properties from the collection of objects.
*/
public List<Map> run(Object input, String args) {
- return (List<Map>)run(BeanContext.DEFAULT_SESSION, input, ViewArgs.create(args));
+ return (List<Map>)run(MarshallingContext.DEFAULT_SESSION, input, ViewArgs.create(args));
}
/**
@@ -152,6 +152,6 @@ public class ObjectViewer implements ObjectTool<ViewArgs> {
* @return The extracted properties from the object.
*/
public Map runSingle(Object input, String args) {
- return (Map)run(BeanContext.DEFAULT_SESSION, input, ViewArgs.create(args));
+ return (Map)run(MarshallingContext.DEFAULT_SESSION, input, ViewArgs.create(args));
}
}
\ No newline at end of file
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetParserSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetParserSession.java
index 398cf5cfeb..122f55560c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetParserSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetParserSession.java
@@ -145,13 +145,13 @@ public class ParquetParserSession extends InputStreamParserSession {
effectiveType = type.getElementType();
var elementType = effectiveType.isCollection() ? effectiveType.getElementType() : effectiveType;
if (elementType == null || elementType.isObject())
- elementType = ctx.getBeanContext().getClassMeta(Map.class);
+ elementType = ctx.getMarshallingContext().getClassMeta(Map.class);
// For scalar types, use Map so reassembleRows keeps raw map rows for unwrap logic
if (!effectiveType.isMap() && !effectiveType.isCollection() && !effectiveType.isArray()) {
var inner = effectiveType.inner();
if (inner != null && (inner.isPrimitive() || inner == String.class || inner == Boolean.class
|| inner == Character.class || Number.class.isAssignableFrom(inner)))
- elementType = ctx.getBeanContext().getClassMeta(Map.class);
+ elementType = ctx.getMarshallingContext().getClassMeta(Map.class);
}
var rows = readAllRows(bytes, meta, elementType, meta.schemaRepetition());
// Unwrap ValueHolder {value: X} when single row has "value" key and target expects scalar (not Map/List<Map>)
@@ -188,7 +188,7 @@ public class ParquetParserSession extends InputStreamParserSession {
var keyType = type.getKeyType();
if (keyType != null && !keyType.isAssignableTo(String.class) && isKeyValuePairFormat(rows)) {
var valueType = type.getValueType();
- if (valueType == null) valueType = ctx.getBeanContext().getClassMeta(Object.class);
+ if (valueType == null) valueType = ctx.getMarshallingContext().getClassMeta(Object.class);
var result = new LinkedHashMap<>();
for (var row : rows) {
var rowMap = (Map<?, ?>)row;
@@ -1071,7 +1071,7 @@ public class ParquetParserSession extends InputStreamParserSession {
}
}
- /** Collapses Parquet optional-group {value: X} wrappers so BeanSession receives unwrapped values for Optional properties. */
+ /** Collapses Parquet optional-group {value: X} wrappers so MarshallingSession receives unwrapped values for Optional properties. */
@SuppressWarnings({
"unchecked" // (Map<String,Object>) cast for mutating optional-group structure
})
@@ -1094,7 +1094,7 @@ public class ParquetParserSession extends InputStreamParserSession {
var elemType = propType.getElementType();
boolean absent = isAbsentOptionalMap(m, elemType);
// Detect absent inner Optional: all-null map, empty map, or nested {value:{all-null}} structure.
- // Use null so BeanSession's null→Optional<Optional<X>> conversion produces Optional.of(Optional.empty()).
+ // Use null so MarshallingSession's null→Optional<Optional<X>> conversion produces Optional.of(Optional.empty()).
if (absent) {
((Map<String,Object>)row).put(name, null);
} else if (m.size() == 1 && m.containsKey("value")) {
@@ -1109,7 +1109,7 @@ public class ParquetParserSession extends InputStreamParserSession {
/**
* Returns true if the map represents an absent Optional value that should be treated as null,
- * allowing BeanSession's null→Optional<Optional<X>> conversion to produce Optional.of(Optional.empty()).
+ * allowing MarshallingSession's null→Optional<Optional<X>> conversion to produce Optional.of(Optional.empty()).
*
* <p>Absent patterns:
* <ul>
@@ -1153,7 +1153,7 @@ public class ParquetParserSession extends InputStreamParserSession {
return null;
if (targetType != null && targetType.isOptional() && val instanceof Map<?,?> m) {
if (isAbsentOptionalMap(m, targetType))
- return null; // Let BeanSession convert null to Optional.of(Optional.empty())
+ return null; // Let MarshallingSession convert null to Optional.of(Optional.empty())
if (m.size() == 1 && m.containsKey("value"))
return collapseOptionalValue(m.get("value"), targetType.getElementType());
}
@@ -1205,7 +1205,7 @@ public class ParquetParserSession extends InputStreamParserSession {
return value;
}
- /** Unwraps ValueHolder map {value: X} to X when target is scalar; else converts via BeanSession. */
+ /** Unwraps ValueHolder map {value: X} to X when target is scalar; else converts via MarshallingSession. */
private Object unwrapValueHolder(Object row, ClassMeta<?> targetType) throws ParseException {
if (row == null)
return null;
@@ -1236,7 +1236,7 @@ public class ParquetParserSession extends InputStreamParserSession {
private Object toCollection(List<Object> values, ClassMeta<?> collectionType) throws ParseException {
var elemType = collectionType.getElementType();
if (elemType == null)
- elemType = ctx.getBeanContext().getClassMeta(Object.class);
+ elemType = ctx.getMarshallingContext().getClassMeta(Object.class);
Collection<Object> result;
try {
result = collectionType.canCreateNewInstance() ? (Collection<Object>)collectionType.newInstance() : null;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSchemaBuilder.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSchemaBuilder.java
index 5ba94405b3..e78da938e6 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSchemaBuilder.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSchemaBuilder.java
@@ -31,7 +31,7 @@ import java.util.Optional;
import java.util.Set;
import java.util.UUID;
-import org.apache.juneau.BeanContext;
+import org.apache.juneau.MarshallingContext;
import org.apache.juneau.BeanPropertyMeta;
import org.apache.juneau.ClassMeta;
import org.apache.juneau.annotation.ParentProperty;
@@ -49,19 +49,19 @@ import org.apache.juneau.commons.reflect.AnnotationProvider;
})
public final class ParquetSchemaBuilder {
- private final BeanContext beanContext;
+ private final MarshallingContext marshallingContext;
private final boolean writeDatesAsTimestamp;
private final ParquetCycleHandling cycleHandling;
/**
* Constructor.
*
- * @param beanContext The bean context for type resolution.
+ * @param marshallingContext The bean context for type resolution.
* @param writeDatesAsTimestamp If true, Date/Calendar/Temporal map to INT64+TIMESTAMP_MILLIS; else to BYTE_ARRAY+STRING.
* @param cycleHandling How to handle structural cycles when building schema.
*/
- public ParquetSchemaBuilder(BeanContext beanContext, boolean writeDatesAsTimestamp, ParquetCycleHandling cycleHandling) {
- this.beanContext = beanContext;
+ public ParquetSchemaBuilder(MarshallingContext marshallingContext, boolean writeDatesAsTimestamp, ParquetCycleHandling cycleHandling) {
+ this.marshallingContext = marshallingContext;
this.writeDatesAsTimestamp = writeDatesAsTimestamp;
this.cycleHandling = cycleHandling != null ? cycleHandling : ParquetCycleHandling.NULL;
}
@@ -117,7 +117,7 @@ public final class ParquetSchemaBuilder {
var typesInProgress = new HashSet<Class<?>>();
for (var key : keys) {
var val = map.get(key);
- var cm = beanContext.getClassMeta(val != null ? val.getClass() : Object.class);
+ var cm = marshallingContext.getClassMeta(val != null ? val.getClass() : Object.class);
addSchemaElements(elements, cm, key, "root", false, null, typesInProgress);
}
return elements;
@@ -136,8 +136,8 @@ public final class ParquetSchemaBuilder {
public List<ParquetSchemaElement> buildSchemaForKeyValuePairs(Object keySample, Object valueSample) {
var elements = new ArrayList<ParquetSchemaElement>();
var typesInProgress = new HashSet<Class<?>>();
- var keyCm = beanContext.getClassMeta(keySample != null ? keySample.getClass() : Object.class);
- var valueCm = beanContext.getClassMeta(valueSample != null ? valueSample.getClass() : Object.class);
+ var keyCm = marshallingContext.getClassMeta(keySample != null ? keySample.getClass() : Object.class);
+ var valueCm = marshallingContext.getClassMeta(valueSample != null ? valueSample.getClass() : Object.class);
elements.add(new ParquetSchemaElement("root", null, null, null, 2, null, null, null, null, null));
addSchemaElements(elements, keyCm, "key", "root", false, null, typesInProgress);
addSchemaElements(elements, valueCm, "value", "root", false, null, typesInProgress);
@@ -165,7 +165,7 @@ public final class ParquetSchemaBuilder {
private void addOptionalSchema(List<ParquetSchemaElement> elements, ClassMeta<?> cm, String name, String parentPath, boolean isRoot, Object sampleBean, Set<Class<?>> typesInProgress) {
var et = cm.getElementType();
if (et == null)
- et = beanContext.getClassMeta(Object.class);
+ et = marshallingContext.getClassMeta(Object.class);
Object innerSample = sampleBean instanceof Optional<?> o ? o.orElse(null) : sampleBean;
var optPath = parentPath != null ? parentPath + "." + name : name;
elements.add(new ParquetSchemaElement(name, null, null, isRoot ? null : OPTIONAL, 1, null, null, null, null, optPath));
@@ -185,12 +185,12 @@ public final class ParquetSchemaBuilder {
var path = parentPath != null ? parentPath + "." + name : name;
throw new SerializeException("Cyclic type reference at ''{0}'' (type ''{1}''). Use @ParentProperty to exclude back-references or set cycleHandling(NULL).", path, beanClass.getName());
}
- addLeafSchema(elements, beanContext.getClassMeta(String.class), name, parentPath, isRoot);
+ addLeafSchema(elements, marshallingContext.getClassMeta(String.class), name, parentPath, isRoot);
return;
}
typesInProgress.add(beanClass);
try {
- var ap = beanContext.getAnnotationProvider();
+ var ap = marshallingContext.getAnnotationProvider();
var props = bm.getProperties().values().stream()
.filter(BeanPropertyMeta::canRead)
.filter(p -> !isParentProperty(ap, p))
@@ -215,7 +215,7 @@ public final class ParquetSchemaBuilder {
var propCm = p.getClassMeta();
// When property type is Object, infer from sample so Map/Collection get proper schema (2.2)
if ((propCm == null || propCm.isObject()) && childSample != null)
- propCm = beanContext.getClassMeta(childSample.getClass());
+ propCm = marshallingContext.getClassMeta(childSample.getClass());
addSchemaElements(elements, propCm, p.getName(), childParentPath, false, childSample, typesInProgress);
}
} finally {
@@ -244,7 +244,7 @@ public final class ParquetSchemaBuilder {
if (sampleCollection != null && !sampleCollection.isEmpty()) {
var first = sampleCollection.iterator().next();
if (first != null)
- et = beanContext.getClassMeta(first.getClass());
+ et = marshallingContext.getClassMeta(first.getClass());
}
var listPath = parentPath != null ? parentPath + "." + name : name;
elements.add(new ParquetSchemaElement(name, null, null, isRoot ? null : OPTIONAL, 1, CONVERTED_LIST, null, null, null, null));
@@ -265,7 +265,7 @@ public final class ParquetSchemaBuilder {
var vt = cm.getValueType();
// Parquet MAP stores keys as STRING; non-String keys (e.g. Enum) are serialized via toString/name()
if (vt == null)
- vt = beanContext.getClassMeta(Object.class);
+ vt = marshallingContext.getClassMeta(Object.class);
var mapPath = parentPath != null ? parentPath + "." + name : name;
elements.add(new ParquetSchemaElement(name, null, null, isRoot ? null : OPTIONAL, 1, CONVERTED_MAP, null, null, null, null));
elements.add(new ParquetSchemaElement("key_value", null, null, REPEATED, 2, null, null, null, null, null));
@@ -311,7 +311,7 @@ public final class ParquetSchemaBuilder {
elements.add(new ParquetSchemaElement(name, TYPE_BYTE_ARRAY, null, repetition, null, CONVERTED_UTF8, LOGICAL_TYPE_STRING, null, null, path));
} else if (cm.isDecimal()) {
// Store as UTF-8 string to match JSON/CBOR behavior; DECIMAL binary encoding is not used since
- // the reader always reads BYTE_ARRAY as a UTF-8 string for type conversion via BeanSession.
+ // the reader always reads BYTE_ARRAY as a UTF-8 string for type conversion via MarshallingSession.
elements.add(new ParquetSchemaElement(name, TYPE_BYTE_ARRAY, null, repetition, null, CONVERTED_UTF8, LOGICAL_TYPE_STRING, null, null, path));
} else if (cm.isAssignableTo(UUID.class)) {
elements.add(new ParquetSchemaElement(name, TYPE_FIXED_LEN_BYTE_ARRAY, 16, repetition, null, null, LOGICAL_TYPE_UUID, null, null, path));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSerializerSession.java
index 66db8fa731..52495652be 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/ParquetSerializerSession.java
@@ -113,21 +113,21 @@ public class ParquetSerializerSession extends OutputStreamSerializerSession {
var elementType = getClassMetaForObject(bm.getBean());
// For collection root: use element type for flat row schema (root.name, root.age).
// Each collection element becomes one Parquet row. Avoids list column format issues.
- schema = new ParquetSchemaBuilder(ctx.getBeanContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchema(elementType, first);
+ schema = new ParquetSchemaBuilder(ctx.getMarshallingContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchema(elementType, first);
} else if (first instanceof Map<?,?> mapFirst) {
if (rootType.isMap() && o instanceof Map<?, ?> origMap && !origMap.isEmpty()
&& !(origMap.keySet().iterator().next() instanceof String)) {
- schema = new ParquetSchemaBuilder(ctx.getBeanContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling)
+ schema = new ParquetSchemaBuilder(ctx.getMarshallingContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling)
.buildSchemaForKeyValuePairs(mapFirst.get("key"), mapFirst.get("value"));
} else {
- schema = new ParquetSchemaBuilder(ctx.getBeanContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchemaFromMap((Map<?, ?>) first);
+ schema = new ParquetSchemaBuilder(ctx.getMarshallingContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchemaFromMap((Map<?, ?>) first);
}
} else {
var elementType = getClassMetaForObject(first);
var cm = (rootType.isCollection() || rootType.isArray())
- ? ctx.getBeanContext().getClassMeta(List.class, elementType.inner())
+ ? ctx.getMarshallingContext().getClassMeta(List.class, elementType.inner())
: elementType;
- schema = new ParquetSchemaBuilder(ctx.getBeanContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchema(cm, first);
+ schema = new ParquetSchemaBuilder(ctx.getMarshallingContext(), ctx.writeDatesAsTimestamp, ctx.cycleHandling).buildSchema(cm, first);
}
var leafColumns = ParquetSchemaBuilder.getLeafColumns(schema);
writeMagic(out);
@@ -443,7 +443,7 @@ public class ParquetSerializerSession extends OutputStreamSerializerSession {
return Iso8601Utils.format(key, cm, getTimeZone());
}
if (key instanceof Enum<?> e)
- return ctx.getBeanContext().isUseEnumNames() ? e.name() : e.toString();
+ return ctx.getMarshallingContext().isUseEnumNames() ? e.name() : e.toString();
return trim(String.valueOf(generalize(key, getClassMetaForObject(key))));
}
@@ -737,7 +737,7 @@ public class ParquetSerializerSession extends OutputStreamSerializerSession {
if (v instanceof String s)
return trim(s).getBytes(StandardCharsets.UTF_8);
if (v instanceof Enum<?> e)
- return (ctx.getBeanContext().isUseEnumNames() ? e.name() : e.toString()).getBytes(StandardCharsets.UTF_8);
+ return (ctx.getMarshallingContext().isUseEnumNames() ? e.name() : e.toString()).getBytes(StandardCharsets.UTF_8);
if (v instanceof Duration d)
return d.toString().getBytes(StandardCharsets.UTF_8);
// BigDecimal is stored as a UTF-8 string (same as JSON/CBOR) so fall through to String.valueOf below.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/annotation/ParquetApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/annotation/ParquetApplyAnnotation.java
index dbf9b88e25..6068994210 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/annotation/ParquetApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parquet/annotation/ParquetApplyAnnotation.java
@@ -64,7 +64,7 @@ public class ParquetApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/InputStreamParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/InputStreamParser.java
index e8d072f8bb..62af86ef2b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/InputStreamParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/InputStreamParser.java
@@ -145,14 +145,14 @@ public class InputStreamParser extends Parser {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -169,7 +169,7 @@ public class InputStreamParser extends Parser {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
index 6112768dc0..2bd8e6f722 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/Parser.java
@@ -142,7 +142,7 @@ import org.apache.juneau.xml.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention (e.g., PROP_autoCloseStreams)
})
-public class Parser extends BeanContextable {
+public class Parser extends MarshallingContextable {
// Property name constants
private static final String PROP_autoCloseStreams = "autoCloseStreams";
@@ -154,7 +154,7 @@ public class Parser extends BeanContextable {
/**
* Builder class.
*/
- public static class Builder extends BeanContextable.Builder {
+ public static class Builder extends MarshallingContextable.Builder {
private boolean autoCloseStreams;
private boolean trimStrings;
@@ -280,14 +280,14 @@ public class Parser extends BeanContextable {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -304,7 +304,7 @@ public class Parser extends BeanContextable {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -1164,7 +1164,7 @@ public class Parser extends BeanContextable {
* @return The parsed object.
* @throws ParseException Malformed input encountered.
* @throws IOException Thrown by underlying stream.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
public final <T> T parse(Object input, Type type, Type...args) throws ParseException, IOException {
return getSession().parse(input, type, args);
@@ -1369,7 +1369,7 @@ public class Parser extends BeanContextable {
*/
protected final boolean isUnbuffered() { return unbuffered; }
- @Override /* Overridden from BeanContextable */
+ @Override /* Overridden from MarshallingContextable */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_autoCloseStreams, autoCloseStreams)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserListener.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserListener.java
index e373f55a0c..65182faf5a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserListener.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserListener.java
@@ -62,7 +62,7 @@ public class ParserListener {
* Gets called when an unknown bean property is detected in a document.
*
* <p>
- * This method only gets called if {@link org.apache.juneau.BeanContext.Builder#ignoreUnknownBeanProperties()} setting is <jk>true</jk>.
+ * This method only gets called if {@link org.apache.juneau.MarshallingContext.Builder#ignoreUnknownBeanProperties()} setting is <jk>true</jk>.
* Otherwise, the parser will throw a {@link ParseException}.
*
* @param <T> The class type of the bean.
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 320ddc2892..bd5f8a1668 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
@@ -57,7 +57,7 @@ import org.apache.juneau.utils.Iso8601Utils;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public class ParserSession extends BeanSession {
+public class ParserSession extends MarshallingSession {
// Property name constants
private static final String PROP_javaMethod = "javaMethod";
@@ -76,7 +76,7 @@ public class ParserSession extends BeanSession {
/**
* Builder class.
*/
- public static class Builder extends BeanSession.Builder {
+ public static class Builder extends MarshallingSession.Builder {
private HttpPartSchema schema;
private Method javaMethod;
@@ -91,7 +91,7 @@ public class ParserSession extends BeanSession {
* <br>Cannot be <jk>null</jk>.
*/
protected Builder(Parser ctx) {
- super(assertArgNotNull(ARG_ctx, ctx).getBeanContext());
+ super(assertArgNotNull(ARG_ctx, ctx).getMarshallingContext());
this.ctx = ctx;
mediaTypeDefault(ctx.getPrimaryMediaType());
trimStrings = ctx.isTrimStrings();
@@ -537,7 +537,7 @@ public class ParserSession extends BeanSession {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
* @throws IOException Thrown by the underlying stream.
*/
@SuppressWarnings({
@@ -647,7 +647,7 @@ public class ParserSession extends BeanSession {
* <br>Ignored if the main type is not a map or collection.
* @return The parsed object.
* @throws ParseException Malformed input encountered.
- * @see BeanSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
+ * @see MarshallingSession#getClassMeta(Type,Type...) for argument syntax for maps and collections.
*/
@SuppressWarnings({
"unchecked" // Type erasure requires cast to T for generic type parsing
@@ -899,7 +899,7 @@ public class ParserSession extends BeanSession {
var cm = getClassMeta(typeName, pMeta, eType);
if (nn(cm)) {
- var bm = m.getBeanSession().newBeanMap(cm.inner());
+ var bm = m.getMarshallingSession().newBeanMap(cm.inner());
// Iterate through all the entries in the map and set the individual field values.
m.forEach((k, v) -> {
@@ -1210,7 +1210,7 @@ public class ParserSession extends BeanSession {
* @param beanMap The bean that doesn't have the expected property.
* @param value The parsed value.
* @throws ParseException
- * Automatically thrown if {@link org.apache.juneau.BeanContext.Builder#ignoreUnknownBeanProperties()} setting on this parser is
+ * Automatically thrown if {@link org.apache.juneau.MarshallingContext.Builder#ignoreUnknownBeanProperties()} setting on this parser is
* <jk>false</jk>
* @param <T> The class type of the bean map that doesn't have the expected property.
*/
@@ -1223,7 +1223,7 @@ public class ParserSession extends BeanSession {
listener.onUnknownBeanProperty(this, propertyName, beanMap.getClassMeta().inner(), beanMap.getBean());
}
- @Override /* Overridden from BeanSession */
+ @Override /* Overridden from MarshallingSession */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_javaMethod, javaMethod)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSet.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSet.java
index 91c920fc29..53f8f6db9b 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSet.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ParserSet.java
@@ -104,7 +104,7 @@ public class ParserSet {
private ParserSet impl;
List<Object> entries;
- private BeanContext.Builder bcBuilder;
+ private MarshallingContext.Builder bcBuilder;
/**
* Create an empty parser group builder.
@@ -222,9 +222,9 @@ public class ParserSet {
* @param value The bean contest builder to associate.
* @return This object.
*/
- public Builder beanContext(BeanContext.Builder value) {
+ public Builder marshallingContext(MarshallingContext.Builder value) {
bcBuilder = value;
- forEach(x -> x.beanContext(value));
+ forEach(x -> x.marshallingContext(value));
return this;
}
@@ -234,7 +234,7 @@ public class ParserSet {
* @param operation The operation to apply.
* @return This object.
*/
- public final Builder beanContext(Consumer<BeanContext.Builder> operation) {
+ public final Builder marshallingContext(Consumer<MarshallingContext.Builder> operation) {
if (nn(bcBuilder))
operation.accept(bcBuilder);
return this;
@@ -399,7 +399,7 @@ public class ParserSet {
throw rex("Copy method not implemented on class {0}", cn(x));
x = x2;
if (nn(bcBuilder))
- x.beanContext(bcBuilder);
+ x.marshallingContext(bcBuilder);
return x;
}
return o;
@@ -419,7 +419,7 @@ public class ParserSet {
})
Parser.Builder b = Parser.createParserBuilder((Class<? extends Parser>)o);
if (nn(bcBuilder))
- b.beanContext(bcBuilder);
+ b.marshallingContext(bcBuilder);
o = b;
}
return o;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParser.java
index 2a16f21ad3..daddb0a66d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/parser/ReaderParser.java
@@ -150,14 +150,14 @@ public class ReaderParser extends Parser {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -174,7 +174,7 @@ public class ReaderParser extends Parser {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
index e8c292b6ce..e33ef409d5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextParser.java
@@ -148,14 +148,14 @@ public class PlainTextParser extends ReaderParser implements PlainTextMetaProvid
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -172,7 +172,7 @@ public class PlainTextParser extends ReaderParser implements PlainTextMetaProvid
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
index 8184e989c0..80275df5b6 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/PlainTextSerializer.java
@@ -163,14 +163,14 @@ public class PlainTextSerializer extends WriterSerializer implements PlainTextMe
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -187,7 +187,7 @@ public class PlainTextSerializer extends WriterSerializer implements PlainTextMe
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation.java
index 88b4a45782..58c9dbb3ac 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextAnnotation.java
@@ -36,7 +36,7 @@ public class PlainTextAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextApplyAnnotation.java
index b532487c05..8d1c84e959 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/plaintext/annotation/PlainTextApplyAnnotation.java
@@ -64,7 +64,7 @@ public class PlainTextApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoAnnotation.java
index 2a836e02e5..76c5857e63 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoAnnotation.java
@@ -39,7 +39,7 @@ public class ProtoAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AnnotationObject.Builder {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoApplyAnnotation.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoApplyAnnotation.java
index 701c264389..c5c249ea74 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoApplyAnnotation.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/proto/annotation/ProtoApplyAnnotation.java
@@ -64,7 +64,7 @@ public class ProtoApplyAnnotation {
* Builder class.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#annotations(Annotation...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#annotations(Annotation...)}
* </ul>
*/
public static class Builder extends AppliedAnnotationObject.BuilderTMF {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
index a5a7bd6a17..6bc62d5542 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/OutputStreamSerializer.java
@@ -155,14 +155,14 @@ public class OutputStreamSerializer extends Serializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -179,7 +179,7 @@ public class OutputStreamSerializer extends Serializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
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 280197e619..f03f48497f 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
@@ -76,7 +76,7 @@ import org.apache.juneau.soap.*;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public class Serializer extends BeanTraverseContext {
+public class Serializer extends MarshallingTraverseContext {
// Property name constants
private static final String PROP_addBeanTypes = "addBeanTypes";
@@ -98,7 +98,7 @@ public class Serializer extends BeanTraverseContext {
/**
* Builder class.
*/
- public static class Builder extends BeanTraverseContext.Builder {
+ public static class Builder extends MarshallingTraverseContext.Builder {
private boolean addBeanTypes;
private boolean addRootType;
@@ -357,14 +357,14 @@ public class Serializer extends BeanTraverseContext {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -381,7 +381,7 @@ public class Serializer extends BeanTraverseContext {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
@@ -1621,7 +1621,7 @@ public class Serializer extends BeanTraverseContext {
*/
protected final boolean isTrimStrings() { return trimStrings; }
- @Override /* Overridden from BeanTraverseContext */
+ @Override /* Overridden from MarshallingTraverseContext */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_addBeanTypes, addBeanTypes)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
index 26ecec6b86..0525211b24 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSession.java
@@ -69,7 +69,7 @@ import org.apache.juneau.utils.Iso8601Utils;
@SuppressWarnings({
"java:S115" // Constants use UPPER_snakeCase convention
})
-public class SerializerSession extends BeanTraverseSession {
+public class SerializerSession extends MarshallingTraverseSession {
// Property name constants
private static final String PROP_javaMethod = "javaMethod";
@@ -101,7 +101,7 @@ public class SerializerSession extends BeanTraverseSession {
/**
* Builder class.
*/
- public static class Builder extends BeanTraverseSession.Builder {
+ public static class Builder extends MarshallingTraverseSession.Builder {
private static final String ARG_ctx = "ctx";
@@ -443,7 +443,7 @@ public class SerializerSession extends BeanTraverseSession {
throw causedBy2;
if (causedBy instanceof StackOverflowError)
throw new SerializeException(
- "Stack overflow occurred. This can occur when trying to serialize models containing loops. It's recommended you use the BeanTraverseContext.BEANTRAVERSE_detectRecursions setting to help locate the loop.");
+ "Stack overflow occurred. This can occur when trying to serialize models containing loops. It's recommended you use the MarshallingTraverseContext.BEANTRAVERSE_detectRecursions setting to help locate the loop.");
if (causedBy instanceof SerializeException causedBy2)
throw causedBy2;
throw new SerializeException(causedBy);
@@ -564,7 +564,7 @@ public class SerializerSession extends BeanTraverseSession {
try {
if ((! isKeepNullProperties()) && (willRecurse(attrName, value, cm) || willExceedDepth()))
return true;
- } catch (BeanRecursionException e) {
+ } catch (MarshallingRecursionException e) {
throw new SerializeException(e);
}
@@ -819,7 +819,7 @@ public class SerializerSession extends BeanTraverseSession {
throw e;
} catch (@SuppressWarnings("unused") StackOverflowError e) {
throw new SerializeException(this,
- "Stack overflow occurred. This can occur when trying to serialize models containing loops. It's recommended you use the BeanTraverseContext.BEANTRAVERSE_detectRecursions setting to help locate the loop.");
+ "Stack overflow occurred. This can occur when trying to serialize models containing loops. It's recommended you use the MarshallingTraverseContext.BEANTRAVERSE_detectRecursions setting to help locate the loop.");
} catch (Exception e) {
throw new SerializeException(this, e);
} finally {
@@ -1272,14 +1272,14 @@ public class SerializerSession extends BeanTraverseSession {
super.onError(t, msg, args);
}
- @Override /* Overridden from BeanTraverseSession */
+ @Override /* Overridden from MarshallingTraverseSession */
protected FluentMap<String,Object> properties() {
return super.properties()
.a(PROP_uriResolver, uriResolver);
}
/**
- * Same as {@link #push(String, Object, ClassMeta)} but wraps {@link BeanRecursionException} inside {@link SerializeException}.
+ * Same as {@link #push(String, Object, ClassMeta)} but wraps {@link MarshallingRecursionException} inside {@link SerializeException}.
*
* @param attrName The attribute name.
* @param o The current object being traversed.
@@ -1295,7 +1295,7 @@ public class SerializerSession extends BeanTraverseSession {
protected final ClassMeta<?> push2(String attrName, Object o, ClassMeta<?> eType) throws SerializeException {
try {
return super.push(attrName, o, eType);
- } catch (BeanRecursionException e) {
+ } catch (MarshallingRecursionException e) {
throw new SerializeException(e);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSet.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSet.java
index 2984d456d6..7f8582e05c 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSet.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/SerializerSet.java
@@ -104,7 +104,7 @@ public class SerializerSet {
private SerializerSet impl;
List<Object> entries;
- private BeanContext.Builder bcBuilder;
+ private MarshallingContext.Builder bcBuilder;
/**
* Create an empty serializer group builder.
@@ -219,9 +219,9 @@ public class SerializerSet {
* @param value The bean contest builder to associate.
* @return This object.
*/
- public Builder beanContext(BeanContext.Builder value) {
+ public Builder marshallingContext(MarshallingContext.Builder value) {
bcBuilder = value;
- forEach(x -> x.beanContext(value));
+ forEach(x -> x.marshallingContext(value));
return this;
}
@@ -231,7 +231,7 @@ public class SerializerSet {
* @param operation The operation to apply.
* @return This object.
*/
- public final Builder beanContext(Consumer<BeanContext.Builder> operation) {
+ public final Builder marshallingContext(Consumer<MarshallingContext.Builder> operation) {
if (nn(bcBuilder))
operation.accept(bcBuilder);
return this;
@@ -396,7 +396,7 @@ public class SerializerSet {
throw rex("Copy method not implemented on class {0}", cn(x));
x = x2;
if (nn(bcBuilder))
- x.beanContext(bcBuilder);
+ x.marshallingContext(bcBuilder);
return x;
}
return o;
@@ -416,7 +416,7 @@ public class SerializerSet {
})
Serializer.Builder b = Serializer.createSerializerBuilder((Class<? extends Serializer>)o);
if (nn(bcBuilder))
- b.beanContext(bcBuilder);
+ b.marshallingContext(bcBuilder);
o = b;
}
return o;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
index 7db5858cdf..84db50c8c1 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/serializer/WriterSerializer.java
@@ -182,14 +182,14 @@ public class WriterSerializer extends Serializer {
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -206,7 +206,7 @@ public class WriterSerializer extends Serializer {
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
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 38b12891e2..c7ab3896cb 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
@@ -154,7 +154,7 @@ public @interface SerializerConfig {
* <br>These show up as {@link ParseException ParseExceptions} with the message <js>"Depth too deep. Stack overflow occurred."</js>.
*
* <p>
- * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}.
+ * The behavior when recursions are detected depends on the value for {@link org.apache.juneau.MarshallingTraverseContext.Builder#ignoreRecursions()}.
*
* <p>
* For example, if a model contains the links A->B->C->A, then the JSON generated will look like
@@ -177,7 +177,7 @@ public @interface SerializerConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#detectRecursions()}
* </ul>
*
* @return The annotation value.
@@ -218,12 +218,12 @@ public @interface SerializerConfig {
* Ignore recursion errors.
*
* <p>
- * Used in conjunction with {@link org.apache.juneau.BeanTraverseContext.Builder#detectRecursions()}.
+ * Used in conjunction with {@link org.apache.juneau.MarshallingTraverseContext.Builder#detectRecursions()}.
* <br>Setting is ignored if <jsf>BEANTRAVERSE_detectRecursions</jsf> is <js>"false"</js>.
*
* <p>
* If <js>"true"</js>, when we encounter the same object when traversing a tree, we set the value to <jk>null</jk>.
- * <br>Otherwise, a {@link BeanRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
+ * <br>Otherwise, a {@link MarshallingRecursionException} is thrown with the message <js>"Recursion occurred, stack=..."</js>.
*
* <ul class='values'>
* <li><js>"true"</js>
@@ -236,7 +236,7 @@ public @interface SerializerConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#ignoreRecursions()}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#ignoreRecursions()}
* </ul>
*
* @return The annotation value.
@@ -260,7 +260,7 @@ public @interface SerializerConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#initialDepth(int)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#initialDepth(int)}
* </ul>
*
* @return The annotation value.
@@ -329,7 +329,7 @@ public @interface SerializerConfig {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='jm'>{@link org.apache.juneau.BeanTraverseContext.Builder#maxDepth(int)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingTraverseContext.Builder#maxDepth(int)}
* </ul>
*
* @return The annotation value.
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
index 57c552c06d..ab8a7434fb 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/soap/SoapXmlSerializer.java
@@ -192,14 +192,14 @@ public class SoapXmlSerializer extends XmlSerializer implements SoapXmlMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext value) {
+ super.marshallingContext(value);
return this;
}
@Override /* Overridden from Builder */
- public Builder beanContext(BeanContext.Builder value) {
- super.beanContext(value);
+ public Builder marshallingContext(MarshallingContext.Builder value) {
+ super.marshallingContext(value);
return this;
}
@@ -216,7 +216,7 @@ public class SoapXmlSerializer extends XmlSerializer implements SoapXmlMetaProvi
}
@Override /* Overridden from Builder */
- public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.BeanInterceptor<?>> value) {
+ public Builder beanInterceptor(Class<?> on, Class<? extends org.apache.juneau.swap.MarshallingInterceptor<?>> value) {
super.beanInterceptor(on, value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/ResolvingJsonMap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/ResolvingJsonMap.java
index bc4137c5de..8a68c92664 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/ResolvingJsonMap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/svl/ResolvingJsonMap.java
@@ -116,13 +116,13 @@ public class ResolvingJsonMap extends JsonMap {
}
@Override /* Overridden from JsonMap */
- public ResolvingJsonMap session(BeanSession session) {
+ public ResolvingJsonMap session(MarshallingSession session) {
super.session(session);
return this;
}
@Override /* Overridden from JsonMap */
- public ResolvingJsonMap setBeanSession(BeanSession value) {
+ public ResolvingJsonMap setBeanSession(MarshallingSession value) {
super.setBeanSession(value);
return this;
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
index c627447aa3..26787fe966 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoListSwap.java
@@ -44,21 +44,21 @@ import org.apache.juneau.serializer.*;
* <h5 class='figure'>Valid swap methods (S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public</jk> S toList()</c>
- * <li class='jm'><c><jk>public</jk> S toList(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toList(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toJsonList()</c>
- * <li class='jm'><c><jk>public</jk> S toJsonList(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toJsonList(MarshallingSession)</c>
* </ul>
*
* <h5 class='figure'>Valid unswap methods (N = Normal type, S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public static</jk> N fromList(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromList(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromList(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromJsonList(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromJsonList(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromJsonList(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N create(S)</c>
- * <li class='jm'><c><jk>public static</jk> N create(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N create(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N valueOf(S)</c>
- * <li class='jm'><c><jk>public static</jk> N valueOf(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N valueOf(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public</jk> N(S)</c>
* </ul>
*
@@ -98,7 +98,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
"rawtypes", // Raw types necessary for generic type handling
"java:S1452" // Wildcard required - ObjectSwap<?,?> for dynamically discovered swap types
})
- public static ObjectSwap<?,?> find(BeanContext bc, ClassInfo ci) {
+ public static ObjectSwap<?,?> find(MarshallingContext bc, ClassInfo ci) {
if (shouldIgnore(bc, ci))
return null;
@@ -124,7 +124,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
return null;
}
- private static boolean isSwapMethod(BeanContext bc, MethodInfo mi) {
+ private static boolean isSwapMethod(MarshallingContext bc, MethodInfo mi) {
// @formatter:off
return
mi.isNotDeprecated()
@@ -132,12 +132,12 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasReturnTypeParent(List.class)
- && mi.hasParameterTypesLenient(BeanSession.class)
+ && mi.hasParameterTypesLenient(MarshallingSession.class)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean isUnswapConstructor(BeanContext bc, ConstructorInfo cs, ClassInfo rt) {
+ private static boolean isUnswapConstructor(MarshallingContext bc, ConstructorInfo cs, ClassInfo rt) {
// @formatter:off
return
cs.isNotDeprecated()
@@ -147,20 +147,20 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
// @formatter:on
}
- private static boolean isUnswapMethod(BeanContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
+ private static boolean isUnswapMethod(MarshallingContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
// @formatter:off
return
mi.isNotDeprecated()
&& mi.isStatic()
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
+ && mi.hasParameterTypesLenient(MarshallingSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
+ private static boolean shouldIgnore(MarshallingContext bc, ClassInfo ci) {
return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
@@ -170,7 +170,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
private final Method unswapMethod;
private final Constructor<?> unswapConstructor;
- private AutoListSwap(BeanContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
+ private AutoListSwap(MarshallingContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
super(ci.inner(), swapMethod.getReturnType().inner());
this.swapMethod = bc.getBeanMethodVisibility().transform(swapMethod.inner());
this.unswapMethod = unswapMethod == null ? null : bc.getBeanMethodVisibility().transform(unswapMethod.inner());
@@ -178,7 +178,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
}
@Override /* Overridden from ObjectSwap */
- public List<?> swap(BeanSession session, Object o) throws SerializeException {
+ public List<?> swap(MarshallingSession session, Object o) throws SerializeException {
try {
return (List<?>)swapMethod.invoke(o, getMatchingArgs(swapMethod.getParameterTypes(), session));
} catch (Exception e) {
@@ -190,7 +190,7 @@ public class AutoListSwap<T> extends ObjectSwap<T,List<?>> {
"unchecked" // Type erasure requires cast to T
})
@Override /* Overridden from ObjectSwap */
- public T unswap(BeanSession session, List<?> o, ClassMeta<?> hint) throws ParseException {
+ public T unswap(MarshallingSession session, List<?> o, ClassMeta<?> hint) throws ParseException {
try {
if (nn(unswapMethod))
return (T)unswapMethod.invoke(null, getMatchingArgs(unswapMethod.getParameterTypes(), session, o));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
index 1c6b4c7d9a..4141845244 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoMapSwap.java
@@ -44,21 +44,21 @@ import org.apache.juneau.serializer.*;
* <h5 class='figure'>Valid swap methods (S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public</jk> S toMap()</c>
- * <li class='jm'><c><jk>public</jk> S toMap(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toMap(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toJsonMap()</c>
- * <li class='jm'><c><jk>public</jk> S toJsonMap(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toJsonMap(MarshallingSession)</c>
* </ul>
*
* <h5 class='figure'>Valid unswap methods (N = Normal type, S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public static</jk> N fromMap(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromMap(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromMap(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromJsonMap(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromJsonMap(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromJsonMap(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N create(S)</c>
- * <li class='jm'><c><jk>public static</jk> N create(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N create(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N valueOf(S)</c>
- * <li class='jm'><c><jk>public static</jk> N valueOf(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N valueOf(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public</jk> N(S)</c>
* </ul>
*
@@ -98,7 +98,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
"rawtypes", // Raw types necessary for generic type handling
"java:S1452" // Wildcard required - ObjectSwap<?,?> for dynamically discovered swap types
})
- public static ObjectSwap<?,?> find(BeanContext bc, ClassInfo ci) {
+ public static ObjectSwap<?,?> find(MarshallingContext bc, ClassInfo ci) {
if (shouldIgnore(bc, ci))
return null;
@@ -124,7 +124,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
return null;
}
- private static boolean isSwapMethod(BeanContext bc, MethodInfo mi) {
+ private static boolean isSwapMethod(MarshallingContext bc, MethodInfo mi) {
// @formatter:off
return
mi.isNotDeprecated()
@@ -132,12 +132,12 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(SWAP_METHOD_NAMES)
&& mi.hasReturnTypeParent(Map.class)
- && mi.hasParameterTypesLenient(BeanSession.class)
+ && mi.hasParameterTypesLenient(MarshallingSession.class)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean isUnswapConstructor(BeanContext bc, ConstructorInfo cs, ClassInfo rt) {
+ private static boolean isUnswapConstructor(MarshallingContext bc, ConstructorInfo cs, ClassInfo rt) {
// @formatter:off
return
cs.isNotDeprecated()
@@ -147,20 +147,20 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
// @formatter:on
}
- private static boolean isUnswapMethod(BeanContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
+ private static boolean isUnswapMethod(MarshallingContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
// @formatter:off
return
mi.isNotDeprecated()
&& mi.isStatic()
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
+ && mi.hasParameterTypesLenient(MarshallingSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
+ private static boolean shouldIgnore(MarshallingContext bc, ClassInfo ci) {
return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
@@ -170,7 +170,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
private final Method unswapMethod;
private final Constructor<?> unswapConstructor;
- private AutoMapSwap(BeanContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
+ private AutoMapSwap(MarshallingContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
super(ci.inner(), swapMethod.inner().getReturnType());
this.swapMethod = bc.getBeanMethodVisibility().transform(swapMethod.inner());
this.unswapMethod = unswapMethod == null ? null : bc.getBeanMethodVisibility().transform(unswapMethod.inner());
@@ -178,7 +178,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
}
@Override /* Overridden from ObjectSwap */
- public Map<?,?> swap(BeanSession session, Object o) throws SerializeException {
+ public Map<?,?> swap(MarshallingSession session, Object o) throws SerializeException {
try {
return (Map<?,?>)swapMethod.invoke(o, getMatchingArgs(swapMethod.getParameterTypes(), session));
} catch (Exception e) {
@@ -190,7 +190,7 @@ public class AutoMapSwap<T> extends ObjectSwap<T,Map<?,?>> {
"unchecked" // Type erasure requires cast to T
})
@Override /* Overridden from ObjectSwap */
- public T unswap(BeanSession session, Map<?,?> o, ClassMeta<?> hint) throws ParseException {
+ public T unswap(MarshallingSession session, Map<?,?> o, ClassMeta<?> hint) throws ParseException {
try {
if (nn(unswapMethod))
return (T)unswapMethod.invoke(null, getMatchingArgs(unswapMethod.getParameterTypes(), session, o));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
index a6cbb59543..0a67d559d5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoNumberSwap.java
@@ -46,43 +46,43 @@ import org.apache.juneau.serializer.*;
* <h5 class='figure'>Valid swap methods (S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public</jk> S toNumber()</c>
- * <li class='jm'><c><jk>public</jk> S toNumber(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toNumber(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toInteger()</c>
- * <li class='jm'><c><jk>public</jk> S toInteger(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toInteger(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toInt()</c>
- * <li class='jm'><c><jk>public</jk> S toInt(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toInt(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toLong()</c>
- * <li class='jm'><c><jk>public</jk> S toLong(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toLong(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toFloat()</c>
- * <li class='jm'><c><jk>public</jk> S toFloat(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toFloat(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toDouble()</c>
- * <li class='jm'><c><jk>public</jk> S toDouble(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toDouble(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toShort()</c>
- * <li class='jm'><c><jk>public</jk> S toShort(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toShort(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toByte()</c>
- * <li class='jm'><c><jk>public</jk> S toByte(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toByte(MarshallingSession)</c>
* </ul>
*
* <h5 class='figure'>Valid unswap methods (N = Normal type, S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public static</jk> N fromInteger(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromInteger(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromInteger(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromInt(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromInt(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromInt(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromLong(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromLong(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromLong(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromFloat(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromFloat(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromFloat(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromDouble(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromDouble(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromDouble(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromShort(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromShort(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromShort(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromByte(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromByte(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromByte(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N create(S)</c>
- * <li class='jm'><c><jk>public static</jk> N create(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N create(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N valueOf(S)</c>
- * <li class='jm'><c><jk>public static</jk> N valueOf(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N valueOf(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public</jk> N(S)</c>
* </ul>
* <p>
@@ -122,7 +122,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
"java:S1452", // Wildcard required - ObjectSwap<?,?> for dynamically discovered swap types
"java:S3776" // Cognitive complexity acceptable for exhaustive number type detection heuristic
})
- public static ObjectSwap<?,?> find(BeanContext bc, ClassInfo ci) {
+ public static ObjectSwap<?,?> find(MarshallingContext bc, ClassInfo ci) {
if (shouldIgnore(bc, ci))
return null;
@@ -149,7 +149,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
return null;
}
- private static boolean isSwapMethod(BeanContext bc, MethodInfo mi) {
+ private static boolean isSwapMethod(MarshallingContext bc, MethodInfo mi) {
var rt = mi.getReturnType();
// @formatter:off
return
@@ -158,12 +158,12 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
&& mi.isVisible(bc.getBeanMethodVisibility())
&& (rt.isAssignableTo(Number.class) || (rt.isPrimitive() && rt.isAny(int.class, short.class, long.class, float.class, double.class, byte.class)))
&& mi.hasAnyName(SWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class)
+ && mi.hasParameterTypesLenient(MarshallingSession.class)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean isUnswapConstructor(BeanContext bc, ConstructorInfo cs, ClassInfo rt) {
+ private static boolean isUnswapConstructor(MarshallingContext bc, ConstructorInfo cs, ClassInfo rt) {
// @formatter:off
return
cs.isNotDeprecated()
@@ -173,20 +173,20 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
// @formatter:on
}
- private static boolean isUnswapMethod(BeanContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
+ private static boolean isUnswapMethod(MarshallingContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
// @formatter:off
return
mi.isNotDeprecated()
&& mi.isStatic()
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
+ && mi.hasParameterTypesLenient(MarshallingSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
+ private static boolean shouldIgnore(MarshallingContext bc, ClassInfo ci) {
// @formatter:off
return
ci.isNonStaticMemberClass()
@@ -206,7 +206,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
@SuppressWarnings({
"null" // Method info variables are checked for null before use in method body
})
- private AutoNumberSwap(BeanContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
+ private AutoNumberSwap(MarshallingContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
super(ci.inner(), swapMethod.inner().getReturnType());
this.swapMethod = bc.getBeanMethodVisibility().transform(swapMethod.inner());
this.unswapMethod = unswapMethod == null ? null : bc.getBeanMethodVisibility().transform(unswapMethod.inner());
@@ -215,14 +215,14 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
Class<?> unswapType2 = null;
if (nn(unswapMethod)) {
for (var pi : unswapMethod.getParameters())
- if (! pi.getParameterType().is(BeanSession.class)) {
+ if (! pi.getParameterType().is(MarshallingSession.class)) {
var wrap = pi.getParameterType().getWrapperIfPrimitive();
if (nn(wrap))
unswapType2 = wrap.inner();
}
} else if (nn(unswapConstructor)) {
for (var pi : unswapConstructor.getParameters())
- if (! pi.getParameterType().is(BeanSession.class)) {
+ if (! pi.getParameterType().is(MarshallingSession.class)) {
var wrap = pi.getParameterType().getWrapperIfPrimitive();
if (nn(wrap))
unswapType2 = wrap.inner();
@@ -232,7 +232,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
}
@Override /* Overridden from ObjectSwap */
- public Number swap(BeanSession session, Object o) throws SerializeException {
+ public Number swap(MarshallingSession session, Object o) throws SerializeException {
try {
return (Number)swapMethod.invoke(o, getMatchingArgs(swapMethod.getParameterTypes(), session));
} catch (Exception e) {
@@ -244,7 +244,7 @@ public class AutoNumberSwap<T> extends ObjectSwap<T,Number> {
"unchecked" // Type erasure requires cast to T
})
@Override /* Overridden from ObjectSwap */
- public T unswap(BeanSession session, Number o, ClassMeta<?> hint) throws ParseException {
+ public T unswap(MarshallingSession session, Number o, ClassMeta<?> hint) throws ParseException {
if (unswapType == null)
throw new ParseException("No unparse methodology found for object.");
try {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
index fc3ee8ff95..a11d580753 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoObjectSwap.java
@@ -48,19 +48,19 @@ import org.apache.juneau.serializer.*;
* <h5 class='figure'>Valid swap methods (S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public</jk> S swap()</c>
- * <li class='jm'><c><jk>public</jk> S swap(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S swap(MarshallingSession)</c>
* <li class='jm'><c><jk>public</jk> S toObject()</c>
- * <li class='jm'><c><jk>public</jk> S toObject(BeanSession)</c>
+ * <li class='jm'><c><jk>public</jk> S toObject(MarshallingSession)</c>
* </ul>
*
* <h5 class='figure'>Valid unswap methods (N = Normal type, S = Swapped type)</h5>
* <ul>
* <li class='jm'><c><jk>public static</jk> N unswap(S)</c>
- * <li class='jm'><c><jk>public static</jk> N unswap(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N unswap(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N fromObject(S)</c>
- * <li class='jm'><c><jk>public static</jk> N fromObject(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N fromObject(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public static</jk> N create(S)</c>
- * <li class='jm'><c><jk>public static</jk> N create(BeanSession, S)</c>
+ * <li class='jm'><c><jk>public static</jk> N create(MarshallingSession, S)</c>
* <li class='jm'><c><jk>public</jk> N(S)</c>
* </ul>
*
@@ -100,7 +100,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
"rawtypes", // Raw types necessary for generic type handling
"java:S1452" // Wildcard required - ObjectSwap<?,?> for dynamically discovered swap types
})
- public static ObjectSwap<?,?> find(BeanContext bc, ClassInfo ci) {
+ public static ObjectSwap<?,?> find(MarshallingContext bc, ClassInfo ci) {
if (shouldIgnore(bc, ci))
return null;
@@ -126,19 +126,19 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
return null;
}
- private static boolean isSwapMethod(BeanContext bc, MethodInfo mi) {
+ private static boolean isSwapMethod(MarshallingContext bc, MethodInfo mi) {
// @formatter:off
return
mi.isNotDeprecated()
&& mi.isNotStatic()
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(SWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class)
+ && mi.hasParameterTypesLenient(MarshallingSession.class)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean isUnswapConstructor(BeanContext bc, ConstructorInfo cs, ClassInfo rt) {
+ private static boolean isUnswapConstructor(MarshallingContext bc, ConstructorInfo cs, ClassInfo rt) {
// @formatter:off
return
cs.isNotDeprecated()
@@ -148,20 +148,20 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
// @formatter:on
}
- private static boolean isUnswapMethod(BeanContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
+ private static boolean isUnswapMethod(MarshallingContext bc, MethodInfo mi, ClassInfo ci, ClassInfo rt) {
// @formatter:off
return
mi.isNotDeprecated()
&& mi.isStatic()
&& mi.isVisible(bc.getBeanMethodVisibility())
&& mi.hasAnyName(UNSWAP_METHOD_NAMES)
- && mi.hasParameterTypesLenient(BeanSession.class, rt.inner())
+ && mi.hasParameterTypesLenient(MarshallingSession.class, rt.inner())
&& mi.hasReturnTypeParent(ci)
&& mi.getMatchingMethods().stream().noneMatch(m2 -> bc.getAnnotationProvider().has(MarshalledIgnore.class, m2));
// @formatter:on
}
- private static boolean shouldIgnore(BeanContext bc, ClassInfo ci) {
+ private static boolean shouldIgnore(MarshallingContext bc, ClassInfo ci) {
return ci.isNonStaticMemberClass() || bc.getAnnotationProvider().has(MarshalledIgnore.class, ci);
}
@@ -171,7 +171,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
private final Method unswapMethod;
private final Constructor<?> unswapConstructor;
- private AutoObjectSwap(BeanContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
+ private AutoObjectSwap(MarshallingContext bc, ClassInfo ci, MethodInfo swapMethod, MethodInfo unswapMethod, ConstructorInfo unswapConstructor) {
super(ci.inner(), swapMethod.inner().getReturnType());
this.swapMethod = bc.getBeanMethodVisibility().transform(swapMethod.inner());
this.unswapMethod = unswapMethod == null ? null : bc.getBeanMethodVisibility().transform(unswapMethod.inner());
@@ -179,7 +179,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
}
@Override /* Overridden from ObjectSwap */
- public Object swap(BeanSession session, Object o) throws SerializeException {
+ public Object swap(MarshallingSession session, Object o) throws SerializeException {
try {
return swapMethod.invoke(o, getMatchingArgs(swapMethod.getParameterTypes(), session));
} catch (Exception e) {
@@ -191,7 +191,7 @@ public class AutoObjectSwap<T> extends ObjectSwap<T,Object> {
"unchecked" // Type erasure requires cast to T
})
@Override /* Overridden from ObjectSwap */
- public T unswap(BeanSession session, Object f, ClassMeta<?> hint) throws ParseException {
+ public T unswap(MarshallingSession session, Object f, ClassMeta<?> hint) throws ParseException {
try {
if (nn(unswapMethod))
return (T)unswapMethod.invoke(null, getMatchingArgs(unswapMethod.getParameterTypes(), session, f));
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
index e7f128bbe4..a27fae053d 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/AutoStringSwap.java
@@ -43,12 +43,12 @@ public class AutoStringSwap<T> extends StringSwap<T> {
}
@Override /* Overridden from ObjectSwap */
- public String swap(BeanSession session, T o) {
+ public String swap(MarshallingSession session, T o) {
return o.toString();
}
@Override /* Overridden from ObjectSwap */
- public T unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception {
+ public T unswap(MarshallingSession session, String s, ClassMeta<?> hint) throws Exception {
return classMeta.newInstanceFromString(null, s);
}
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BuilderSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BuilderSwap.java
index cf9d170c32..9c46214dee 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BuilderSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BuilderSwap.java
@@ -103,7 +103,7 @@ public class BuilderSwap<T,B> {
"java:S1172", // Parameter kept to match ObjectSwap interface signature
"java:S1452" // Wildcard required - BuilderSwap<?,?> for dynamically discovered builder types
})
- public static BuilderSwap<?,?> findSwapFromObjectClass(BeanContext bc, Class<?> objectClass, Visibility cVis, Visibility mVis) {
+ public static BuilderSwap<?,?> findSwapFromObjectClass(MarshallingContext bc, Class<?> objectClass, Visibility cVis, Visibility mVis) {
var builderClass = Value.<Class<?>>empty();
MethodInfo objectCreateMethod;
MethodInfo builderCreateMethod;
@@ -225,7 +225,7 @@ public class BuilderSwap<T,B> {
* @return A new object.
* @throws ExecutableException Exception occurred on invoked constructor/method/field.
*/
- public T build(BeanSession session, B builder, ClassMeta<?> hint) throws ExecutableException {
+ public T build(MarshallingSession session, B builder, ClassMeta<?> hint) throws ExecutableException {
if (nn(createObjectMethod))
return (T)createObjectMethod.invoke(builder);
try {
@@ -243,7 +243,7 @@ public class BuilderSwap<T,B> {
* @return A new object.
* @throws ExecutableException Exception occurred on invoked constructor/method/field.
*/
- public B create(BeanSession session, ClassMeta<?> hint) throws ExecutableException {
+ public B create(MarshallingSession session, ClassMeta<?> hint) throws ExecutableException {
if (nn(createBuilderMethod))
return (B)createBuilderMethod.invoke(null);
try {
@@ -274,7 +274,7 @@ public class BuilderSwap<T,B> {
@SuppressWarnings({
"java:S1452" // Wildcard required - ClassMeta<?> for builder class type
})
- public ClassMeta<?> getBuilderClassMeta(BeanSession session) {
+ public ClassMeta<?> getBuilderClassMeta(MarshallingSession session) {
if (builderClassMeta == null)
builderClassMeta = session.getClassMeta(getBuilderClass());
return builderClassMeta;
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/FunctionalSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/FunctionalSwap.java
index cdd681269c..e331cace2f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/FunctionalSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/FunctionalSwap.java
@@ -69,14 +69,14 @@ public class FunctionalSwap<T,S> extends ObjectSwap<T,S> {
}
@Override
- public S swap(BeanSession session, T o, String template) throws Exception {
+ public S swap(MarshallingSession session, T o, String template) throws Exception {
if (swapFunction == null)
return super.swap(session, o, template);
return swapFunction.applyThrows(o);
}
@Override
- public T unswap(BeanSession session, S f, ClassMeta<?> hint, String template) throws Exception {
+ public T unswap(MarshallingSession session, S f, ClassMeta<?> hint, String template) throws Exception {
if (unswapFunction == null)
return super.unswap(session, f, hint, template);
return unswapFunction.applyThrows(f);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
index 92b2f58b49..0358142bbd 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MapSwap.java
@@ -27,12 +27,12 @@ import org.apache.juneau.collections.*;
* <jk>public class</jk> MyBeanSwap <jk>extends</jk> MapSwap<<jk>byte</jk>[]> {
*
* <ja>@Override</ja>
- * <jk>public</jk> JsonMap swap(BeanSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> JsonMap swap(MarshallingSession <jv>session</jv>, MyBean <jv>bean</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> JsonMap.<jsm>of</jsm>(<js>"foo"</js>, <jv>bean</jv>.getFoo());
* }
*
* <ja>@Override</ja>
- * <jk>public</jk> MyBean unswap(BeanSession <jv>session</jv>, JsonMap <jv>map</jv>, ClassMeta<?> <jv>hint</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> MyBean unswap(MarshallingSession <jv>session</jv>, JsonMap <jv>map</jv>, ClassMeta<?> <jv>hint</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> new</jk> MyBean(<jv>map</jv>.get(<js>"foo"</js>));
* }
* }
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/MarshallingInterceptor.java
similarity index 88%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/BeanInterceptor.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/MarshallingInterceptor.java
index c361db56fb..c88f831624 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/MarshallingInterceptor.java
@@ -25,7 +25,7 @@ package org.apache.juneau.swap;
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Interceptor that strips out sensitive information on Address beans.</jc>
- * <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> {
+ * <jk>public class</jk> AddressInterceptor <jk>extends</jk> MarshallingInterceptor<Address> {
*
* <ja>@Override</ja>
* <jk>public</jk> Object readProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
@@ -47,7 +47,7 @@ package org.apache.juneau.swap;
* Bean interceptors are registered in the following way:
* <ul class='javatree'>
* <li class='ja'>{@link org.apache.juneau.annotation.Bean#interceptor() @Marshalled(interceptor)}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanInterceptor(Class,Class)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#beanInterceptor(Class,Class)}
* </ul>
*
* <h5 class='section'>Example:</h5>
@@ -66,15 +66,15 @@ package org.apache.juneau.swap;
*
* @param <T> The bean type.
*/
-public class BeanInterceptor<T> {
+public class MarshallingInterceptor<T> {
/** Non-existent bean interceptor. */
- public static final class Void extends BeanInterceptor<Object> {}
+ public static final class Void extends MarshallingInterceptor<Object> {}
/**
* Default reusable property filter instance.
*/
- public static final BeanInterceptor<Object> DEFAULT = new BeanInterceptor<>();
+ public static final MarshallingInterceptor<Object> DEFAULT = new MarshallingInterceptor<>();
/**
* Property read interceptor.
@@ -85,7 +85,7 @@ public class BeanInterceptor<T> {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Address filter that strips out sensitive information.</jc>
- * <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> {
+ * <jk>public class</jk> AddressInterceptor <jk>extends</jk> MarshallingInterceptor<Address> {
*
* <jk>public</jk> Object readProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
* <jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>))
@@ -114,7 +114,7 @@ public class BeanInterceptor<T> {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// Address filter that strips out sensitive information.</jc>
- * <jk>public class</jk> AddressInterceptor <jk>extends</jk> BeanInterceptor<Address> {
+ * <jk>public class</jk> AddressInterceptor <jk>extends</jk> MarshallingInterceptor<Address> {
*
* <jk>public</jk> Object writeProperty(Address <jv>bean</jv>, String <jv>name</jv>, Object <jv>value</jv>) {
* <jk>if</jk> (<js>"taxInfo"</js>.equals(<jv>name</jv>) && <js>"redacted"</js>.equals(<jv>value</jv>))
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
index 08a4370e1a..8c6d123342 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/ObjectSwap.java
@@ -49,7 +49,7 @@ import org.apache.juneau.serializer.*;
* <c>ObjectSwaps</c> are associated with serializers and parsers through the following:
* <ul class='javatree'>
* <li class='ja'>{@link Swap @Swap}
- * <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#swaps(Class...)}
+ * <li class='jm'>{@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...)}
* </ul>
*
* <p>
@@ -218,7 +218,7 @@ public abstract class ObjectSwap<T,S> {
* This is always going to be the same bean context that created this swap.
* @return The {@link ClassMeta} of the transformed class type.
*/
- public ClassMeta<?> getSwapClassMeta(BeanSession session) {
+ public ClassMeta<?> getSwapClassMeta(MarshallingSession session) {
if (swapClassMeta == null)
swapClassMeta = session.getClassMeta(swapClass);
return swapClassMeta;
@@ -274,7 +274,7 @@ public abstract class ObjectSwap<T,S> {
* @param session The bean session.
* @return Zero if swap doesn't match the session, or a positive number if it does.
*/
- public int match(BeanSession session) {
+ public int match(MarshallingSession session) {
if (forMediaTypes == null)
return 1;
int i = 0;
@@ -316,12 +316,12 @@ public abstract class ObjectSwap<T,S> {
* @return The transformed object.
* @throws Exception If a problem occurred trying to convert the output.
*/
- public S swap(BeanSession session, T o) throws Exception {
+ public S swap(MarshallingSession session, T o) throws Exception {
return swap(session, o, template);
}
/**
- * Same as {@link #swap(BeanSession, Object)}, but can be used if your swap has a template associated with it.
+ * Same as {@link #swap(MarshallingSession, Object)}, but can be used if your swap has a template associated with it.
*
* @param session
* The bean session to use to get the class meta.
@@ -335,7 +335,7 @@ public abstract class ObjectSwap<T,S> {
@SuppressWarnings({
"java:S112" // throws Exception intentional - callback/lifecycle method for user implementations
})
- public S swap(BeanSession session, T o, String template) throws Exception {
+ public S swap(MarshallingSession session, T o, String template) throws Exception {
throw new SerializeException("Swap method not implemented on ObjectSwap ''{0}''", cn(this));
}
@@ -362,12 +362,12 @@ public abstract class ObjectSwap<T,S> {
@SuppressWarnings({
"java:S112" // throws Exception intentional - callback/lifecycle method for user implementations
})
- public T unswap(BeanSession session, S f, ClassMeta<?> hint) throws Exception {
+ public T unswap(MarshallingSession session, S f, ClassMeta<?> hint) throws Exception {
return unswap(session, f, hint, template);
}
/**
- * Same as {@link #unswap(BeanSession, Object, ClassMeta)}, but can be used if your swap has a template associated with it.
+ * Same as {@link #unswap(MarshallingSession, Object, ClassMeta)}, but can be used if your swap has a template associated with it.
*
* @param session
* The bean session to use to get the class meta.
@@ -386,7 +386,7 @@ public abstract class ObjectSwap<T,S> {
@SuppressWarnings({
"java:S112" // throws Exception intentional - callback/lifecycle method for user implementations
})
- public T unswap(BeanSession session, S f, ClassMeta<?> hint, String template) throws Exception {
+ public T unswap(MarshallingSession session, S f, ClassMeta<?> hint, String template) throws Exception {
throw new ParseException("Unswap method not implemented on ObjectSwap ''{0}''", cn(this));
}
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
index 68740b992d..92e2d19499 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/StringSwap.java
@@ -25,12 +25,12 @@ package org.apache.juneau.swap;
* <jk>public class</jk> ByteArrayBase64Swap <jk>extends</jk> StringSwap<<jk>byte</jk>[]> {
*
* <ja>@Override</ja>
- * <jk>public</jk> String swap(BeanSession <jv>session</jv>, <jk>byte</jk>[] <jv>bytes</jv>) <jk>throws</jk> Exception {
+ * <jk>public</jk> String swap(MarshallingSession <jv>session</jv>, <jk>byte</jk>[] <jv>bytes</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> StringUtils.<jsm>base64Encode</jsm>(<jv>bytes</jv>);
* }
*
* <ja>@Override</ja>
- * <jk>public byte</jk>[] unswap(BeanSession <jv>session</jv>, String <jv>string</jv>, ClassMeta<?> <jv>hint</jv>) <jk>throws</jk> Exception {
+ * <jk>public byte</jk>[] unswap(MarshallingSession <jv>session</jv>, String <jv>string</jv>, ClassMeta<?> <jv>hint</jv>) <jk>throws</jk> Exception {
* <jk>return</jk> StringUtils.<jsm>base64Decode</jsm>(<jv>string</jv>);
* }
* }
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/Surrogate.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/Surrogate.java
index 99582beb68..95738c3da3 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/Surrogate.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/Surrogate.java
@@ -49,7 +49,7 @@ import org.apache.juneau.annotation.*;
* </p>
*
* <p>
- * Surrogate classes are associated with serializers and parsers using the {@link org.apache.juneau.BeanContext.Builder#swaps(Class...)}
+ * Surrogate classes are associated with serializers and parsers using the {@link org.apache.juneau.MarshallingContext.Builder#swaps(Class...)}
* method.
* <p class='bjava'>
* JsonSerializer <jv>serializer</jv> = JsonSerializer
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
index bffd21bad3..9ec64de53a 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swap/SurrogateSwap.java
@@ -56,7 +56,7 @@ public class SurrogateSwap<T,F> extends ObjectSwap<T,F> {
"rawtypes", // Raw types necessary for generic type handling
"java:S1452" // Wildcard required - List<SurrogateSwap<?,?>> for multiple constructor-based swaps
})
- public static List<SurrogateSwap<?,?>> findObjectSwaps(Class<?> c, BeanContext bc) {
+ public static List<SurrogateSwap<?,?>> findObjectSwaps(Class<?> c, MarshallingContext bc) {
List<SurrogateSwap<?,?>> l = new LinkedList<>();
var ci = info(c);
ci.getPublicConstructors().stream().filter(x -> ! bc.getAnnotationProvider().has(MarshalledIgnore.class, x) && x.hasNumParameters(1) && x.isPublic()).forEach(x -> {
@@ -88,7 +88,7 @@ public class SurrogateSwap<T,F> extends ObjectSwap<T,F> {
}
@Override /* Overridden from ObjectSwap */
- public F swap(BeanSession session, T o) throws SerializeException {
+ public F swap(MarshallingSession session, T o) throws SerializeException {
try {
return constructor.newInstance(o);
} catch (Exception e) {
@@ -100,7 +100,7 @@ public class SurrogateSwap<T,F> extends ObjectSwap<T,F> {
@SuppressWarnings({
"unchecked" // Type erasure requires cast to T
})
- public T unswap(BeanSession session, F f, ClassMeta<?> hint) throws ParseException {
+ public T unswap(MarshallingSession session, F f, ClassMeta<?> hint) throws ParseException {
if (unswapMethod == null)
throw new ParseException("unswap() method not implement on surrogate class ''{1}'': {0}", cn(f), getNormalClass().getNameFull());
try {
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/ByteArraySwap.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/ByteArraySwap.java
index 9620d486d1..1b70748f75 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/ByteArraySwap.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/swaps/ByteArraySwap.java
@@ -40,7 +40,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified <code><jk>byte</jk>[]</code> to a {@link String}.
*/
@Override /* Overridden from ObjectSwap */
- public String swap(BeanSession session, byte[] b) throws Exception {
+ public String swap(MarshallingSession session, byte[] b) throws Exception {
return base64Encode(b);
}
@@ -48,7 +48,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified {@link String} to a <code><jk>byte</jk>[]</code>.
*/
@Override /* Overridden from ObjectSwap */
- public byte[] unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception {
+ public byte[] unswap(MarshallingSession session, String s, ClassMeta<?> hint) throws Exception {
return base64Decode(s);
}
}
@@ -62,7 +62,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified <code><jk>byte</jk>[]</code> to a {@link String}.
*/
@Override /* Overridden from ObjectSwap */
- public String swap(BeanSession session, byte[] b) throws Exception {
+ public String swap(MarshallingSession session, byte[] b) throws Exception {
return toHex(b);
}
@@ -70,7 +70,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified {@link String} to a <code><jk>byte</jk>[]</code>.
*/
@Override /* Overridden from ObjectSwap */
- public byte[] unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception {
+ public byte[] unswap(MarshallingSession session, String s, ClassMeta<?> hint) throws Exception {
return fromHex(s);
}
}
@@ -84,7 +84,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified <code><jk>byte</jk>[]</code> to a {@link String}.
*/
@Override /* Overridden from ObjectSwap */
- public String swap(BeanSession session, byte[] b) throws Exception {
+ public String swap(MarshallingSession session, byte[] b) throws Exception {
return toSpacedHex(b);
}
@@ -92,7 +92,7 @@ public abstract class ByteArraySwap extends StringSwap<byte[]> {
* Converts the specified {@link String} to a <code><jk>byte</jk>[]</code>.
*/
@Override /* Overridden from ObjectSwap */
- public byte[] unswap(BeanSession session, String s, ClassMeta<?> hint) throws Exception {
+ public byte[] unswap(MarshallingSession session, String s, ClassMeta<?> hint) throws Exception {
return fromSpacedHex(s);
... 6514 lines suppressed ...
(juneau) 03/05: refactor(marshall): rename @BeanConfig/@BeanConfigAnnotation to @MarshalledConfig family
Posted by ja...@apache.org.
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 05d2cc86da8a3e1b0ecc654e8aeac1b913e0563e
Author: James Bognar <ja...@jamesbog-ltmjqf2.internal.salesforce.com>
AuthorDate: Mon May 11 17:33:52 2026 -0400
refactor(marshall): rename @BeanConfig/@BeanConfigAnnotation to @MarshalledConfig family
- Rename BeanConfig.java → MarshalledConfig.java (annotation)
- Rename BeanConfigAnnotation.java → MarshalledConfigAnnotation.java (applier)
- Update all @ContextApply references, import statements, Javadoc @link tags,
and annotation usages across BeanContext, BeanContextable, Context,
BeanSession, AnnotationApplier, ContextSession, RestOp/Get/Post/Put/Patch/Options,
BasicJson/Json5/JsonHtml/OpenApi/Universal/DefaultConfig, BasicRestOperations,
and all test files
- Rename BeanConfig_Test.java → MarshalledConfig_Test.java
- Rename BeanConfigAnnotation_Test.java → MarshalledConfigAnnotation_Test.java
- Rename BeanConfig_Swaps_Test.java → MarshalledConfig_Swaps_Test.java
- Rename RestOp_BeanConfig_Test.java → RestOp_MarshalledConfig_Test.java
- Update class/method names inside renamed test files
Co-authored-by: Cursor <cu...@cursor.com>
---
.../java/org/apache/juneau/AnnotationApplier.java | 16 +++----
.../main/java/org/apache/juneau/BeanContext.java | 48 ++++++++++-----------
.../java/org/apache/juneau/BeanContextable.java | 50 +++++++++++-----------
.../main/java/org/apache/juneau/BeanSession.java | 6 +--
.../src/main/java/org/apache/juneau/Context.java | 16 +++----
.../java/org/apache/juneau/ContextSession.java | 2 +-
.../org/apache/juneau/annotation/Marshalled.java | 8 ++--
.../{BeanConfig.java => MarshalledConfig.java} | 12 +++---
...tation.java => MarshalledConfigAnnotation.java} | 16 +++----
.../apache/juneau/annotation/MarshalledProp.java | 4 +-
.../rest/config/BasicUniversalJenaConfig.java | 4 +-
.../org/apache/juneau/rest/annotation/RestGet.java | 2 +-
.../org/apache/juneau/rest/annotation/RestOp.java | 2 +-
.../apache/juneau/rest/annotation/RestOptions.java | 2 +-
.../apache/juneau/rest/annotation/RestPatch.java | 2 +-
.../apache/juneau/rest/annotation/RestPost.java | 2 +-
.../org/apache/juneau/rest/annotation/RestPut.java | 2 +-
.../juneau/rest/config/BasicJson5Config.java | 4 +-
.../apache/juneau/rest/config/BasicJsonConfig.java | 4 +-
.../juneau/rest/config/BasicJsonHtmlConfig.java | 4 +-
.../juneau/rest/config/BasicOpenApiConfig.java | 4 +-
.../juneau/rest/config/BasicUniversalConfig.java | 4 +-
.../apache/juneau/rest/config/DefaultConfig.java | 2 +-
.../juneau/rest/servlet/BasicRestOperations.java | 2 +-
.../java/org/apache/juneau/BasicBeans_Test.java | 2 +-
.../java/org/apache/juneau/BeanMapErrors_Test.java | 2 +-
...Config_Test.java => MarshalledConfig_Test.java} | 2 +-
...t.java => MarshalledConfigAnnotation_Test.java} | 8 ++--
.../apache/juneau/annotation/Marshalled_Test.java | 10 ++---
..._Test.java => MarshalledConfig_Swaps_Test.java} | 12 +++---
...Test.java => RestOp_MarshalledConfig_Test.java} | 18 ++++----
.../client/RestClient_Config_Context_Test.java | 4 +-
.../juneau/transforms/DefaultSwaps_Test.java | 16 +++----
33 files changed, 146 insertions(+), 146 deletions(-)
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
index 621559ee88..ae07d78ad0 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/AnnotationApplier.java
@@ -32,7 +32,7 @@ import org.apache.juneau.commons.utils.*;
import org.apache.juneau.svl.*;
/**
- * Class used to add properties to a context builder (e.g. {@link BeanContext.Builder}) from an annotation (e.g. {@link BeanConfig}).
+ * Class used to add properties to a context builder (e.g. {@link BeanContext.Builder}) from an annotation (e.g. {@link MarshalledConfig}).
*
* <p>
* Used by {@link Context.Builder#applyAnnotations(Class...)} and {@link Context.Builder#applyAnnotations(Object...)} to apply
@@ -45,24 +45,24 @@ import org.apache.juneau.svl.*;
* <jc>// The annotation applied to classes and methods.</jc>
* <ja>@Target</ja>({METHOD,TYPE})
* <ja>@Retention</ja>(<jsf>RUNTIME</jsf>)
- * <ja>@ContextApply</ja>(BeanConfigAnnotationApplier.<jk>class</jk>)
- * <jk>public</jk> <jk>@interface </jk>BeanConfig {
+ * <ja>@ContextApply</ja>(MarshalledConfigAnnotationApplier.<jk>class</jk>)
+ * <jk>public</jk> <jk>@interface </jk>MarshalledConfig {
*
* String unsortedProperties() <jk>default</jk> <js>""</js>;
*
* }
*
* <jc>// The applier that applies the annotation to the bean context builder.</jc>
- * <jk>public class</jk> BeanConfigAnnotationApplier <jk>extends</jk> AnnotationApplier<<ja>BeanConfig</ja>,BeanContext.Builder> {
+ * <jk>public class</jk> MarshalledConfigAnnotationApplier <jk>extends</jk> AnnotationApplier<<ja>MarshalledConfig</ja>,BeanContext.Builder> {
*
* <jc>// Required constructor. </jc>
* <jk>public</jk> Applier(VarResolverSession <jv>vr</jv>) {
- * <jk>super</jk>(BeanConfig.<jk>class</jk>, BeanContext.Builder.<jk>class</jk>, <jv>vr</jv>);
+ * <jk>super</jk>(MarshalledConfig.<jk>class</jk>, BeanContext.Builder.<jk>class</jk>, <jv>vr</jv>);
* }
*
* <ja>@Override</ja>
- * <jk>public void</jk> apply(AnnotationInfo<BeanConfig> <jv>annotationInfo</jv>, BeanContext.Builder <jv>builder</jv>) {
- * <ja>BeanConfig</ja> <jv>beanConfig</jv> = <jv>annotationInfo</jv>.getAnnotation();
+ * <jk>public void</jk> apply(AnnotationInfo<MarshalledConfig> <jv>annotationInfo</jv>, BeanContext.Builder <jv>builder</jv>) {
+ * <ja>MarshalledConfig</ja> <jv>beanConfig</jv> = <jv>annotationInfo</jv>.getAnnotation();
*
* String <jv>unsortedProperties</jv> = <jv>beanConfig</jv>.unsortedProperties();
* <jk>if</jk> (! <jv>unsortedProperties</jv>.isEmpty())
@@ -71,7 +71,7 @@ import org.apache.juneau.svl.*;
* }
*
* <jc>// An annotated class opting out of the default sorted behavior.</jc>
- * <ja>@BeanConfig</ja>(unsortedProperties=<js>"true"</js>)
+ * <ja>@MarshalledConfig</ja>(unsortedProperties=<js>"true"</js>)
* <jk>public class</jk> AnnotatedClass {}
*
* <jc>// Putting it together.</jc>
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 72d185ae92..34fd538d5d 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
@@ -439,7 +439,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beanClassVisibility()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beanClassVisibility()}
* </ul>
*
* @param value
@@ -488,7 +488,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beanConstructorVisibility()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beanConstructorVisibility()}
* </ul>
*
* @param value
@@ -610,8 +610,8 @@ public class BeanContext extends Context implements ConversionFinder {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#dictionary()}
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledProp#dictionary()}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary()}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#dictionary_replace()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(ClassInfo...)}
* </ul>
*
@@ -684,7 +684,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beanFieldVisibility()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beanFieldVisibility()}
* </ul>
*
* @param value
@@ -780,7 +780,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beanMapPutReturnsOldValue()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beanMapPutReturnsOldValue()}
* </ul>
*
* @return This object.
@@ -834,7 +834,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beanMethodVisibility()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beanMethodVisibility()}
* </ul>
*
* @param value
@@ -1595,7 +1595,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beansRequireDefaultConstructor()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beansRequireDefaultConstructor()}
* </ul>
*
* @return This object.
@@ -1652,7 +1652,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#beansRequireSerializable()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#beansRequireSerializable()}
* </ul>
*
* @return This object.
@@ -1865,7 +1865,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#disableBeansRequireSomeProperties()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#disableBeansRequireSomeProperties()}
* </ul>
*
* @return This object.
@@ -1916,7 +1916,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#disableIgnoreMissingSetters()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#disableIgnoreMissingSetters()}
* </ul>
*
* @return This object.
@@ -1964,7 +1964,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#disableIgnoreTransientFields()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#disableIgnoreTransientFields()}
* </ul>
*
* @return This object.
@@ -2009,7 +2009,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#disableIgnoreUnknownNullBeanProperties()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#disableIgnoreUnknownNullBeanProperties()}
* </ul>
*
* @return This object.
@@ -2038,7 +2038,7 @@ public class BeanContext extends Context implements ConversionFinder {
* Otherwise, throws a {@link BeanRuntimeException}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#disableInterfaceProxies()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#disableInterfaceProxies()}
* </ul>
*
* @return This object.
@@ -2197,7 +2197,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#findFluentSetters()}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#findFluentSetters()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#findFluentSetters()}
* </ul>
*
* @return This object.
@@ -2327,7 +2327,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#ignoreInvocationExceptionsOnGetters()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#ignoreInvocationExceptionsOnGetters()}
* </ul>
*
* @return This object.
@@ -2374,7 +2374,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#ignoreInvocationExceptionsOnSetters()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#ignoreInvocationExceptionsOnSetters()}
* </ul>
*
* @return This object.
@@ -2419,7 +2419,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#ignoreUnknownBeanProperties()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#ignoreUnknownBeanProperties()}
* </ul>
*
* @return This object.
@@ -2446,7 +2446,7 @@ public class BeanContext extends Context implements ConversionFinder {
* When enabled, unknown enum values will be set to <jk>null</jk> instead of throwing an exception.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#ignoreUnknownEnumValues()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#ignoreUnknownEnumValues()}
* </ul>
*
* @return This object.
@@ -2682,7 +2682,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#locale()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#locale()}
* <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#locale(Locale)}
* </ul>
*
@@ -2725,7 +2725,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#mediaType()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#mediaType()}
* <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#mediaType(MediaType)}
* </ul>
*
@@ -2806,7 +2806,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.MarshalledIgnore}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#notBeanClasses()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#notBeanClasses()}
* </ul>
*
* @param values
@@ -3315,7 +3315,7 @@ public class BeanContext extends Context implements ConversionFinder {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#timeZone()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#timeZone()}
* <li class='jm'>{@link org.apache.juneau.BeanSession.Builder#timeZone(TimeZone)}
* </ul>
*
@@ -3475,7 +3475,7 @@ public class BeanContext extends Context implements ConversionFinder {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link org.apache.juneau.annotation.Marshalled#typePropertyName()}
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#typePropertyName()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#typePropertyName()}
* </ul>
*
* @param value
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 5719e4b785..b314c431ee 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
@@ -171,7 +171,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5>
* <ul>
- * <li class='ja'>{@link BeanConfig#beanClassVisibility()}
+ * <li class='ja'>{@link MarshalledConfig#beanClassVisibility()}
* </ul>
*
* @param value
@@ -220,7 +220,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beanConstructorVisibility()}
+ * <li class='ja'>{@link MarshalledConfig#beanConstructorVisibility()}
* </ul>
*
* @param value
@@ -371,8 +371,8 @@ public abstract class BeanContextable extends Context {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
* <li class='ja'>{@link MarshalledProp#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary_replace()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary_replace()}
* </ul>
*
* @param values
@@ -430,7 +430,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beanFieldVisibility()}
+ * <li class='ja'>{@link MarshalledConfig#beanFieldVisibility()}
* </ul>
*
* @param value
@@ -525,7 +525,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beanMapPutReturnsOldValue()}
+ * <li class='ja'>{@link MarshalledConfig#beanMapPutReturnsOldValue()}
* <li class='jm'>{@link BeanContext.Builder#beanMapPutReturnsOldValue()}
* </ul>
*
@@ -570,7 +570,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beanMethodVisibility()}
+ * <li class='ja'>{@link MarshalledConfig#beanMethodVisibility()}
* </ul>
*
* @param value
@@ -1321,7 +1321,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beansRequireDefaultConstructor()}
+ * <li class='ja'>{@link MarshalledConfig#beansRequireDefaultConstructor()}
* <li class='jm'>{@link BeanContext.Builder#beansRequireDefaultConstructor()}
* </ul>
*
@@ -1369,7 +1369,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beansRequireSerializable()}
+ * <li class='ja'>{@link MarshalledConfig#beansRequireSerializable()}
* <li class='jm'>{@link BeanContext.Builder#beansRequireSerializable()}
* </ul>
*
@@ -1415,7 +1415,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#beansRequireSettersForGetters()}
+ * <li class='ja'>{@link MarshalledConfig#beansRequireSettersForGetters()}
* <li class='jm'>{@link BeanContext.Builder#beansRequireSettersForGetters()}
* </ul>
*
@@ -1525,7 +1525,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#disableBeansRequireSomeProperties()}
+ * <li class='ja'>{@link MarshalledConfig#disableBeansRequireSomeProperties()}
* <li class='jm'>{@link BeanContext.Builder#disableBeansRequireSomeProperties()}
* </ul>
*
@@ -1567,7 +1567,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#disableIgnoreMissingSetters()}
+ * <li class='ja'>{@link MarshalledConfig#disableIgnoreMissingSetters()}
* <li class='jm'>{@link BeanContext.Builder#disableIgnoreMissingSetters()}
* </ul>
*
@@ -1606,7 +1606,7 @@ public abstract class BeanContextable extends Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#disableIgnoreTransientFields()}
+ * <li class='ja'>{@link MarshalledConfig#disableIgnoreTransientFields()}
* <li class='jm'>{@link BeanContext.Builder#disableIgnoreTransientFields()}
* </ul>
*
@@ -1642,7 +1642,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#disableIgnoreUnknownNullBeanProperties()}
+ * <li class='ja'>{@link MarshalledConfig#disableIgnoreUnknownNullBeanProperties()}
* <li class='jm'>{@link BeanContext.Builder#disableIgnoreUnknownNullBeanProperties()}
* </ul>
*
@@ -1662,7 +1662,7 @@ public abstract class BeanContextable extends Context {
* Otherwise, throws a {@link BeanRuntimeException}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#disableInterfaceProxies()}
+ * <li class='ja'>{@link MarshalledConfig#disableInterfaceProxies()}
* <li class='jm'>{@link BeanContext.Builder#disableInterfaceProxies()}
* </ul>
*
@@ -1814,7 +1814,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#findFluentSetters()}
- * <li class='ja'>{@link BeanConfig#findFluentSetters()}
+ * <li class='ja'>{@link MarshalledConfig#findFluentSetters()}
* <li class='jm'>{@link BeanContext.Builder#findFluentSetters()}
* </ul>
*
@@ -1904,7 +1904,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#ignoreInvocationExceptionsOnGetters()}
+ * <li class='ja'>{@link MarshalledConfig#ignoreInvocationExceptionsOnGetters()}
* <li class='jm'>{@link BeanContext.Builder#ignoreInvocationExceptionsOnGetters()}
* </ul>
*
@@ -1942,7 +1942,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#ignoreInvocationExceptionsOnSetters()}
+ * <li class='ja'>{@link MarshalledConfig#ignoreInvocationExceptionsOnSetters()}
* <li class='jm'>{@link BeanContext.Builder#ignoreInvocationExceptionsOnSetters()}
* </ul>
*
@@ -1978,7 +1978,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#ignoreUnknownBeanProperties()}
+ * <li class='ja'>{@link MarshalledConfig#ignoreUnknownBeanProperties()}
* <li class='jm'>{@link BeanContext.Builder#ignoreUnknownBeanProperties()}
* </ul>
*
@@ -1996,7 +1996,7 @@ public abstract class BeanContextable extends Context {
* When enabled, unknown enum values are set to <jk>null</jk> instead of throwing a parse exception.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#ignoreUnknownEnumValues()}
+ * <li class='ja'>{@link MarshalledConfig#ignoreUnknownEnumValues()}
* <li class='jm'>{@link BeanContext.Builder#ignoreUnknownEnumValues()}
* </ul>
*
@@ -2219,7 +2219,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#locale()}
+ * <li class='ja'>{@link MarshalledConfig#locale()}
* <li class='jm'>{@link BeanContext.Builder#locale(Locale)}
* <li class='jm'>{@link BeanSession.Builder#locale(Locale)}
* </ul>
@@ -2263,7 +2263,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#mediaType()}
+ * <li class='ja'>{@link MarshalledConfig#mediaType()}
* <li class='jm'>{@link BeanContext.Builder#mediaType(MediaType)}
* <li class='jm'>{@link BeanSession.Builder#mediaType(MediaType)}
* </ul>
@@ -2318,7 +2318,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledIgnore}
- * <li class='ja'>{@link BeanConfig#notBeanClasses()}
+ * <li class='ja'>{@link MarshalledConfig#notBeanClasses()}
* <li class='jf'>{@link BeanContext.Builder#notBeanClasses()}
* </ul>
*
@@ -2752,7 +2752,7 @@ public abstract class BeanContextable extends Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#timeZone()}
+ * <li class='ja'>{@link MarshalledConfig#timeZone()}
* <li class='jm'>{@link BeanContext.Builder#timeZone(TimeZone)}
* <li class='jm'>{@link BeanSession.Builder#timeZone(TimeZone)}
* </ul>
@@ -2909,7 +2909,7 @@ public abstract class BeanContextable extends Context {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#typePropertyName()}
- * <li class='ja'>{@link BeanConfig#typePropertyName()}
+ * <li class='ja'>{@link MarshalledConfig#typePropertyName()}
* <li class='jm'>{@link BeanContext.Builder#typePropertyName(String)}
* </ul>
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
index 77a2a82b2d..e44d8f4747 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/BeanSession.java
@@ -124,7 +124,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* If not specified, defaults to {@link BeanContext.Builder#locale(Locale)}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#locale()}
+ * <li class='ja'>{@link MarshalledConfig#locale()}
* <li class='jm'>{@link BeanContext.Builder#locale(Locale)}
* </ul>
*
@@ -148,7 +148,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* If not specified, defaults to {@link BeanContext.Builder#mediaType(MediaType)}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#mediaType()}
+ * <li class='ja'>{@link MarshalledConfig#mediaType()}
* <li class='jm'>{@link BeanContext.Builder#mediaType(MediaType)}
* </ul>
*
@@ -211,7 +211,7 @@ public class BeanSession extends ContextSession implements ConverterSession {
* If not specified, defaults to {@link BeanContext.Builder#timeZone(TimeZone)}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#timeZone()}
+ * <li class='ja'>{@link MarshalledConfig#timeZone()}
* <li class='jm'>{@link BeanContext.Builder#timeZone(TimeZone)}
* </ul>
*
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 1b4046a920..b525b165a4 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
@@ -177,10 +177,10 @@ public abstract class Context {
* <ja>@Marshalled</ja>(properties=<js>"street,city,state"</js>)
* <jk>public class</jk> A {...}
*
- * <jc>// Class with annotation applied via @BeanConfig</jc>
+ * <jc>// Class with annotation applied via @MarshalledConfig</jc>
* <jk>public class</jk> B {...}
*
- * <jc>// Java REST method with @BeanConfig annotation.</jc>
+ * <jc>// Java REST method with @MarshalledConfig annotation.</jc>
* <ja>@RestGet</ja>(...)
* <ja>@Marshalled</ja>(on=<js>"B"</js>, properties=<js>"street,city,state"</js>)
* <jk>public void</jk> doFoo() {...}
@@ -323,7 +323,7 @@ public abstract class Context {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig}
+ * <li class='ja'>{@link MarshalledConfig}
* </ul>
*
* @param values
@@ -360,7 +360,7 @@ public abstract class Context {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// A class annotated with a config annotation.</jc>
- * <ja>@BeanConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
+ * <ja>@MarshalledConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
* <jk>public class</jk> MyClass {...}
*
* <jc>// Find all annotations that themselves are annotated with @ContextPropertiesApply.</jc>
@@ -405,7 +405,7 @@ public abstract class Context {
* Any annotations found that themselves are annotated with {@link ContextApply} will be resolved and
* applied as properties to this builder. These annotations include:
* <ul class='javatreec'>
- * <li class='ja'>{@link BeanConfig}
+ * <li class='ja'>{@link MarshalledConfig}
* <li class='ja'>{@link BsonConfig}
* <li class='ja'>{@link CborConfig}
* <li class='ja'>{@link CsvConfig}
@@ -460,7 +460,7 @@ public abstract class Context {
* <h5 class='section'>Example:</h5>
* <p class='bjava'>
* <jc>// A class annotated with a config annotation.</jc>
- * <ja>@BeanConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
+ * <ja>@MarshalledConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
* <jk>public class</jk> MyClass {...}
*
* <jc>// Apply any settings found on the annotations.</jc>
@@ -471,7 +471,7 @@ public abstract class Context {
*
* <jc>// A method annotated with a config annotation.</jc>
* <jk>public class</jk> MyClass {
- * <ja>@BeanConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
+ * <ja>@MarshalledConfig</ja>(unsortedProperties=<js>"$S{unsortedProperties,false}"</js>)
* <jk>public void</jk> myMethod() {...}
* }
*
@@ -657,7 +657,7 @@ public abstract class Context {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#debug()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#debug()}
* <li class='jm'>{@link org.apache.juneau.ContextSession.Builder#debug(Boolean)}
* </ul>
*
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.java
index 151cf03d6f..853590397f 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/ContextSession.java
@@ -127,7 +127,7 @@ public abstract class ContextSession {
* If not specified, defaults to {@link Context.Builder#debug()}.
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link org.apache.juneau.annotation.BeanConfig#debug()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#debug()}
* <li class='jm'>{@link org.apache.juneau.Context.Builder#debug()}
*
* @param value
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 ecb45f35b4..cb363df6f6 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
@@ -79,8 +79,8 @@ public @interface Marshalled {
*
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link MarshalledProp#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary_replace()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* </ul>
*
@@ -206,7 +206,7 @@ public @interface Marshalled {
* </ul>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#findFluentSetters()}
+ * <li class='ja'>{@link MarshalledConfig#findFluentSetters()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#findFluentSetters()}
* </ul>
*
@@ -445,7 +445,7 @@ public @interface Marshalled {
* </p>
*
* <h5 class='section'>See Also:</h5><ul>
- * <li class='ja'>{@link BeanConfig#typePropertyName()}
+ * <li class='ja'>{@link MarshalledConfig#typePropertyName()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#typePropertyName(String)}
* </ul>
*
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/MarshalledConfig.java
similarity index 98%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfig.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfig.java
index 6a012fa21e..361905f3a5 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/MarshalledConfig.java
@@ -33,17 +33,17 @@ import org.apache.juneau.swap.*;
* Annotation for specifying config properties defined in {@link BeanContext} and {@link BeanTraverseContext}.
*
* <p>
- * Used primarily for specifying bean configuration properties on REST classes and methods.
+ * Used primarily for specifying marshalling configuration properties on REST classes and methods.
*
*/
@Target({ TYPE, METHOD })
@Retention(RUNTIME)
@Inherited
-@ContextApply(BeanConfigAnnotation.Applier.class)
+@ContextApply(MarshalledConfigAnnotation.Applier.class)
@SuppressWarnings({
"java:S100" // Annotation methods use underscore suffix to avoid Java keyword conflicts
})
-public @interface BeanConfig {
+public @interface MarshalledConfig {
/**
* Minimum bean class visibility.
@@ -332,7 +332,7 @@ public @interface BeanConfig {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
* <li class='ja'>{@link MarshalledProp#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary_replace()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/BeanDictionaryBasics">Bean Dictionary Basics</a>
* </ul>
@@ -350,7 +350,7 @@ public @interface BeanConfig {
* <h5 class='section'>See Also:</h5><ul>
* <li class='ja'>{@link Bean#dictionary()}
* <li class='ja'>{@link MarshalledProp#dictionary()}
- * <li class='ja'>{@link BeanConfig#dictionary()}
+ * <li class='ja'>{@link MarshalledConfig#dictionary()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* </ul>
*
@@ -635,7 +635,7 @@ public @interface BeanConfig {
* }
*
* <jc>// Apply it to a config</jc>
- * <ja>@BeanConfig</ja>(
+ * <ja>@MarshalledConfig</ja>(
* interfaces={
* A.<jk>class</jk>
* }
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/MarshalledConfigAnnotation.java
similarity index 88%
rename from juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/BeanConfigAnnotation.java
rename to juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledConfigAnnotation.java
index 0223cdb48e..ddb48f8fc2 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/MarshalledConfigAnnotation.java
@@ -26,20 +26,20 @@ import org.apache.juneau.commons.reflect.*;
import org.apache.juneau.svl.*;
/**
- * Utility classes and methods for the {@link BeanConfig @BeanConfig} annotation.
+ * Utility classes and methods for the {@link MarshalledConfig @MarshalledConfig} annotation.
*
*/
-public class BeanConfigAnnotation {
+public class MarshalledConfigAnnotation {
/**
* Prevents instantiation.
*/
- private BeanConfigAnnotation() {}
+ private MarshalledConfigAnnotation() {}
/**
- * Applies {@link BeanConfig} annotations to a {@link org.apache.juneau.BeanContext.Builder}.
+ * Applies {@link MarshalledConfig} annotations to a {@link org.apache.juneau.BeanContext.Builder}.
*/
- public static class Applier extends AnnotationApplier<BeanConfig,BeanContext.Builder> {
+ public static class Applier extends AnnotationApplier<MarshalledConfig,BeanContext.Builder> {
/**
* Constructor.
@@ -47,12 +47,12 @@ public class BeanConfigAnnotation {
* @param vr The resolver for resolving values in annotations.
*/
public Applier(VarResolverSession vr) {
- super(BeanConfig.class, BeanContext.Builder.class, vr);
+ super(MarshalledConfig.class, BeanContext.Builder.class, vr);
}
@Override
- public void apply(AnnotationInfo<BeanConfig> ai, BeanContext.Builder b) {
- BeanConfig a = ai.inner();
+ public void apply(AnnotationInfo<MarshalledConfig> ai, BeanContext.Builder b) {
+ MarshalledConfig a = ai.inner();
// @formatter:off
string(a.beanClassVisibility()).map(Visibility::valueOf).ifPresent(b::beanClassVisibility);
diff --git a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
index ddf8812c9b..36be654be5 100644
--- a/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
+++ b/juneau-core/juneau-marshall/src/main/java/org/apache/juneau/annotation/MarshalledProp.java
@@ -64,8 +64,8 @@ public @interface MarshalledProp {
*
* <h5 class='section'>See Also:</h5><ul>
* <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='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary()}
+ * <li class='ja'>{@link org.apache.juneau.annotation.MarshalledConfig#dictionary_replace()}
* <li class='jm'>{@link org.apache.juneau.BeanContext.Builder#beanDictionary(Class...)}
* </ul>
*
diff --git a/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/config/BasicUniversalJenaConfig.java b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/config/BasicUniversalJenaConfig.java
index 6e43686d02..c805cf27de 100644
--- a/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/config/BasicUniversalJenaConfig.java
+++ b/juneau-rest/juneau-rest-server-rdf/src/main/java/org/apache/juneau/rest/config/BasicUniversalJenaConfig.java
@@ -95,9 +95,9 @@ import org.apache.juneau.xml.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
index c4ca797dcf..83a7f505a9 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestGet.java
@@ -89,7 +89,7 @@ public @interface RestGet {
*
* <jc>// Call this method if Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestGet</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
index 8dd0e12a83..56d063d3b4 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOp.java
@@ -88,7 +88,7 @@ public @interface RestOp {
*
* <jc>// Call this method if X-Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestOp</ja>(method=<jsf>GET</jsf>, path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
index 30106a9364..1f16cbd242 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestOptions.java
@@ -89,7 +89,7 @@ public @interface RestOptions {
*
* <jc>// Call this method if Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestOptions</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
index fd98286e71..28fa37a4de 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPatch.java
@@ -90,7 +90,7 @@ public @interface RestPatch {
*
* <jc>// Call this method if X-Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestPatch</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
index 9810dcdba7..99dd2a3020 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPost.java
@@ -90,7 +90,7 @@ public @interface RestPost {
*
* <jc>// Call this method if X-Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestPost</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
index a9c0aeaa59..4bd2f98e42 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/annotation/RestPut.java
@@ -90,7 +90,7 @@ public @interface RestPut {
*
* <jc>// Call this method if X-Client-Version is at least 1.1, but less than 2.0.</jc>
* <ja>@RestPut</ja>(path=<js>"/foobar"</js>, clientVersion=<js>"[1.1,2.0)"</js>)
- * <ja>@BeanConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
+ * <ja>@MarshalledConfig</ja>(swaps=NewToOldSwap.<jk>class</jk>)
* <jk>public</jk> NewPojo oldMethod() {
* <jk>return</jk> newMethod();
* }
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJson5Config.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJson5Config.java
index 7a4655f9d0..bb65f0d187 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJson5Config.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJson5Config.java
@@ -44,9 +44,9 @@ import org.apache.juneau.serializer.annotation.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonConfig.java
index ad1ed8776d..ad81e239f1 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonConfig.java
@@ -47,9 +47,9 @@ import org.apache.juneau.serializer.annotation.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonHtmlConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonHtmlConfig.java
index 42c262ad4a..77f82da7b9 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonHtmlConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicJsonHtmlConfig.java
@@ -51,9 +51,9 @@ import org.apache.juneau.serializer.annotation.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicOpenApiConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicOpenApiConfig.java
index 4492f32bcb..3f34903849 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicOpenApiConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicOpenApiConfig.java
@@ -44,9 +44,9 @@ import org.apache.juneau.serializer.annotation.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicUniversalConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicUniversalConfig.java
index 8b97435d97..b6cc372451 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicUniversalConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/BasicUniversalConfig.java
@@ -88,9 +88,9 @@ import org.apache.juneau.xml.*;
* <li class='jma'>{@link Rest#config() config}: <js>"$S{juneau.configFile,SYSTEM_DEFAULT}"</js>
* </ul>
* </li>
- * <li class='ja'>{@link BeanConfig}:
+ * <li class='ja'>{@link MarshalledConfig}:
* <ul>
- * <li class='jma'>{@link BeanConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
+ * <li class='jma'>{@link MarshalledConfig#ignoreUnknownBeanProperties() ignoreUnknownBeanProperties}: <js>"true"</js>
* </ul>
* </li>
* <li class='ja'>{@link SerializerConfig}:
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/DefaultConfig.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/DefaultConfig.java
index 152c0b36f8..b5d4f64e7e 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/DefaultConfig.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/config/DefaultConfig.java
@@ -126,7 +126,7 @@ import org.apache.juneau.serializer.annotation.*;
staticFiles=StaticFiles.Void.class, // Defaults to BasicStaticFiles.
swaggerProvider=SwaggerProvider.Void.class // Defaults to BasicSwaggerProvider.
)
-@BeanConfig(
+@MarshalledConfig(
// When parsing generated beans, ignore unknown properties that may only exist as getters and not setters.
ignoreUnknownBeanProperties="true",
ignoreUnknownEnumValues="true"
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/BasicRestOperations.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/BasicRestOperations.java
index 48b30bc197..1bbebdb685 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/BasicRestOperations.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/servlet/BasicRestOperations.java
@@ -175,7 +175,7 @@ public interface BasicRestOperations {
// Never show aside contents of page inherited from class.
aside="NONE"
)
- @BeanConfig(
+ @MarshalledConfig(
// POJO swaps to apply to all serializers/parsers on this method.
swaps={
// Use the SwaggerUI swap when rendering Swagger beans.
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java b/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
index fc341701a3..695e4b83fb 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/BasicBeans_Test.java
@@ -43,7 +43,7 @@ class BasicBeans_Test extends TestBase {
}
}
- @BeanConfig(disableIgnoreTransientFields="true")
+ @MarshalledConfig(disableIgnoreTransientFields="true")
public static class A {}
@Test void a01_testTransientFieldsIgnored() {
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 af084ee692..9a193a3d0e 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
@@ -103,7 +103,7 @@ class BeanMapErrors_Test extends TestBase {
public int f2 = -1;
}
- @Test void beanPropertyFieldNotInBeanConfig() {
+ @Test void beanPropertyFieldNotInMarshalledConfig() {
var bc = BeanContext.create().applyAnnotations(B2Config.class).build();
var bm = bc.newBeanMap(B2.class);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java b/juneau-utest/src/test/java/org/apache/juneau/MarshalledConfig_Test.java
similarity index 99%
rename from juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/MarshalledConfig_Test.java
index 575c61ae38..a8df77acaa 100755
--- a/juneau-utest/src/test/java/org/apache/juneau/BeanConfig_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/MarshalledConfig_Test.java
@@ -41,7 +41,7 @@ import org.junit.jupiter.api.*;
"java:S5961", // High assertion count acceptable in comprehensive tests
"cast" // Explicit cast needed for type testing
})
-class BeanConfig_Test extends TestBase {
+class MarshalledConfig_Test extends TestBase {
//====================================================================================================
// testBasic
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/MarshalledConfigAnnotation_Test.java
similarity index 98%
rename from juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledConfigAnnotation_Test.java
index a6e63ce689..965212ef3a 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/BeanConfigAnnotation_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/MarshalledConfigAnnotation_Test.java
@@ -34,12 +34,12 @@ import org.apache.juneau.swap.*;
import org.junit.jupiter.api.*;
/**
- * Tests the @BeanConfig annotation.
+ * Tests the @MarshalledConfig annotation.
*/
@SuppressWarnings({
"java:S5961" // High assertion count acceptable in comprehensive test
})
-class BeanConfigAnnotation_Test extends TestBase {
+class MarshalledConfigAnnotation_Test extends TestBase {
private static void check(String expected, Object o) {
assertEquals(expected, TO_STRING.apply(o));
@@ -114,7 +114,7 @@ class BeanConfigAnnotation_Test extends TestBase {
public static class AB3 extends ObjectSwap<String,Integer> {
}
- @BeanConfig(
+ @MarshalledConfig(
beanClassVisibility="$X{PRIVATE}",
beanConstructorVisibility="$X{PRIVATE}",
dictionary={A1.class,A2.class},
@@ -191,7 +191,7 @@ class BeanConfigAnnotation_Test extends TestBase {
// Annotation with no values.
//-----------------------------------------------------------------------------------------------------------------
- @BeanConfig()
+ @MarshalledConfig()
static class B {}
static ClassInfo b = ClassInfo.of(B.class);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
index f55ffb0e45..9faddeb8d3 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/annotation/Marshalled_Test.java
@@ -207,7 +207,7 @@ class Marshalled_Test extends TestBase {
private static ClassInfo dConfig = ClassInfo.of(DConfig.class);
- @Test void d01_beanPropertiesExcludePropertiesCombined_noBeanConfig() throws Exception {
+ @Test void d01_beanPropertiesExcludePropertiesCombined_noMarshalledConfig() throws Exception {
var json = Json5.of(D1.create());
assertEquals("{a:1,c:3}", json);
var x = Json5.DEFAULT.read(json, D1.class);
@@ -215,7 +215,7 @@ class Marshalled_Test extends TestBase {
assertEquals("{a:1,c:3}", json);
}
- @Test void d02_beanPXpCombined_noBeanConfig() throws Exception {
+ @Test void d02_beanPXpCombined_noMarshalledConfig() throws Exception {
var json = Json5.of(D2.create());
assertEquals("{a:1,c:3}", json);
var x = Json5.DEFAULT.read(json, D2.class);
@@ -272,7 +272,7 @@ class Marshalled_Test extends TestBase {
}
//-----------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi/bpx) should override @Marshalled(bpi/bpx)
+ // @MarshalledConfig(bpi/bpx) should override @Marshalled(bpi/bpx)
//-----------------------------------------------------------------------------------------------------------------
@Marshalled(properties="a,b,c")
@@ -318,7 +318,7 @@ class Marshalled_Test extends TestBase {
private static ClassInfo eConfig = ClassInfo.of(EConfig.class);
- @Test void e01_beanPropertiesExcludePropertiesCombined_multipleMarshalledAnnotations_noBeanConfig() throws Exception {
+ @Test void e01_beanPropertiesExcludePropertiesCombined_multipleMarshalledAnnotations_noMarshalledConfig() 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 Marshalled_Test extends TestBase {
assertEquals("{a:1,c:3}", json);
}
- @Test void e02_beanPXpCombined_multipleMarshalledAnnotations_noBeanConfig() throws Exception {
+ @Test void e02_beanPXpCombined_multipleMarshalledAnnotations_noMarshalledConfig() throws Exception {
var json = Json5.of(E2.create());
assertEquals("{a:1,c:3}", json);
var e = Json5.DEFAULT.read(json, E2.class);
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/BeanConfig_Swaps_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/MarshalledConfig_Swaps_Test.java
similarity index 94%
rename from juneau-utest/src/test/java/org/apache/juneau/rest/annotation/BeanConfig_Swaps_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/rest/annotation/MarshalledConfig_Swaps_Test.java
index 925a5b3b9f..cef1fac6b5 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/BeanConfig_Swaps_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/MarshalledConfig_Swaps_Test.java
@@ -28,7 +28,7 @@ import org.apache.juneau.serializer.*;
import org.apache.juneau.swap.*;
import org.junit.jupiter.api.*;
-class BeanConfig_Swaps_Test extends TestBase {
+class MarshalledConfig_Swaps_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
// Basic tests
@@ -84,11 +84,11 @@ class BeanConfig_Swaps_Test extends TestBase {
}
@Rest(serializers=Json5Serializer.class, parsers=Json5Parser.class)
- @BeanConfig(swaps={SwapA1.class})
+ @MarshalledConfig(swaps={SwapA1.class})
public static class A2 {}
@Rest
- @BeanConfig(swaps={SwapA2.class})
+ @MarshalledConfig(swaps={SwapA2.class})
public static class A1 extends A2 {
@RestGet
@@ -104,17 +104,17 @@ class BeanConfig_Swaps_Test extends TestBase {
return a; // Should return "A2-1".
}
@RestGet
- @BeanConfig(swaps={SwapA3.class})
+ @MarshalledConfig(swaps={SwapA3.class})
public A d() {
return new A(); // Should return "A3-1".
}
@RestPut
- @BeanConfig(swaps={SwapA3.class})
+ @MarshalledConfig(swaps={SwapA3.class})
public A e(@Content A a) {
return a; // Should return "A3-1".
}
@RestPut(path="/f/{a}")
- @BeanConfig(swaps={SwapA3.class})
+ @MarshalledConfig(swaps={SwapA3.class})
public A f(@Path("a") A a) {
return a; // Should return "A3-1".
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_MarshalledConfig_Test.java
similarity index 96%
rename from juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java
rename to juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_MarshalledConfig_Test.java
index 24cf94d7c3..b9a368c20d 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_BeanConfig_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/annotation/RestOp_MarshalledConfig_Test.java
@@ -25,10 +25,10 @@ import org.junit.jupiter.api.*;
@SuppressWarnings({
"serial" // Serialization not relevant in test code
})
-class RestOp_BeanConfig_Test extends TestBase {
+class RestOp_MarshalledConfig_Test extends TestBase {
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi)
+ // @MarshalledConfig(bpi)
//------------------------------------------------------------------------------------------------------------------
public static class A1 extends BasicRestServlet {
@@ -69,7 +69,7 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpx)
+ // @MarshalledConfig(bpx)
//------------------------------------------------------------------------------------------------------------------
public static class A2 extends BasicRestServlet {
@@ -110,7 +110,7 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi) and @Marshalled(bpi)
+ // @MarshalledConfig(bpi) and @Marshalled(bpi)
//------------------------------------------------------------------------------------------------------------------
public static class A3 extends BasicRestServlet {
@@ -151,7 +151,7 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpx) and @Marshalled(bpi)
+ // @MarshalledConfig(bpx) and @Marshalled(bpi)
//------------------------------------------------------------------------------------------------------------------
public static class A4 extends BasicRestServlet {
@@ -192,7 +192,7 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi), meta-matching
+ // @MarshalledConfig(bpi), meta-matching
//------------------------------------------------------------------------------------------------------------------
public static class A5 extends BasicRestServlet {
@@ -213,12 +213,12 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi), fully-qualified class name
+ // @MarshalledConfig(bpi), fully-qualified class name
//------------------------------------------------------------------------------------------------------------------
public static class A6 extends BasicRestServlet {
@RestGet
- @MarshalledApply(on="org.apache.juneau.rest.annotation.RestOp_BeanConfig_Test$X1", value=@Marshalled(p="a"))
+ @MarshalledApply(on="org.apache.juneau.rest.annotation.RestOp_MarshalledConfig_Test$X1", value=@Marshalled(p="a"))
public Object a() {
return new X1().init();
}
@@ -234,7 +234,7 @@ class RestOp_BeanConfig_Test extends TestBase {
}
//------------------------------------------------------------------------------------------------------------------
- // @BeanConfig(bpi), negative matching
+ // @MarshalledConfig(bpi), negative matching
//------------------------------------------------------------------------------------------------------------------
public static class A7 extends BasicRestServlet {
diff --git a/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Context_Test.java b/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Context_Test.java
index 246d5ba733..e8a27a47ca 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Context_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/rest/client/RestClient_Config_Context_Test.java
@@ -100,11 +100,11 @@ class RestClient_Config_Context_Test extends TestBase {
@MarshalledApply(on="A6a",value=@Marshalled)
public static class A6b {}
- @BeanConfig
+ @MarshalledConfig
public static class A6c {}
public static class A6d {
- @BeanConfig
+ @MarshalledConfig
public void foo() { /* no-op */ }
}
diff --git a/juneau-utest/src/test/java/org/apache/juneau/transforms/DefaultSwaps_Test.java b/juneau-utest/src/test/java/org/apache/juneau/transforms/DefaultSwaps_Test.java
index b2cf7e4bfb..65fc4141b8 100644
--- a/juneau-utest/src/test/java/org/apache/juneau/transforms/DefaultSwaps_Test.java
+++ b/juneau-utest/src/test/java/org/apache/juneau/transforms/DefaultSwaps_Test.java
@@ -117,7 +117,7 @@ class DefaultSwaps_Test extends TestBase {
@SwapApply(on="Dummy1.f2", value=@Swap(AcSwap.class))
@SwapApply(on="AcBean.f2", value=@Swap(AcSwap.class))
@SwapApply(on="Dummy2.f2", value=@Swap(AcSwap.class))
- private static class AcBeanConfig {}
+ private static class AcMarshalledConfig {}
public static class AcBean {
public Enumeration<String> f1 = A.elements();
@@ -126,15 +126,15 @@ class DefaultSwaps_Test extends TestBase {
}
@Test void a01c_Enumeration_usingConfig() throws Exception {
- test2("['foo','bar']", A_C.elements(), AcBeanConfig.class);
+ test2("['foo','bar']", A_C.elements(), AcMarshalledConfig.class);
}
@Test void a02c_Enumeration_overrideSwap_usingConfig() throws Exception {
- test4("'FOO'", A_C.elements(), AcSwap.class, AcBeanConfig.class);
+ test4("'FOO'", A_C.elements(), AcSwap.class, AcMarshalledConfig.class);
}
@Test void a03c_Enumeration_overrideAnnotation_usingConfig() throws Exception {
- test2("{f1:['foo','bar'],f2:'FOO'}", new AcBean(), AcBeanConfig.class);
+ test2("{f1:['foo','bar'],f2:'FOO'}", new AcBean(), AcMarshalledConfig.class);
}
//------------------------------------------------------------------------------------------------------------------
@@ -179,7 +179,7 @@ class DefaultSwaps_Test extends TestBase {
@SwapApply(on="Dummy1.f2", value=@Swap(BcSwap.class))
@SwapApply(on="BcBean.f2", value=@Swap(BcSwap.class))
@SwapApply(on="Dummy2.f2", value=@Swap(BcSwap.class))
- private static class BcBeanConfig {}
+ private static class BcMarshalledConfig {}
public static class BcBean {
public Iterator<?> f1 = B.iterator();
@@ -187,15 +187,15 @@ class DefaultSwaps_Test extends TestBase {
}
@Test void b01c_Iterator_usingConfig() throws Exception {
- test2("['foo','bar']", B_C.iterator(), BcBeanConfig.class);
+ test2("['foo','bar']", B_C.iterator(), BcMarshalledConfig.class);
}
@Test void b02c_Iterator_overrideSwap_usingConfig() throws Exception {
- test4("'FOO'", B_C.iterator(), BcSwap.class, BcBeanConfig.class);
+ test4("'FOO'", B_C.iterator(), BcSwap.class, BcMarshalledConfig.class);
}
@Test void b03c_Iterator_overrideAnnotation_usingConfig() throws Exception {
- test2("{f1:['foo','bar'],f2:'FOO'}", new BcBean(), BcBeanConfig.class);
+ test2("{f1:['foo','bar'],f2:'FOO'}", new BcBean(), BcMarshalledConfig.class);
}
//------------------------------------------------------------------------------------------------------------------