aspect TypeCheckCJP { public void ClosureJoinpointAccess.typeCheck() { super.typeCheck(); TypeDecl decl = getName().type(); if(decl.isJoinpointTypeDecl()) { JoinpointTypeDecl d = (JoinpointTypeDecl)decl; int i=0; for(ParameterDeclaration p: getParameters()) { if(p.type()!=d.getParameter(i).type()) { error(p.getID()+" must be of type "+d.getParameter(i).type().name()+" but is of type "+p.type().name()+" instead."); } i++; } } } syn lazy boolean AdviceSpec.isAround() = false; eq AroundSpec.isAround() = true; syn lazy boolean AdviceSpec.isAfterReturning() = false; eq AfterReturningSpec.isAfterReturning() = true; syn lazy boolean AdviceSpec.isAfterThrowing() = false; eq AfterThrowingSpec.isAfterThrowing() = true; syn lazy boolean TypeDecl.isCJPTypeDecl() = false; eq JoinpointTypeDecl.isCJPTypeDecl() = true; public void CJPAdviceDecl.doTypeChecking(JoinpointTypeDecl jpiDecl){ /*** * 1) check that the type of SuperAccess is JPITypeDecl. * 2) check the arguments types. * 3) check the return types. * 4) check the exceptions. */ AdviceSpec currentAdviceSpec = getAdviceSpec(); int paramNum = 0; for(int i=0; i