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. Advertisements

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:
    764
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Quick Question - Newby Question

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    940
    Iain Norman
    Feb 16, 2005
  3. =?Utf-8?B?YW5kcmV3MDA3?=

    question row filter (more of sql query question)

    =?Utf-8?B?YW5kcmV3MDA3?=, Oct 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,178
    Scott Allen
    Oct 6, 2005
  4. Morten Simonsen

    Retrieve callstack from a Thread

    Morten Simonsen, Sep 17, 2003, in forum: Java
    Replies:
    1
    Views:
    393
    Robert Olofsson
    Sep 17, 2003
  5. Philip Meyer
    Replies:
    0
    Views:
    611
    Philip Meyer
    Nov 30, 2003
  6. Replies:
    11
    Views:
    655
    Ian Collins
    Apr 26, 2006
  7. callstack level

    , Jul 5, 2006, in forum: Ruby
    Replies:
    3
    Views:
    195
    Robert Klemme
    Jul 6, 2006
  8. Replies:
    1
    Views:
    354
Loading...