KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > aspectwerkz > expression > regexp > Pattern


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.expression.regexp;
5
6
7 import com.tc.aspectwerkz.expression.SubtypePatternType;
8
9 import java.io.Serializable JavaDoc;
10 import java.util.HashMap JavaDoc;
11 import java.util.Map JavaDoc;
12
13
14 /**
15  * Implements an abstract regular expression pattern matcher for AspectWerkz.
16  *
17  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
18  */

19 public abstract class Pattern implements Serializable JavaDoc {
20   /**
21    * Defines a single wildcard.
22    */

23   public static final String JavaDoc REGULAR_WILDCARD = "*";
24
25   /**
26    * Defines a multiple wildcard.
27    */

28   public static final String JavaDoc EAGER_WILDCARD = "..";
29
30   /**
31    * Abbreviations for all the classes in the java.lang.* and the java.util.* namespaces.
32    */

33   public static final Map JavaDoc ABBREVIATIONS = new HashMap JavaDoc();
34
35   static {
36     // TODO: update for Java 1.5?
37
// abbreviations used in XML def advice name
38
ABBREVIATIONS.put("JoinPoint", "com.tc.aspectwerkz.joinpoint.JoinPoint");
39     ABBREVIATIONS.put("StaticJoinPoint", "com.tc.aspectwerkz.joinpoint.StaticJoinPoint");
40     ABBREVIATIONS.put("Rtti", "com.tc.aspectwerkz.joinpoint.Rtti");
41     // java.lang.*
42
ABBREVIATIONS.put("CharSequence", "java.lang.CharSequence");
43     ABBREVIATIONS.put("Cloneable", "java.lang.Cloneable");
44     ABBREVIATIONS.put("Comparable", "java.lang.Comparable");
45     ABBREVIATIONS.put("Runnable", "java.lang.Runnable");
46     ABBREVIATIONS.put("Boolean", "java.lang.Boolean");
47     ABBREVIATIONS.put("Byte", "java.lang.Byte");
48     ABBREVIATIONS.put("Character", "java.lang.Character");
49     ABBREVIATIONS.put("Class", "java.lang.Class");
50     ABBREVIATIONS.put("ClassLoader", "java.lang.ClassLoader");
51     ABBREVIATIONS.put("Compiler", "java.lang.Compiler");
52     ABBREVIATIONS.put("Double", "java.lang.Double");
53     ABBREVIATIONS.put("Float", "java.lang.Float");
54     ABBREVIATIONS.put("InheritableThreadLocal", "java.lang.InheritableThreadLocal");
55     ABBREVIATIONS.put("Integer", "java.lang.Integer");
56     ABBREVIATIONS.put("Long", "java.lang.Long");
57     ABBREVIATIONS.put("Math", "java.lang.Math");
58     ABBREVIATIONS.put("Number", "java.lang.Number");
59     ABBREVIATIONS.put("Object", "java.lang.Object");
60     ABBREVIATIONS.put("Package", "java.lang.Package");
61     ABBREVIATIONS.put("Process", "java.lang.Process");
62     ABBREVIATIONS.put("Runtime", "java.lang.Runtime");
63     ABBREVIATIONS.put("RuntimePermission", "java.lang.RuntimePermission");
64     ABBREVIATIONS.put("SecurityManager", "java.lang.SecurityManager");
65     ABBREVIATIONS.put("Short", "java.lang.Short");
66     ABBREVIATIONS.put("StackTraceElement", "java.lang.StackTraceElement");
67     ABBREVIATIONS.put("StrictMath", "java.lang.StrictMath");
68     ABBREVIATIONS.put("String", "java.lang.String");
69     ABBREVIATIONS.put("StringBuffer", "java.lang.StringBuffer");
70     ABBREVIATIONS.put("System", "java.lang.System");
71     ABBREVIATIONS.put("Thread", "java.lang.Thread");
72     ABBREVIATIONS.put("ThreadGroup", "java.lang.ThreadGroup");
73     ABBREVIATIONS.put("ThreadLocal", "java.lang.ThreadLocal");
74     ABBREVIATIONS.put("Throwable", "java.lang.Throwable");
75     ABBREVIATIONS.put("Exception", "java.lang.Exception");
76     ABBREVIATIONS.put("Void", "java.lang.Void");
77     ABBREVIATIONS.put("CharSequence[]", "java.lang.CharSequence[][]");
78     ABBREVIATIONS.put("Cloneable[]", "java.lang.Cloneable[]");
79     ABBREVIATIONS.put("Comparable[]", "java.lang.Comparable[]");
80     ABBREVIATIONS.put("Runnable[]", "java.lang.Runnable[]");
81     ABBREVIATIONS.put("Boolean[]", "java.lang.Boolean[]");
82     ABBREVIATIONS.put("Byte[]", "java.lang.Byte[]");
83     ABBREVIATIONS.put("Character[]", "java.lang.Character[]");
84     ABBREVIATIONS.put("Class[]", "java.lang.Class[]");
85     ABBREVIATIONS.put("ClassLoader[]", "java.lang.ClassLoader[]");
86     ABBREVIATIONS.put("Compiler[]", "java.lang.Compiler[]");
87     ABBREVIATIONS.put("Double[]", "java.lang.Double[]");
88     ABBREVIATIONS.put("Float[]", "java.lang.Float[]");
89     ABBREVIATIONS.put("InheritableThreadLocal[]", "java.lang.InheritableThreadLocal[]");
90     ABBREVIATIONS.put("Integer[]", "java.lang.Integer[]");
91     ABBREVIATIONS.put("Long[]", "java.lang.Long[]");
92     ABBREVIATIONS.put("Math[]", "java.lang.Math[]");
93     ABBREVIATIONS.put("Number[]", "java.lang.Number[]");
94     ABBREVIATIONS.put("Object[]", "java.lang.Object[]");
95     ABBREVIATIONS.put("Package[]", "java.lang.Package[]");
96     ABBREVIATIONS.put("Process[]", "java.lang.Process[]");
97     ABBREVIATIONS.put("Runtime[]", "java.lang.Runtime[]");
98     ABBREVIATIONS.put("RuntimePermission[]", "java.lang.RuntimePermission[]");
99     ABBREVIATIONS.put("SecurityManager[]", "java.lang.SecurityManager[]");
100     ABBREVIATIONS.put("Short[]", "java.lang.Short[]");
101     ABBREVIATIONS.put("StackTraceElement[]", "java.lang.StackTraceElement[]");
102     ABBREVIATIONS.put("StrictMath[]", "java.lang.StrictMath[]");
103     ABBREVIATIONS.put("String[]", "java.lang.String[]");
104     ABBREVIATIONS.put("StringBuffer[]", "java.lang.StringBuffer[]");
105     ABBREVIATIONS.put("System[]", "java.lang.System[]");
106     ABBREVIATIONS.put("Thread[]", "java.lang.Thread[]");
107     ABBREVIATIONS.put("ThreadGroup[]", "java.lang.ThreadGroup[]");
108     ABBREVIATIONS.put("ThreadLocal[]", "java.lang.ThreadLocal[]");
109     ABBREVIATIONS.put("Throwable[]", "java.lang.Throwable[]");
110     ABBREVIATIONS.put("Exception[]", "java.lang.Exception[]");
111     ABBREVIATIONS.put("Void[]", "java.lang.Void[]");
112     ABBREVIATIONS.put("CharSequence[][]", "java.lang.CharSequence[][]");
113     ABBREVIATIONS.put("Cloneable[][]", "java.lang.Cloneable[][]");
114     ABBREVIATIONS.put("Comparable[][]", "java.lang.Comparable[][]");
115     ABBREVIATIONS.put("Runnable[][]", "java.lang.Runnable[][]");
116     ABBREVIATIONS.put("Boolean[][]", "java.lang.Boolean[][]");
117     ABBREVIATIONS.put("Byte[][]", "java.lang.Byte[][]");
118     ABBREVIATIONS.put("Character[][]", "java.lang.Character[][]");
119     ABBREVIATIONS.put("Class[][]", "java.lang.Class[][]");
120     ABBREVIATIONS.put("ClassLoader[][]", "java.lang.ClassLoader[][]");
121     ABBREVIATIONS.put("Compiler[][]", "java.lang.Compiler[][]");
122     ABBREVIATIONS.put("Double[][]", "java.lang.Double[][]");
123     ABBREVIATIONS.put("Float[][]", "java.lang.Float[][]");
124     ABBREVIATIONS.put("InheritableThreadLocal[][]", "java.lang.InheritableThreadLocal[][]");
125     ABBREVIATIONS.put("Integer[][]", "java.lang.Integer[][]");
126     ABBREVIATIONS.put("Long[][]", "java.lang.Long[][]");
127     ABBREVIATIONS.put("Math[][]", "java.lang.Math[][]");
128     ABBREVIATIONS.put("Number[][]", "java.lang.Number[][]");
129     ABBREVIATIONS.put("Object[][]", "java.lang.Object[][]");
130     ABBREVIATIONS.put("Package[][]", "java.lang.Package[][]");
131     ABBREVIATIONS.put("Process[][]", "java.lang.Process[][]");
132     ABBREVIATIONS.put("Runtime[][]", "java.lang.Runtime[][]");
133     ABBREVIATIONS.put("RuntimePermission[][]", "java.lang.RuntimePermission[][]");
134     ABBREVIATIONS.put("SecurityManager[][]", "java.lang.SecurityManager[][]");
135     ABBREVIATIONS.put("Short[][]", "java.lang.Short[][]");
136     ABBREVIATIONS.put("StackTraceElement[][]", "java.lang.StackTraceElement[][]");
137     ABBREVIATIONS.put("StrictMath[][]", "java.lang.StrictMath[][]");
138     ABBREVIATIONS.put("String[][]", "java.lang.String[][]");
139     ABBREVIATIONS.put("StringBuffer[][]", "java.lang.StringBuffer[][]");
140     ABBREVIATIONS.put("System[][]", "java.lang.System[][]");
141     ABBREVIATIONS.put("Thread[][]", "java.lang.Thread[][]");
142     ABBREVIATIONS.put("ThreadGroup[][]", "java.lang.ThreadGroup[][]");
143     ABBREVIATIONS.put("ThreadLocal[][]", "java.lang.ThreadLocal[][]");
144     ABBREVIATIONS.put("Throwable[][]", "java.lang.Throwable[][]");
145     ABBREVIATIONS.put("Exception[][]", "java.lang.Exception[][]");
146     ABBREVIATIONS.put("Void[][]", "java.lang.Void[][]");
147     ABBREVIATIONS.put("Collection", "java.util.Collection");
148     ABBREVIATIONS.put("Comparator", "java.util.Comparator");
149     ABBREVIATIONS.put("Enumeration", "java.util.Enumeration");
150     ABBREVIATIONS.put("EventListener", "java.util.EventListener");
151     ABBREVIATIONS.put("Iterator", "java.util.Iterator");
152     ABBREVIATIONS.put("List", "java.util.List");
153     ABBREVIATIONS.put("ListIterator", "java.util.ListIterator");
154     ABBREVIATIONS.put("Map", "java.util.Map");
155     ABBREVIATIONS.put("Map.Entry", "java.util.Map.Entry");
156     ABBREVIATIONS.put("Observer", "java.util.Observer");
157     ABBREVIATIONS.put("RandomAccess", "java.util.RandomAccess");
158     ABBREVIATIONS.put("Set", "java.util.Set");
159     ABBREVIATIONS.put("SortedMap", "java.util.SortedMap");
160     ABBREVIATIONS.put("SortedSet", "java.util.SortedSet");
161     ABBREVIATIONS.put("AbstractCollection", "java.util.AbstractCollection");
162     ABBREVIATIONS.put("AbstractList", "java.util.AbstractList");
163     ABBREVIATIONS.put("AbstractMap", "java.util.AbstractMap");
164     ABBREVIATIONS.put("AbstractSequentialList ", "java.util.AbstractSequentialList");
165     ABBREVIATIONS.put("AbstractSet", "java.util.AbstractSet");
166     ABBREVIATIONS.put("ArrayList", "java.util.ArrayList");
167     ABBREVIATIONS.put("Arrays", "java.util.Arrays");
168     ABBREVIATIONS.put("BitSet", "java.util.BitSet");
169     ABBREVIATIONS.put("Calendar", "java.util.Calendar");
170     ABBREVIATIONS.put("Collections", "java.util.Collections");
171     ABBREVIATIONS.put("Currency", "java.util.Currency");
172     ABBREVIATIONS.put("Date", "java.util.Date");
173     ABBREVIATIONS.put("Dictionary", "java.util.Dictionary");
174     ABBREVIATIONS.put("EventListenerProxy", "java.util.EventListenerProxy");
175     ABBREVIATIONS.put("EventObject", "java.util.EventObject");
176     ABBREVIATIONS.put("GregorianCalender", "java.util.GregorianCalender");
177     ABBREVIATIONS.put("HashMap", "java.util.HashMap");
178     ABBREVIATIONS.put("HashSet", "java.util.HashSet");
179     ABBREVIATIONS.put("Hashtable", "java.util.Hashtable");
180     ABBREVIATIONS.put("IdentityHashMap", "java.util.IdentityHashMap");
181     ABBREVIATIONS.put("LinkedHashMap", "java.util.LinkedHashMap");
182     ABBREVIATIONS.put("LinkedHashSet", "java.util.LinkedHashSet");
183     ABBREVIATIONS.put("LinkedList", "java.util.LinkedList");
184     ABBREVIATIONS.put("ListResourceBundle", "java.util.ListResourceBundle");
185     ABBREVIATIONS.put("Locale", "java.util.Locale");
186     ABBREVIATIONS.put("Observable", "java.util.Observable");
187     ABBREVIATIONS.put("Properties", "java.util.Properties");
188     ABBREVIATIONS.put("PropertyPermission", "java.util.PropertyPermission");
189     ABBREVIATIONS.put("PropertyResourceBundle", "java.util.PropertyResourceBundle");
190     ABBREVIATIONS.put("Random", "java.util.Random");
191     ABBREVIATIONS.put("ResourceBundle", "java.util.ResourceBundle");
192     ABBREVIATIONS.put("SimpleTimeZone", "java.util.SimpleTimeZone");
193     ABBREVIATIONS.put("Stack", "java.util.Stack");
194     ABBREVIATIONS.put("StringTokenizer", "java.util.StringTokenizer");
195     ABBREVIATIONS.put("Timer", "java.util.Timer");
196     ABBREVIATIONS.put("TimerTask", "java.util.TimerTask");
197     ABBREVIATIONS.put("TimeZone", "java.util.TimeZone");
198     ABBREVIATIONS.put("TreeMap", "java.util.TreeMap");
199     ABBREVIATIONS.put("TreeSet", "java.util.TreeSet");
200     ABBREVIATIONS.put("Vector", "java.util.Vector");
201     ABBREVIATIONS.put("WeakHashMap", "java.util.WeakHashMap");
202     ABBREVIATIONS.put("Collection[]", "java.util.Collection[]");
203     ABBREVIATIONS.put("Comparator[]", "java.util.Comparator[]");
204     ABBREVIATIONS.put("Enumeration[]", "java.util.Enumeration[]");
205     ABBREVIATIONS.put("EventListener[]", "java.util.EventListener[]");
206     ABBREVIATIONS.put("Iterator[]", "java.util.Iterator[]");
207     ABBREVIATIONS.put("List[]", "java.util.List[]");
208     ABBREVIATIONS.put("ListIterator[]", "java.util.ListIterator[]");
209     ABBREVIATIONS.put("Map[]", "java.util.Map[]");
210     ABBREVIATIONS.put("Map.Entry[]", "java.util.Map.Entry[]");
211     ABBREVIATIONS.put("Observer[]", "java.util.Observer[]");
212     ABBREVIATIONS.put("RandomAccess[]", "java.util.RandomAccess[]");
213     ABBREVIATIONS.put("Set[]", "java.util.Set[]");
214     ABBREVIATIONS.put("SortedMap[]", "java.util.SortedMap[]");
215     ABBREVIATIONS.put("SortedSet[]", "java.util.SortedSet[]");
216     ABBREVIATIONS.put("AbstractCollection[]", "java.util.AbstractCollection[]");
217     ABBREVIATIONS.put("AbstractList[]", "java.util.AbstractList[]");
218     ABBREVIATIONS.put("AbstractMap[]", "java.util.AbstractMap[]");
219     ABBREVIATIONS.put("AbstractSequentialList []", "java.util.AbstractSequentialList[]");
220     ABBREVIATIONS.put("AbstractSet[]", "java.util.AbstractSet[]");
221     ABBREVIATIONS.put("ArrayList[]", "java.util.ArrayList[]");
222     ABBREVIATIONS.put("Arrays[]", "java.util.Arrays[]");
223     ABBREVIATIONS.put("BitSet[]", "java.util.BitSet[]");
224     ABBREVIATIONS.put("Calendar[]", "java.util.Calendar[]");
225     ABBREVIATIONS.put("Collections[]", "java.util.Collections[]");
226     ABBREVIATIONS.put("Currency[]", "java.util.Currency[]");
227     ABBREVIATIONS.put("Date[]", "java.util.Date[]");
228     ABBREVIATIONS.put("Dictionary[]", "java.util.Dictionary[]");
229     ABBREVIATIONS.put("EventListenerProxy[]", "java.util.EventListenerProxy[]");
230     ABBREVIATIONS.put("EventObject[]", "java.util.EventObject[]");
231     ABBREVIATIONS.put("GregorianCalender[]", "java.util.GregorianCalender[]");
232     ABBREVIATIONS.put("HashMap[]", "java.util.HashMap[]");
233     ABBREVIATIONS.put("HashSet[]", "java.util.HashSet[]");
234     ABBREVIATIONS.put("Hashtable[]", "java.util.Hashtable[]");
235     ABBREVIATIONS.put("IdentityHashMap[]", "java.util.IdentityHashMap[]");
236     ABBREVIATIONS.put("LinkedHashMap[]", "java.util.LinkedHashMap[]");
237     ABBREVIATIONS.put("LinkedHashSet[]", "java.util.LinkedHashSet[]");
238     ABBREVIATIONS.put("LinkedList[]", "java.util.LinkedList[]");
239     ABBREVIATIONS.put("ListResourceBundle[]", "java.util.ListResourceBundle[]");
240     ABBREVIATIONS.put("Locale[]", "java.util.Locale[]");
241     ABBREVIATIONS.put("Observable[]", "java.util.Observable[]");
242     ABBREVIATIONS.put("Properties[]", "java.util.Properties[]");
243     ABBREVIATIONS.put("PropertyPermission[]", "java.util.PropertyPermission[]");
244     ABBREVIATIONS.put("PropertyResourceBundle[]", "java.util.PropertyResourceBundle[]");
245     ABBREVIATIONS.put("Random[]", "java.util.Random[]");
246     ABBREVIATIONS.put("ResourceBundle[]", "java.util.ResourceBundle[]");
247     ABBREVIATIONS.put("SimpleTimeZone[]", "java.util.SimpleTimeZone[]");
248     ABBREVIATIONS.put("Stack[]", "java.util.Stack[]");
249     ABBREVIATIONS.put("StringTokenizer[]", "java.util.StringTokenizer[]");
250     ABBREVIATIONS.put("Timer[]", "java.util.Timer[]");
251     ABBREVIATIONS.put("TimerTask[]", "java.util.TimerTask[]");
252     ABBREVIATIONS.put("TimeZone[]", "java.util.TimeZone[]");
253     ABBREVIATIONS.put("TreeMap[]", "java.util.TreeMap[]");
254     ABBREVIATIONS.put("TreeSet[]", "java.util.TreeSet[]");
255     ABBREVIATIONS.put("Vector[]", "java.util.Vector[]");
256     ABBREVIATIONS.put("WeakHashMap[]", "java.util.WeakHashMap[]");
257     ABBREVIATIONS.put("Collection[][]", "java.util.Collection[][]");
258     ABBREVIATIONS.put("Comparator[][]", "java.util.Comparator[][]");
259     ABBREVIATIONS.put("Enumeration[][]", "java.util.Enumeration[][]");
260     ABBREVIATIONS.put("EventListener[][]", "java.util.EventListener[][]");
261     ABBREVIATIONS.put("Iterator[][]", "java.util.Iterator[][]");
262     ABBREVIATIONS.put("List[][]", "java.util.List[][]");
263     ABBREVIATIONS.put("ListIterator[][]", "java.util.ListIterator[][]");
264     ABBREVIATIONS.put("Map[][]", "java.util.Map[][]");
265     ABBREVIATIONS.put("Map.Entry[][]", "java.util.Map.Entry[][]");
266     ABBREVIATIONS.put("Observer[][]", "java.util.Observer[][]");
267     ABBREVIATIONS.put("RandomAccess[][]", "java.util.RandomAccess[][]");
268     ABBREVIATIONS.put("Set[][]", "java.util.Set[][]");
269     ABBREVIATIONS.put("SortedMap[][]", "java.util.SortedMap[][]");
270     ABBREVIATIONS.put("SortedSet[][]", "java.util.SortedSet[][]");
271     ABBREVIATIONS.put("AbstractCollection[][]", "java.util.AbstractCollection[][]");
272     ABBREVIATIONS.put("AbstractList[][]", "java.util.AbstractList[][]");
273     ABBREVIATIONS.put("AbstractMap[][]", "java.util.AbstractMap[][]");
274     ABBREVIATIONS.put("AbstractSequentialList [][]", "java.util.AbstractSequentialList[][]");
275     ABBREVIATIONS.put("AbstractSet[][]", "java.util.AbstractSet[][]");
276     ABBREVIATIONS.put("ArrayList[][]", "java.util.ArrayList[][]");
277     ABBREVIATIONS.put("Arrays[][]", "java.util.Arrays[][]");
278     ABBREVIATIONS.put("BitSet[][]", "java.util.BitSet[][]");
279     ABBREVIATIONS.put("Calendar[][]", "java.util.Calendar[][]");
280     ABBREVIATIONS.put("Collections[][]", "java.util.Collections[][]");
281     ABBREVIATIONS.put("Currency[][]", "java.util.Currency[][]");
282     ABBREVIATIONS.put("Date[][]", "java.util.Date[][]");
283     ABBREVIATIONS.put("Dictionary[][]", "java.util.Dictionary[][]");
284     ABBREVIATIONS.put("EventListenerProxy[][]", "java.util.EventListenerProxy[][]");
285     ABBREVIATIONS.put("EventObject[][]", "java.util.EventObject[][]");
286     ABBREVIATIONS.put("GregorianCalender[][]", "java.util.GregorianCalender[][]");
287     ABBREVIATIONS.put("HashMap[][]", "java.util.HashMap[][]");
288     ABBREVIATIONS.put("HashSet[][]", "java.util.HashSet[][]");
289     ABBREVIATIONS.put("Hashtable[][]", "java.util.Hashtable[][]");
290     ABBREVIATIONS.put("IdentityHashMap[][]", "java.util.IdentityHashMap[][]");
291     ABBREVIATIONS.put("LinkedHashMap[][]", "java.util.LinkedHashMap[][]");
292     ABBREVIATIONS.put("LinkedHashSet[][]", "java.util.LinkedHashSet[][]");
293     ABBREVIATIONS.put("LinkedList[][]", "java.util.LinkedList[][]");
294     ABBREVIATIONS.put("ListResourceBundle[][]", "java.util.ListResourceBundle[][]");
295     ABBREVIATIONS.put("Locale[][]", "java.util.Locale[][]");
296     ABBREVIATIONS.put("Observable[][]", "java.util.Observable[][]");
297     ABBREVIATIONS.put("Properties[][]", "java.util.Properties[][]");
298     ABBREVIATIONS.put("PropertyPermission[][]", "java.util.PropertyPermission[][]");
299     ABBREVIATIONS.put("PropertyResourceBundle[][]", "java.util.PropertyResourceBundle[][]");
300     ABBREVIATIONS.put("Random[][]", "java.util.Random[][]");
301     ABBREVIATIONS.put("ResourceBundle[][]", "java.util.ResourceBundle[][]");
302     ABBREVIATIONS.put("SimpleTimeZone[][]", "java.util.SimpleTimeZone[][]");
303     ABBREVIATIONS.put("Stack[][]", "java.util.Stack[][]");
304     ABBREVIATIONS.put("StringTokenizer[][]", "java.util.StringTokenizer[][]");
305     ABBREVIATIONS.put("Timer[][]", "java.util.Timer[][]");
306     ABBREVIATIONS.put("TimerTask[][]", "java.util.TimerTask[][]");
307     ABBREVIATIONS.put("TimeZone[][]", "java.util.TimeZone[][]");
308     ABBREVIATIONS.put("TreeMap[][]", "java.util.TreeMap[][]");
309     ABBREVIATIONS.put("TreeSet[][]", "java.util.TreeSet[][]");
310     ABBREVIATIONS.put("Vector[][]", "java.util.Vector[][]");
311     ABBREVIATIONS.put("WeakHashMap[][]", "java.util.WeakHashMap[][]");
312   }
313
314   /**
315    * Compiles and returns a new type pattern.
316    *
317    * @param pattern the full pattern as a string
318    * @param subtypePatternType the subtype pattern type
319    * @return the pattern
320    */

321   public static TypePattern compileTypePattern(final String JavaDoc pattern, final SubtypePatternType subtypePatternType) {
322     return new TypePattern(pattern, subtypePatternType);
323   }
324
325   /**
326    * Compiles and returns a new name pattern.
327    *
328    * @param pattern the full pattern as a string
329    * @return the pattern
330    */

331   public static NamePattern compileNamePattern(final String JavaDoc pattern) {
332     return new NamePattern(pattern);
333   }
334 }
Popular Tags