/** * Do not invoke this method. This method is a test input for reflection related tests. */ @SuppressLogging private void mockMethodThatSuppressLogging() { }
/** * Do not invoke this class. This class is a test input for reflection related tests. */ @SuppressLogging private class MockClassThatSuppressLogging extends MockProceedingJoinPoint { private void mockMethod() { return; } } }
/** * This is a mock proceeding join point that has the suppress logging annotation present. */ @SuppressLogging public class MockProceedingJoinPointClassSuppressLogging extends MockProceedingJoinPoint { }
/** * This is a mock proceeding join point that has the suppress logging annotation present. */ @SuppressLogging public class MockProceedingJoinPointClassSuppressLogging extends MockProceedingJoinPoint { }
/** * This method returns a handle to itself. This method also happens to be annotated with the suppress logging annotation. * * @return a handle to this method. */ @Override @SuppressLogging public Method getMethod() { try { // Return a handle to this method. return this.getClass().getMethod("getMethod"); } catch (Exception ex) { // We shouldn't get here since the method we're returning is this method. return null; } } }
/** * This method returns a handle to itself. This method also happens to be annotated with the suppress logging annotation. * * @return a handle to this method. */ @Override @SuppressLogging public Method getMethod() { try { // Return a handle to this method. return this.getClass().getMethod("getMethod"); } catch (Exception ex) { // We shouldn't get here since the method we're returning is this method. return null; } } }