Hi Ray,
Thanks a lot for the information.
  Actually restructuring the code so that modifications do not overlap is
the best option. However, doing so would incur loss of modularity in my
particular case. Actually in the project, we are instrumenting calls to
methods which involves adding a call to some other method. Now all such
newly added methods start with specific string pattern. Thus I can
safely ignore these INVOKE* instructions in subsequent instrumentation
steps by looking at the name of the method being called by the INVOKE*
instruction. So I was just wondering whether similar option can also be
used to identify instrumented class members like arrays without having a
corresponding local variable for the same.

Regards
Shrinivas Joshi.

On Sat, 11 Jun 2005, Ray Blaak wrote:

> Shrinivas Joshi wrote:
>
> >Hi,
> >  Is there any way by which some sort of special attribute can be
> >assigned to instructions. like for e.g. is it possible to assign a name to
> >array created using InstructionFactory.createNewArray().
> >
> If at generation time, then you simply store it in a local var in your
> generation code and hang on to it.
>
> If you are loading and need to distinguish it then, you could prefix it
> with a specially named string constant, e.g.:
>
>   final String mySpecialArrayIsNext = "my special array is next";
>   ...
> But why do you need to do this? Code just runs. Do you need to mark the
> class file as being marked up in some way? You could simply insert a
> constant attribute to indicate that, perhaps storing the code location
> in it if you need to know where.
>
> I would try instead to restructure your problem so that you don't need
> to do this at all.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to