List of usage examples for org.springframework.aop.framework Advised indexOf
int indexOf(Advice advice);
From source file:org.openmrs.api.context.ServiceContext.java
/** * @param cls// w ww . jav a 2 s . c o m * @param advisor */ @SuppressWarnings("unchecked") public void addAdvisor(Class cls, Advisor advisor) { Advised advisedService = (Advised) services.get(cls); if (advisedService.indexOf(advisor) < 0) { advisedService.addAdvisor(advisor); } if (addedAdvisors.get(cls) == null) { addedAdvisors.put(cls, new HashSet<Advisor>()); } getAddedAdvisors(cls).add(advisor); }
From source file:org.openmrs.api.context.ServiceContext.java
/** * @param cls//from www .ja v a 2 s . c om * @param advice */ @SuppressWarnings("unchecked") public void addAdvice(Class cls, Advice advice) { Advised advisedService = (Advised) services.get(cls); if (advisedService.indexOf(advice) < 0) { advisedService.addAdvice(advice); } if (addedAdvice.get(cls) == null) { addedAdvice.put(cls, new HashSet<Advice>()); } getAddedAdvice(cls).add(advice); }