🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #14964

Re: Determining calling method

#14964
From: John R. Collins
Date: Wed, 21 Jul 1999 00:00
23 lines
1499 bytes
I think there is something like what you want in Throwable.  Take a look at
printStackTrace and the other method, I think it is fillStackTrace or
something like that.  They do build a stack of methods/classes from the call
stack.

It would be decent to use this technique as a sort of debugging tool but it
would be pretty horrible to use in some form of production code.  It is the
sort of thing that could be brittle from one generation to the next of the
technology.  Plus, I have seen code that looked at caller's and did
different things based on who called them written in other languages and
Brother, it was Grim.

John Collins

Lars Roe <roex0029@tc.umn.edu> wrote in message
news:37738E0B.CBB84BBF@tc.umn.edu...
> Hello,
>
> I noticed that ObjectOutputStream has a method
> writeDefaultObject() which knows the object that called it.
> How can it know without being passed a reference?
> Is this an exceptional case?
> Can I make a method which can do this?
Technical Details
Message-ID: <7n4dj5$k081@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <37738E0B.CBB84BBF@tc.umn.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,8dd1f56c98b39666
X-Google-Attributes: gidf74b3,public
From: "John R. Collins" <johnrobertcollins@erols.com>
Subject: Re: Determining calling method
Date: 1999/07/21
Message-ID: <7n4dj5$k081@forums.borland.com>
X-Deja-AN: 503504365
References: <37738E0B.CBB84BBF@tc.umn.edu>
Organization: Another Netscape Collabra Server User
X-Mimeole: Produced By Microsoft MimeOLE V5.00.2314.1300
Newsgroups: borland.public.jbuilder.java.language