List of usage examples for org.aspectj.lang ProceedingJoinPoint toLongString
String toLongString();
From source file:org.springframework.jdbc.roma.impl.ignore.PropertyBasedIgnoreConditionAwareProcessor.java
License:Apache License
@Around("@annotation(org.springframework.jdbc.roma.api.config.provider.annotation.RowMapperPropertyBasedIgnoreConditionAware)" + " and args(propertyBasedIgnoreConditionAware)") public Object propertyBasedIgnoreConditionAwareInterceptor(ProceedingJoinPoint joinPoint, RowMapperPropertyBasedIgnoreConditionAware propertyBasedIgnoreConditionAware) throws Throwable { final String propertyName = propertyBasedIgnoreConditionAware.propertyName(); try {/*from w w w. ja v a2 s.com*/ if ((propertyBasedIgnoreConditionAware.options() & RowMapperPropertyBasedIgnoreConditionAware.ENABLE_ON_START) > 0) { ignoreManager.enableIgnoreConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } else if ((propertyBasedIgnoreConditionAware.options() & RowMapperPropertyBasedIgnoreConditionAware.DISABLE_ON_START) > 0) { ignoreManager.disableIgnoreConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } return joinPoint.proceed(); } finally { if ((propertyBasedIgnoreConditionAware.options() & RowMapperPropertyBasedIgnoreConditionAware.ENABLE_ON_FINISH) > 0) { ignoreManager.enableIgnoreConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } else if ((propertyBasedIgnoreConditionAware.options() & RowMapperPropertyBasedIgnoreConditionAware.DISABLE_ON_FINISH) > 0) { ignoreManager.disableIgnoreConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } } }
From source file:org.springframework.jdbc.roma.impl.lazy.PropertyBasedLazyConditionAwareProcessor.java
License:Apache License
@Around("@annotation(org.springframework.jdbc.roma.api.config.provider.annotation.RowMapperPropertyBasedLazyConditionAware)" + " and args(propertyBasedLazyConditionAware)") public Object propertyBasedLazyConditionAwareInterceptor(ProceedingJoinPoint joinPoint, RowMapperPropertyBasedLazyConditionAware propertyBasedLazyConditionAware) throws Throwable { final String propertyName = propertyBasedLazyConditionAware.propertyName(); try {// w ww . j a va 2 s. c o m if ((propertyBasedLazyConditionAware.options() & RowMapperPropertyBasedLazyConditionAware.ENABLE_ON_START) > 0) { lazyManager.enableLazyConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } else if ((propertyBasedLazyConditionAware.options() & RowMapperPropertyBasedLazyConditionAware.DISABLE_ON_START) > 0) { lazyManager.disableLazyConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } return joinPoint.proceed(); } finally { if ((propertyBasedLazyConditionAware.options() & RowMapperPropertyBasedLazyConditionAware.ENABLE_ON_FINISH) > 0) { lazyManager.enableLazyConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } else if ((propertyBasedLazyConditionAware.options() & RowMapperPropertyBasedLazyConditionAware.DISABLE_ON_FINISH) > 0) { lazyManager.disableLazyConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } } }
From source file:org.springframework.jdbc.roma.impl.lazy.PropertyBasedLazyLoadConditionAwareProcessor.java
License:Apache License
@Around("@annotation(org.springframework.jdbc.roma.api.config.provider.annotation.RowMapperPropertyBasedLazyLoadConditionAware)" + " and args(propertyBasedLazyLoadConditionAware)") public Object propertyBasedLazyConditionAwareInterceptor(ProceedingJoinPoint joinPoint, RowMapperPropertyBasedLazyLoadConditionAware propertyBasedLazyLoadConditionAware) throws Throwable { final String propertyName = propertyBasedLazyLoadConditionAware.propertyName(); try {//from ww w .ja v a2 s . co m if ((propertyBasedLazyLoadConditionAware.options() & RowMapperPropertyBasedLazyLoadConditionAware.ENABLE_ON_START) > 0) { lazyManager.enableLazyLoadConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } else if ((propertyBasedLazyLoadConditionAware.options() & RowMapperPropertyBasedLazyLoadConditionAware.DISABLE_ON_START) > 0) { lazyManager.disableLazyLoadConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on start of " + joinPoint.toLongString()); } } return joinPoint.proceed(); } finally { if ((propertyBasedLazyLoadConditionAware.options() & RowMapperPropertyBasedLazyLoadConditionAware.ENABLE_ON_FINISH) > 0) { lazyManager.enableLazyLoadConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Enabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } else if ((propertyBasedLazyLoadConditionAware.options() & RowMapperPropertyBasedLazyLoadConditionAware.DISABLE_ON_FINISH) > 0) { lazyManager.disableLazyLoadConditionProperty(propertyName); if (logger.isDebugEnabled()) { logger.debug("Disabled property " + propertyName + " on finish of " + joinPoint.toLongString()); } } } }
From source file:org.timer4method.aspects.Timer4MethodAspect.java
License:Apache License
/** * Execute it around the method annotated with Time4Method annotation, getting the start and end time, and show the result * @param pjp Proceeding join pont * @param timer4Method Annotation/*from ww w . j a v a 2 s .co m*/ * @return The result of the method * @throws Throwable */ @Around(value = "@annotation(timer4Method)", argNames = "timer4Method") public Object profile(final ProceedingJoinPoint pjp, final Timer4Method timer4Method) throws Throwable { initTime4MethodAttrs(timer4Method); final long start = System.currentTimeMillis(); final Object output = pjp.proceed(); final long elapsedTime = System.currentTimeMillis() - start; writeLog(elapsedTime, pjp.toLongString()); return output; }
From source file:zxmax.tools.timerreview.aspects.LogExceptionAspect.java
License:Open Source License
@Around("methodsToBeProfiled()") public Object profile(ProceedingJoinPoint joinPoint) throws Throwable { try {/*from w w w . j ava 2s.com*/ logger.debug(joinPoint.toLongString()); return joinPoint.proceed(); } catch (Exception e) { logger.error(LogExceptionAspect.CATCH_BLOCK, e); return null; } }