highsource / highsource/jaxb-tools

Feature: Add class model-episode.java

Open
#662 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
465
Forks
105
PR merge metrics
No merged PRs in 30d

Description

For each package, add a model-episode.java class (akin to ObjectFactory.java and package-info.java) that contains the same information as the sun-jaxb.episode file.

Design goals:
1. Class should be generated along side the generated classes
2. Class should _lazy_ instantiate information for query
3. Terminology _not_ be specifically tied to jaxb -- for example, could be used for JSON as well.
4. No caching of references/handles to classes to allow for Java VM runtime class loading/unloading without leaking

Use case:
Auto-discovery of model classes, enums, etc. for wiring Classloaders to be used by JAXB, JSON and other model ser/deser frameworks.

Draft interface:

String getPackageName()
String getNamespace() // returns xmlns urn:foo.com:v2, https://foo.com/v2, etc
Map listClasses() // retun unmodifiable map of fully qualified class name -> Class
Map listEnumClasses() // retun unmodifiable map of fully qualified typesafe enum class name -> Class

Note: This may need to go upstream to jaxb-ri, but could be implemented here as a proof-of-concept.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.