01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.aspectwerkz.aspect.management;
05:
06: /**
07: * Interface applied to a target class when it has instance level aspects (perInstance, perThis, perTarget)
08: * <p/>
09: * Should <b>NEVER</b> be implemented by the user, but is applied to target classes by the weaver.
10: *
11: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
12: */
13: public interface HasInstanceLevelAspect {
14:
15: /**
16: * Returns the instance level aspect given a specific aspect factory class, since we know that one aspect class
17: * has one or more factory (due to qNames) and one factory acts for only one aspect qName.
18: *
19: * @param aspectFactoryClass
20: * @return the aspect instance or null if no such aspect
21: */
22: Object aw$getAspect(Class aspectFactoryClass);
23:
24: /**
25: * Cheks if the instance level aspect with the specific factory class was associated with the instance.
26: *
27: * @param aspectFactoryClass
28: * @return true in case the aspect was registers, false otherwise
29: */
30: boolean aw$hasAspect(Class aspectFactoryClass);
31:
32: Object aw$bindAspect(Class aspectFactoryClass, Object aspect);
33: }
|