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:16 UTC
(juneau) 04/05: refactor(marshall): rename BeanContext/BeanSession engine types to MarshallingContext/MarshallingSession family
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
commit 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 ...