Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Nested Field and Property Aspects

I have some java beans I would like to secure using AspectJ. Like all beans the class has fields with matching setters and getters, e.g.

 

public class Bean

{

                private String value;

 

                public void setValue(String value)

                {

                                this.value = value;

                }

 

                public String getValue(String value)

                {

                                return value;

                }

}

 

I need to secure all read and write operations, e.g. for read I need to secure getValue() using an aspect, but I also need to secure the 'value' field directly. Is there away to avoid doing two checks on the get method aspect, i.e. one for the method call and one for the (nested) field mutation?

 

Thanks for any help,

 

Tim,


Back to the top