Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] binary weaving and class dependency transitive closure

I am a new user, so please forgive any mis-phrasings.  I am trying to
use ajc to weave some aspects using -aspectpath and -inpath.  I have a
conceptual question.  From googling, I saw this posted.

http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg00999.html

>From which I snipped...

        It is possible to use "within(my.class)",
        "within(my.package..*)" or
        "!within(exclude.pakage)" to scope a binary weave. However this technique
        does not work if a class has a hierarchy dependency e.g. superclass on a
        type that is not on the classpath You get a "can't find type ..." error. It
        is not uncommon for applications to contain classes that cannot be resolved
        due to external dependencies that were available during compile but not
        during execution e.g. secure socket factories on AXIS (these can be
        excluded as they have softer dependencies). AspectJ cannot binary weave
        some of these applications. The question is:
        1. Does the compiler need to resolve the class just to exclude it or is
        this a bug?
        
My question relates to this - I understand this to mean that all class
dependencies must be present and supplied to ajc via one switch or
another.  So, as the OP (snippet) states, this would seemingly present
some problems for class factory situations, if not all concrete classes
were deployed.  In effect, most (all?) concrete classes would need to be
deployed.  Question is - is this true?

Thanks in advance.

,Adam Welch



Back to the top