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:
05: package com.tc.aspectwerkz.definition.deployer;
06:
07: import com.tc.aspectwerkz.DeploymentModel;
08: import com.tc.aspectwerkz.definition.DefinitionParserHelper;
09: import com.tc.aspectwerkz.definition.SystemDefinition;
10: import com.tc.aspectwerkz.reflect.impl.asm.AsmClassInfo;
11: import com.tc.aspectwerkz.reflect.ClassInfo;
12:
13: /**
14: * TODO document class
15: *
16: * @author Jonas Bonér
17: */
18: public class MixinDefinitionBuilder implements DefinitionBuilder {
19: private final ClassInfo m_classInfo;
20: private final DeploymentModel m_deploymentModel;
21: private final String m_pointcut;
22: private final SystemDefinition m_systemDef;
23: private boolean m_transient;
24:
25: public MixinDefinitionBuilder(final String mixinClass,
26: final DeploymentModel deploymentModel,
27: final String pointcut, final boolean isTransient,
28: final SystemDefinition systemDef, final ClassLoader loader) {
29: m_classInfo = AsmClassInfo.getClassInfo(mixinClass, loader);
30: m_deploymentModel = deploymentModel;
31: m_pointcut = pointcut;
32: m_transient = isTransient;
33: m_systemDef = systemDef;
34: }
35:
36: public void build() {
37: DefinitionParserHelper.createAndAddMixinDefToSystemDef(
38: m_classInfo, m_pointcut, m_deploymentModel,
39: m_transient, m_systemDef);
40: }
41: }
|