package lawOfDemeter.classform; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.reflect.MethodSignature; import lawOfDemeter.Any; /** * @authors David H. Lorenz and Pengcheng Wu * @version 0.3, 10/09/02 */ aspect ReturnValue extends Perscope { pointcut Perscope(): Any.MethodCallSite(); protected Class[] getSuppliers(JoinPoint.StaticPart ejsp, JoinPoint.StaticPart jsp) { if (ejsp.getSignature().getDeclaringType() != jsp.getSignature().getDeclaringType()) return new Class[0]; Class[] supplier = new Class[1]; supplier[0]= ((MethodSignature)jsp.getSignature()).getReturnType(); return supplier; } }