package be.ac.vub.object_annotations.examples.completeness.aspect; import be.ac.vub.object_annotations.examples.completeness.annotations.ProtectMe; import be.ac.vub.object_annotations.examples.completeness.oAnnotations.Incomplete; import be.ac.vub.object_annotations.AnnotationManager; public aspect ProtectIncompleteAJ { pointcut all(Object p, Incomplete i) : execution(@ProtectMe * *..*(..)) && target(p) && @target(i) && if(AnnotationManager.isActive(p,i)); void around(Object p, Incomplete i) : all(p, i) { throw new IllegalStateException(p+ " is not complete"); } }