Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Help capturing new with primitive types

This is related to FAQ 10.15, but not completely because I don't really want to do any type conversion.

I have code that looks like the following:

...
// somehow define someSize
// 1*
byte[] buffer = new byte[someSize];
// 2*
// do something with buffer

This code is in a WHOLE bunch of different places.

I want to capture execution of the new call to allocate memory for an array of primitive type (in this case byte), and use this as a cutpoint so I can add before (1) and after (2) advice for some introspection.

Any ideas?  Sorry if this is covered somewhere in the FAQ; I couldn't find it.

Thanks,
Mike

--
Mike J. Bell on gmail

Back to the top