Example usage for org.aspectj.weaver.patterns IScope getWorld

List of usage examples for org.aspectj.weaver.patterns IScope getWorld

Introduction

In this page you can find the example usage for org.aspectj.weaver.patterns IScope getWorld.

Prototype

World getWorld();

Source Link

Usage

From source file:org.caesarj.compiler.aspectj.CaesarKindedPointcut.java

License:Open Source License

public void resolveBindings(IScope scope, Bindings bindings) {
    if (kind == Shadow.Initialization) {
        //         scope.getMessageHandler().handleMessage(
        //            MessageUtil.error(
        //               "initialization unimplemented in 1.1beta1",
        //               this.getSourceLocation()));
    }//from w  ww .  ja  va2  s.  co  m
    signature = signature.resolveBindings(scope, bindings);

    if (kind == Shadow.ConstructorExecution) { // Bug fix 60936
        if (signature.getDeclaringType() != null) {
            World world = scope.getWorld();
            TypeX exactType = signature.getDeclaringType().getExactType();

            // Ignore this check for caesar classes
            if (scope instanceof CaesarPointcutScope) {
                CaesarPointcutScope s = (CaesarPointcutScope) scope;
                CClass cclass = s.lookupClass(exactType.getName());
                if (cclass != null && cclass.getAbstractType().isCaesarReference()) {
                    return;
                }
            }
            if (signature.getKind() == Member.CONSTRUCTOR && !exactType.equals(ResolvedTypeX.MISSING)
                    && exactType.isInterface(world) && !signature.getDeclaringType().isIncludeSubtypes()) {
                world.getLint().noInterfaceCtorJoinpoint.signal(exactType.toString(), getSourceLocation());
            }
        }
    }
}