Callstack question

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top