public interface L10nPathCompilerI
When resolving localized bundles, callers supply context objects ("participants") such as domain
instances, UI models, or Class references. Implementations of this interface expand, reorder,
or map those participants into concrete search tokens to establish deterministic lookup precedence.
compileParticipantToPathElements(java.lang.Object)): Evaluated in array order.
Typically yields structural tokens (such as Class instances) representing concrete
classes, aspect layers, or entity hierarchies.L10n#addStringParticipant): Deferred to the end of
the primary lookup process. String tokens are processed after class-based tokens have been evaluated.compileParticipantToTrailingPathElements(java.lang.Object)): Evaluated last as
broad package-level fallbacks (e.g. module or framework base packages) once all primary elements
have been exhausted without a hit.LesezeichenPathCompiler): Evaluates a bookmark instance
(Lesezeichen) and returns the Class of its associated Business Object alongside
the bookmarkâs own class.BOT.BOClassesPathCompiler): Maps a single BO Class
to the full inheritance, aspect, and module chain of the underlying entity, ensuring project
overrides take precedence over generic module defaults.| Modifier and Type | Field and Description |
|---|---|
static L10nPathCompilerI[] |
EMPTY_ARRAY
Reusable empty array constant to avoid allocation overhead.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object[] |
compileParticipantToPathElements(java.lang.Object participant)
Compiles the participant into an ordered sequence of primary lookup elements.
|
default java.lang.String[] |
compileParticipantToTrailingPathElements(java.lang.Object participant)
Compiles fallback trailing path elements for the participant.
|
boolean |
isValidParticipant(java.lang.Object participant)
Checks whether this compiler supports the given participant.
|
static final L10nPathCompilerI[] EMPTY_ARRAY
boolean isValidParticipant(java.lang.Object participant)
participant - The context object to validate (e.g. an instance or Class).true if this compiler can process the participant, false otherwise.java.lang.Object[] compileParticipantToPathElements(java.lang.Object participant)
The order of elements in the returned array is significant and determines localization lookup precedence (first match wins).
Type contract and string handling: The returned elements should generally not contain
arbitrary String objects, as string processing occurs at the end of the primary lookup
cycle in L10n#addStringParticipant. Instead, compilers should return structural tokens
(typically Class objects). If an implementation does return String instances
(e.g. precomputed fully qualified class/bundle names), they bypass class-level tokenization and
are evaluated directly as path identifiers.
participant - The validated context object to compile.Class objects or precalculated
path strings). Must return an empty array if no elements apply; never null.default java.lang.String[] compileParticipantToTrailingPathElements(java.lang.Object participant)
Trailing elements are checked only after all primary class-level and string-level elements have
been evaluated without a hit. They define package-level fallback paths (e.g. "com.oashi.modules.erp.bo")
rather than class-specific bundles.
participant - The validated context object.Copyright © 2000-2026 OAshi S.à r.l. All Rights Reserved.