package lawOfDemeter; /** * The AnyDynamic class is part of a Law of Demeter Checker - a set of * classes and aspects that verify a given program does not violate * the Law of Demeter. This class defines pointcuts to be modified by the * user to customize the execution of the program. * * @author unascribed */ abstract class AnyDynamic{ // NOTE: With the following pointcuts, to nullify the pointcut, i.e. // have it pick out no join points, use: // Any.Nothing() // as the sole designation // Modify the following pointcut to specify what join points in the program // to check with the LoDChecker application. // denotes all the join points to check in the code being examined pointcut ToCheck(): !ToAvoid() && (Any.MethodCall() || Any.Get()); // Modify the following pointcut to exclude join points in the program from // being checked by the LoDChecker application. // denotes classes to avoid checking. Seperate joinpoints with || pointcut ToAvoid(): Stable() || Any.StaticAccesses(); // denotes all globally preferred static members // Multiple pointcuts added should be separated with || // Note: scope is not required here as it is included in the Any definition pointcut GlobalPreferred(): Any.StaticAccesses(); // denotes stable classes calls to which should not be checked; // multiple pointcuts should be separated with || pointcut Stable(): Any.JavaPackageAccesses(); }