J
Jacob
I'm doing text localization, and my locale
managing class is responsible for handing
out text strings based on tags.
The tags/strings are kept in resource
bundles within each package.
The API is like this:
String getText (Package package, String tag)
My question is this: Can I do this *without*
the package parameter? The parameter is used
to locate the bundle, but the package is
*always* the package of the object calling
getText(). So if I could investigate the call
stack inside getText() I should be able to
get this information implicitly.
Can I do this? Is throwing an exception a
possible/recommended approach?
Thanks!
managing class is responsible for handing
out text strings based on tags.
The tags/strings are kept in resource
bundles within each package.
The API is like this:
String getText (Package package, String tag)
My question is this: Can I do this *without*
the package parameter? The parameter is used
to locate the bundle, but the package is
*always* the package of the object calling
getText(). So if I could investigate the call
stack inside getText() I should be able to
get this information implicitly.
Can I do this? Is throwing an exception a
possible/recommended approach?
Thanks!