Callstack question

Discussion in 'Java' started by Jacob, Sep 22, 2003.

  1. Jacob

    Jacob Guest

    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!
     
    Jacob, Sep 22, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sean
    Replies:
    1
    Views:
    605
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  2. Morten Simonsen

    Retrieve callstack from a Thread

    Morten Simonsen, Sep 17, 2003, in forum: Java
    Replies:
    1
    Views:
    319
    Robert Olofsson
    Sep 17, 2003
  3. Replies:
    11
    Views:
    538
    Ian Collins
    Apr 26, 2006
  4. callstack level

    , Jul 5, 2006, in forum: Ruby
    Replies:
    3
    Views:
    113
    Robert Klemme
    Jul 6, 2006
  5. Replies:
    1
    Views:
    194
Loading...

Share This Page