Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add experimental aj-compiler options #18

Closed
Archinamon opened this issue Aug 29, 2016 · 2 comments
Closed

Add experimental aj-compiler options #18

Archinamon opened this issue Aug 29, 2016 · 2 comments
Milestone

Comments

@Archinamon
Copy link
Owner

-XhasMember allow hasmethod() and hasfield type patterns in declare parents and declare @type
-Xjoinpoints: supply a comma separated list of new joinpoints that can be identified by pointcuts. Values are: arrayconstruction, synchronization

@Archinamon Archinamon added this to the 2.0.3 milestone Aug 29, 2016
@Archinamon Archinamon modified the milestones: 2.2.0, 2.0.3 Oct 29, 2016
@Archinamon
Copy link
Owner Author

Added new qualifier to gradle config:

aspectj {
    experimental true
}

Simple test of new experimental options:

public aspect TestExperimentalFeatures {

    pointcut testJoinPoints(): call(String[].new(..));
    before(): testJoinPoints() {
        Log.e(aspectOf().getClass().getSimpleName(), thisJoinPoint.toString());
    }

    interface Abc {}
    declare parents: AppCompatActivity+ && hasmethod(* getRouter()) implements Abc;
}

The joinpoint of array's constructors couldn't be catched before. Now it correctly supplies.
Now available to define hasmethod(MethodPattern) and hasfield(FieldPattern) directives to target exact classes in declare parents and declare @type morphemes.

@Archinamon
Copy link
Owner Author

Implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant