Re: How to tie
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Mon, 31 Dec 2007 10:32:46 -0500
Christian wrote:
Abble schrieb:I'd like to tie a Java array to some code so when the array is
accessed my code gets run.
Is there some simple way to do this in Java?
Rather not ..
but when you use Collections instead of an array doing this becomes
rather easy.
Give us an example, Christian, or a description of how.
To the OP: You want to wrap access to your protected resource (array, whatever) in an object that either performs the desired action on access, or sends a notification to a listener to trigger such action.
JavaBeans have a mechanism available for notifications of property changes and such events. You can use this to fire an event on each access of interest.
--
Lew
.
- Follow-Ups:
- Re: How to tie
- From: Abble
- Re: How to tie
- References:
- How to tie
- From: Abble
- Re: How to tie
- From: Christian
- How to tie
- Prev by Date: Re: Reading files from website
- Next by Date: Re: SWT or Swing?
- Previous by thread: Re: How to tie
- Next by thread: Re: How to tie
- Index(es):
Relevant Pages
|