1. /*
  2. * Copyright 2002-2004 the original author or authors.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.springframework.aop;
  17. /**
  18. * Superinterface for advisors that perform one or more AOP <b>introductions</b>.
  19. *
  20. * <p>This interface cannot be implemented directly; subinterfaces must
  21. * provide the advice type implementing the introduction.
  22. *
  23. * <p>Introduction is the implementation of additional interfaces
  24. * (not implemented by a target) via AOP advice.
  25. *
  26. * @author Rod Johnson
  27. * @since 04-Apr-2003
  28. * @version $Id: IntroductionAdvisor.java,v 1.4 2004/04/01 15:35:45 jhoeller Exp $
  29. * @see org.springframework.aop.IntroductionInterceptor
  30. */
  31. public interface IntroductionAdvisor extends Advisor {
  32. /**
  33. * Return the filter determining which target classes this introduction
  34. * should apply to. The class part of a pointcut. Note that method
  35. * matching doesn't make sense to introductions.
  36. */
  37. ClassFilter getClassFilter();
  38. /**
  39. * Return the additional interfaces introduced by this Advisor.
  40. */
  41. Class[] getInterfaces();
  42. /**
  43. * Can the advised interfaces be implemented by the
  44. * introduction advice? Invoked before adding an IntroductionAdvisor.
  45. * @throws IllegalArgumentException if the advised interfaces can't be
  46. * implemented by the introduction advice.
  47. */
  48. void validateInterfaces() throws IllegalArgumentException;
  49. }