This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 4760f25fc3 Marshall module improvements
4760f25fc3 is described below
commit 4760f25fc37e6d40af8a5921d48345b34960db66
Author: James Bognar <[email protected]>
AuthorDate: Sat Dec 6 20:51:43 2025 -0500
Marshall module improvements
---
.../src/main/java/org/apache/juneau/BeanMeta.java | 11 +++++++++++
.../src/main/java/org/apache/juneau/ClassMeta.java | 6 +++---
2 files changed, 14 insertions(+), 3 deletions(-)
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 0e2a51030e..0d7b1461b3 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
@@ -984,6 +984,17 @@ public class BeanMeta<T> {
*/
public final String getTypePropertyName() { return typePropertyName; }
+ /**
+ * Returns the bean registry for this bean.
+ *
+ * <p>
+ * The bean registry is used to resolve dictionary names to class
types. It's created when a bean class has a
+ * {@link Bean#dictionary() @Bean(dictionary)} annotation that
specifies a list of possible subclasses.
+ *
+ * @return The bean registry for this bean, or <jk>null</jk> if no bean
registry is associated with it.
+ */
+ public final BeanRegistry getBeanRegistry() { return beanRegistry; }
+
/**
* Returns metadata about the specified property.
*
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 6a8634a6c3..d3ed0acb70 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
@@ -558,9 +558,9 @@ public class ClassMeta<T> extends ClassInfoTyped<T> {
*
* @return The bean registry for this class, or <jk>null</jk> if no
bean registry is associated with it.
*/
- public BeanRegistry getBeanRegistry() { return beanRegistry; }
-
-
+ public BeanRegistry getBeanRegistry() {
+ return beanMeta == null ? null : beanMeta.getBeanRegistry();
+ }
/**
* Returns the builder swap associated with this class.