Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Why does ajc make GetDispatcher and SetDispatcher methods?

When you create a new field using an intertype field declaration, ajc
generates two methods in the aspect declaring the field with mangled
names containing the string interFieldGetDispatch and
interFieldSetDispatch. These are used to access the field from the
aspect (but the field is accessed directly from within the class into
which it is inserted).

We are trying to find answers to the following questions:

1) Why are these methods required?
   Note that these methods are distinct from, and generated in addition
   to, the methods used to access the fields added to interfaces. We
   understand why methods are needed to attach fields to interfaces.

2) Where in the ajc source is the code for these methods generated?
   We know that their signatures are generated in AjcMemberMaker.
   But where is their bytecode generated?

3) Do these methods ever do anything other than just reading/writing a
   field from their argument?

Any help would be appreciated.

Ondrej



Back to the top