patterntesting.check.ct
Aspect AbstractSopAspect

java.lang.Object
  extended by patterntesting.check.ct.AbstractSopAspect
Direct Known Subclasses:
SopAspect

public abstract aspect AbstractSopAspect
extends java.lang.Object

 

Pointcut Detail

applicationCode()

Specify what is application code that should be subject to the pattern test. Ex: pointcut applicationCode(): within(patterntesting.*)


allowedCode()

Specify which code is allowed to manipulate System.out and System.err.


invalidSystemLogging()

Invalid system logging.

 

Declare Detail

declare warning: "No logging should.."

  

Pattern Test that ensures that System.out and System.err are not used in the code. This is to prevent the usage of System.out.println("") calls (and variations). Note: With AspectJ it is not possible to write a compile time check that only ensures that println() calls are not allowed. It is possible for runtime checks but we have preferred to make a compile-time test for simplicity. Thus, code that manipulate System.out and System.err for other purpose that using the println() methods will need to be added to the list of items to exclude from the tests, hence the abstract allowedCode pointcut.


Declare Summary
declare warning: "No logging should.."

 

Pointcut Summary
public applicationCode()
            Specify what is application code that should be subject to the pattern test.

public allowedCode()
            Specify which code is allowed to manipulate System.

(package private) invalidSystemLogging()
            Invalid system logging.

 

Constructor Summary
AbstractSopAspect()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSopAspect

public AbstractSopAspect()