KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > aspectwerkz > definition > aspectj5 > Definition


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.aspectwerkz.definition.aspectj5;
5
6 import java.util.ArrayList JavaDoc;
7 import java.util.List JavaDoc;
8
9 /**
10  * A POJO that contains raw strings from the XML (sort of XMLBean for our simple LTW DTD)
11  *
12  * @author <a HREF="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
13  */

14 public class Definition {
15
16   private StringBuffer JavaDoc m_weaverOptions;
17
18   private List JavaDoc m_dumpPatterns;
19
20   private List JavaDoc m_includePatterns;
21
22   private List JavaDoc m_excludePatterns;
23
24   private List JavaDoc m_aspectClassNames;
25
26   private List JavaDoc m_aspectExcludePatterns;
27
28   private List JavaDoc m_concreteAspects;
29
30   public Definition() {
31     m_weaverOptions = new StringBuffer JavaDoc();
32     m_dumpPatterns = new ArrayList JavaDoc(0);
33     m_includePatterns = new ArrayList JavaDoc(0);
34     m_excludePatterns = new ArrayList JavaDoc(0);
35     m_aspectClassNames = new ArrayList JavaDoc();
36     m_aspectExcludePatterns = new ArrayList JavaDoc(0);
37     m_concreteAspects = new ArrayList JavaDoc(0);
38   }
39
40   public String JavaDoc getWeaverOptions() {
41     return m_weaverOptions.toString();
42   }
43
44   public List JavaDoc getDumpPatterns() {
45     return m_dumpPatterns;
46   }
47
48   public List JavaDoc getIncludePatterns() {
49     return m_includePatterns;
50   }
51
52   public List JavaDoc getExcludePatterns() {
53     return m_excludePatterns;
54   }
55
56   public List JavaDoc getAspectClassNames() {
57     return m_aspectClassNames;
58   }
59
60   public List JavaDoc getAspectExcludePatterns() {
61     return m_aspectExcludePatterns;
62   }
63
64   public List JavaDoc getConcreteAspects() {
65     return m_concreteAspects;
66   }
67
68   public static class ConcreteAspect {
69     String JavaDoc name;
70     String JavaDoc extend;
71     List JavaDoc pointcuts;
72
73     public ConcreteAspect(String JavaDoc name, String JavaDoc extend) {
74       this.name = name;
75       this.extend = extend;
76       this.pointcuts = new ArrayList JavaDoc();
77     }
78   }
79
80   public static class Pointcut {
81     String JavaDoc name;
82     String JavaDoc expression;
83
84     public Pointcut(String JavaDoc name, String JavaDoc expression) {
85       this.name = name;
86       this.expression = expression;
87     }
88   }
89
90   public void appendWeaverOptions(String JavaDoc option) {
91     m_weaverOptions.append(option.trim()).append(' ');
92   }
93 }
94
Popular Tags