001: /*
002: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
003: */
004: package com.tc.aspectwerkz.expression.regexp;
005:
006: import com.tc.aspectwerkz.expression.SubtypePatternType;
007:
008: import java.io.Serializable;
009: import java.util.HashMap;
010: import java.util.Map;
011:
012: /**
013: * Implements an abstract regular expression pattern matcher for AspectWerkz.
014: *
015: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
016: */
017: public abstract class Pattern implements Serializable {
018: /**
019: * Defines a single wildcard.
020: */
021: public static final String REGULAR_WILDCARD = "*";
022:
023: /**
024: * Defines a multiple wildcard.
025: */
026: public static final String EAGER_WILDCARD = "..";
027:
028: /**
029: * Abbreviations for all the classes in the java.lang.* and the java.util.* namespaces.
030: */
031: public static final Map ABBREVIATIONS = new HashMap();
032:
033: static {
034: // TODO: update for Java 1.5?
035: // abbreviations used in XML def advice name
036: ABBREVIATIONS.put("JoinPoint",
037: "com.tc.aspectwerkz.joinpoint.JoinPoint");
038: ABBREVIATIONS.put("StaticJoinPoint",
039: "com.tc.aspectwerkz.joinpoint.StaticJoinPoint");
040: ABBREVIATIONS.put("Rtti", "com.tc.aspectwerkz.joinpoint.Rtti");
041: // java.lang.*
042: ABBREVIATIONS.put("CharSequence", "java.lang.CharSequence");
043: ABBREVIATIONS.put("Cloneable", "java.lang.Cloneable");
044: ABBREVIATIONS.put("Comparable", "java.lang.Comparable");
045: ABBREVIATIONS.put("Runnable", "java.lang.Runnable");
046: ABBREVIATIONS.put("Boolean", "java.lang.Boolean");
047: ABBREVIATIONS.put("Byte", "java.lang.Byte");
048: ABBREVIATIONS.put("Character", "java.lang.Character");
049: ABBREVIATIONS.put("Class", "java.lang.Class");
050: ABBREVIATIONS.put("ClassLoader", "java.lang.ClassLoader");
051: ABBREVIATIONS.put("Compiler", "java.lang.Compiler");
052: ABBREVIATIONS.put("Double", "java.lang.Double");
053: ABBREVIATIONS.put("Float", "java.lang.Float");
054: ABBREVIATIONS.put("InheritableThreadLocal",
055: "java.lang.InheritableThreadLocal");
056: ABBREVIATIONS.put("Integer", "java.lang.Integer");
057: ABBREVIATIONS.put("Long", "java.lang.Long");
058: ABBREVIATIONS.put("Math", "java.lang.Math");
059: ABBREVIATIONS.put("Number", "java.lang.Number");
060: ABBREVIATIONS.put("Object", "java.lang.Object");
061: ABBREVIATIONS.put("Package", "java.lang.Package");
062: ABBREVIATIONS.put("Process", "java.lang.Process");
063: ABBREVIATIONS.put("Runtime", "java.lang.Runtime");
064: ABBREVIATIONS.put("RuntimePermission",
065: "java.lang.RuntimePermission");
066: ABBREVIATIONS.put("SecurityManager",
067: "java.lang.SecurityManager");
068: ABBREVIATIONS.put("Short", "java.lang.Short");
069: ABBREVIATIONS.put("StackTraceElement",
070: "java.lang.StackTraceElement");
071: ABBREVIATIONS.put("StrictMath", "java.lang.StrictMath");
072: ABBREVIATIONS.put("String", "java.lang.String");
073: ABBREVIATIONS.put("StringBuffer", "java.lang.StringBuffer");
074: ABBREVIATIONS.put("System", "java.lang.System");
075: ABBREVIATIONS.put("Thread", "java.lang.Thread");
076: ABBREVIATIONS.put("ThreadGroup", "java.lang.ThreadGroup");
077: ABBREVIATIONS.put("ThreadLocal", "java.lang.ThreadLocal");
078: ABBREVIATIONS.put("Throwable", "java.lang.Throwable");
079: ABBREVIATIONS.put("Exception", "java.lang.Exception");
080: ABBREVIATIONS.put("Void", "java.lang.Void");
081: ABBREVIATIONS.put("CharSequence[]",
082: "java.lang.CharSequence[][]");
083: ABBREVIATIONS.put("Cloneable[]", "java.lang.Cloneable[]");
084: ABBREVIATIONS.put("Comparable[]", "java.lang.Comparable[]");
085: ABBREVIATIONS.put("Runnable[]", "java.lang.Runnable[]");
086: ABBREVIATIONS.put("Boolean[]", "java.lang.Boolean[]");
087: ABBREVIATIONS.put("Byte[]", "java.lang.Byte[]");
088: ABBREVIATIONS.put("Character[]", "java.lang.Character[]");
089: ABBREVIATIONS.put("Class[]", "java.lang.Class[]");
090: ABBREVIATIONS.put("ClassLoader[]", "java.lang.ClassLoader[]");
091: ABBREVIATIONS.put("Compiler[]", "java.lang.Compiler[]");
092: ABBREVIATIONS.put("Double[]", "java.lang.Double[]");
093: ABBREVIATIONS.put("Float[]", "java.lang.Float[]");
094: ABBREVIATIONS.put("InheritableThreadLocal[]",
095: "java.lang.InheritableThreadLocal[]");
096: ABBREVIATIONS.put("Integer[]", "java.lang.Integer[]");
097: ABBREVIATIONS.put("Long[]", "java.lang.Long[]");
098: ABBREVIATIONS.put("Math[]", "java.lang.Math[]");
099: ABBREVIATIONS.put("Number[]", "java.lang.Number[]");
100: ABBREVIATIONS.put("Object[]", "java.lang.Object[]");
101: ABBREVIATIONS.put("Package[]", "java.lang.Package[]");
102: ABBREVIATIONS.put("Process[]", "java.lang.Process[]");
103: ABBREVIATIONS.put("Runtime[]", "java.lang.Runtime[]");
104: ABBREVIATIONS.put("RuntimePermission[]",
105: "java.lang.RuntimePermission[]");
106: ABBREVIATIONS.put("SecurityManager[]",
107: "java.lang.SecurityManager[]");
108: ABBREVIATIONS.put("Short[]", "java.lang.Short[]");
109: ABBREVIATIONS.put("StackTraceElement[]",
110: "java.lang.StackTraceElement[]");
111: ABBREVIATIONS.put("StrictMath[]", "java.lang.StrictMath[]");
112: ABBREVIATIONS.put("String[]", "java.lang.String[]");
113: ABBREVIATIONS.put("StringBuffer[]", "java.lang.StringBuffer[]");
114: ABBREVIATIONS.put("System[]", "java.lang.System[]");
115: ABBREVIATIONS.put("Thread[]", "java.lang.Thread[]");
116: ABBREVIATIONS.put("ThreadGroup[]", "java.lang.ThreadGroup[]");
117: ABBREVIATIONS.put("ThreadLocal[]", "java.lang.ThreadLocal[]");
118: ABBREVIATIONS.put("Throwable[]", "java.lang.Throwable[]");
119: ABBREVIATIONS.put("Exception[]", "java.lang.Exception[]");
120: ABBREVIATIONS.put("Void[]", "java.lang.Void[]");
121: ABBREVIATIONS.put("CharSequence[][]",
122: "java.lang.CharSequence[][]");
123: ABBREVIATIONS.put("Cloneable[][]", "java.lang.Cloneable[][]");
124: ABBREVIATIONS.put("Comparable[][]", "java.lang.Comparable[][]");
125: ABBREVIATIONS.put("Runnable[][]", "java.lang.Runnable[][]");
126: ABBREVIATIONS.put("Boolean[][]", "java.lang.Boolean[][]");
127: ABBREVIATIONS.put("Byte[][]", "java.lang.Byte[][]");
128: ABBREVIATIONS.put("Character[][]", "java.lang.Character[][]");
129: ABBREVIATIONS.put("Class[][]", "java.lang.Class[][]");
130: ABBREVIATIONS.put("ClassLoader[][]",
131: "java.lang.ClassLoader[][]");
132: ABBREVIATIONS.put("Compiler[][]", "java.lang.Compiler[][]");
133: ABBREVIATIONS.put("Double[][]", "java.lang.Double[][]");
134: ABBREVIATIONS.put("Float[][]", "java.lang.Float[][]");
135: ABBREVIATIONS.put("InheritableThreadLocal[][]",
136: "java.lang.InheritableThreadLocal[][]");
137: ABBREVIATIONS.put("Integer[][]", "java.lang.Integer[][]");
138: ABBREVIATIONS.put("Long[][]", "java.lang.Long[][]");
139: ABBREVIATIONS.put("Math[][]", "java.lang.Math[][]");
140: ABBREVIATIONS.put("Number[][]", "java.lang.Number[][]");
141: ABBREVIATIONS.put("Object[][]", "java.lang.Object[][]");
142: ABBREVIATIONS.put("Package[][]", "java.lang.Package[][]");
143: ABBREVIATIONS.put("Process[][]", "java.lang.Process[][]");
144: ABBREVIATIONS.put("Runtime[][]", "java.lang.Runtime[][]");
145: ABBREVIATIONS.put("RuntimePermission[][]",
146: "java.lang.RuntimePermission[][]");
147: ABBREVIATIONS.put("SecurityManager[][]",
148: "java.lang.SecurityManager[][]");
149: ABBREVIATIONS.put("Short[][]", "java.lang.Short[][]");
150: ABBREVIATIONS.put("StackTraceElement[][]",
151: "java.lang.StackTraceElement[][]");
152: ABBREVIATIONS.put("StrictMath[][]", "java.lang.StrictMath[][]");
153: ABBREVIATIONS.put("String[][]", "java.lang.String[][]");
154: ABBREVIATIONS.put("StringBuffer[][]",
155: "java.lang.StringBuffer[][]");
156: ABBREVIATIONS.put("System[][]", "java.lang.System[][]");
157: ABBREVIATIONS.put("Thread[][]", "java.lang.Thread[][]");
158: ABBREVIATIONS.put("ThreadGroup[][]",
159: "java.lang.ThreadGroup[][]");
160: ABBREVIATIONS.put("ThreadLocal[][]",
161: "java.lang.ThreadLocal[][]");
162: ABBREVIATIONS.put("Throwable[][]", "java.lang.Throwable[][]");
163: ABBREVIATIONS.put("Exception[][]", "java.lang.Exception[][]");
164: ABBREVIATIONS.put("Void[][]", "java.lang.Void[][]");
165: ABBREVIATIONS.put("Collection", "java.util.Collection");
166: ABBREVIATIONS.put("Comparator", "java.util.Comparator");
167: ABBREVIATIONS.put("Enumeration", "java.util.Enumeration");
168: ABBREVIATIONS.put("EventListener", "java.util.EventListener");
169: ABBREVIATIONS.put("Iterator", "java.util.Iterator");
170: ABBREVIATIONS.put("List", "java.util.List");
171: ABBREVIATIONS.put("ListIterator", "java.util.ListIterator");
172: ABBREVIATIONS.put("Map", "java.util.Map");
173: ABBREVIATIONS.put("Map.Entry", "java.util.Map.Entry");
174: ABBREVIATIONS.put("Observer", "java.util.Observer");
175: ABBREVIATIONS.put("RandomAccess", "java.util.RandomAccess");
176: ABBREVIATIONS.put("Set", "java.util.Set");
177: ABBREVIATIONS.put("SortedMap", "java.util.SortedMap");
178: ABBREVIATIONS.put("SortedSet", "java.util.SortedSet");
179: ABBREVIATIONS.put("AbstractCollection",
180: "java.util.AbstractCollection");
181: ABBREVIATIONS.put("AbstractList", "java.util.AbstractList");
182: ABBREVIATIONS.put("AbstractMap", "java.util.AbstractMap");
183: ABBREVIATIONS.put("AbstractSequentialList ",
184: "java.util.AbstractSequentialList");
185: ABBREVIATIONS.put("AbstractSet", "java.util.AbstractSet");
186: ABBREVIATIONS.put("ArrayList", "java.util.ArrayList");
187: ABBREVIATIONS.put("Arrays", "java.util.Arrays");
188: ABBREVIATIONS.put("BitSet", "java.util.BitSet");
189: ABBREVIATIONS.put("Calendar", "java.util.Calendar");
190: ABBREVIATIONS.put("Collections", "java.util.Collections");
191: ABBREVIATIONS.put("Currency", "java.util.Currency");
192: ABBREVIATIONS.put("Date", "java.util.Date");
193: ABBREVIATIONS.put("Dictionary", "java.util.Dictionary");
194: ABBREVIATIONS.put("EventListenerProxy",
195: "java.util.EventListenerProxy");
196: ABBREVIATIONS.put("EventObject", "java.util.EventObject");
197: ABBREVIATIONS.put("GregorianCalender",
198: "java.util.GregorianCalender");
199: ABBREVIATIONS.put("HashMap", "java.util.HashMap");
200: ABBREVIATIONS.put("HashSet", "java.util.HashSet");
201: ABBREVIATIONS.put("Hashtable", "java.util.Hashtable");
202: ABBREVIATIONS.put("IdentityHashMap",
203: "java.util.IdentityHashMap");
204: ABBREVIATIONS.put("LinkedHashMap", "java.util.LinkedHashMap");
205: ABBREVIATIONS.put("LinkedHashSet", "java.util.LinkedHashSet");
206: ABBREVIATIONS.put("LinkedList", "java.util.LinkedList");
207: ABBREVIATIONS.put("ListResourceBundle",
208: "java.util.ListResourceBundle");
209: ABBREVIATIONS.put("Locale", "java.util.Locale");
210: ABBREVIATIONS.put("Observable", "java.util.Observable");
211: ABBREVIATIONS.put("Properties", "java.util.Properties");
212: ABBREVIATIONS.put("PropertyPermission",
213: "java.util.PropertyPermission");
214: ABBREVIATIONS.put("PropertyResourceBundle",
215: "java.util.PropertyResourceBundle");
216: ABBREVIATIONS.put("Random", "java.util.Random");
217: ABBREVIATIONS.put("ResourceBundle", "java.util.ResourceBundle");
218: ABBREVIATIONS.put("SimpleTimeZone", "java.util.SimpleTimeZone");
219: ABBREVIATIONS.put("Stack", "java.util.Stack");
220: ABBREVIATIONS.put("StringTokenizer",
221: "java.util.StringTokenizer");
222: ABBREVIATIONS.put("Timer", "java.util.Timer");
223: ABBREVIATIONS.put("TimerTask", "java.util.TimerTask");
224: ABBREVIATIONS.put("TimeZone", "java.util.TimeZone");
225: ABBREVIATIONS.put("TreeMap", "java.util.TreeMap");
226: ABBREVIATIONS.put("TreeSet", "java.util.TreeSet");
227: ABBREVIATIONS.put("Vector", "java.util.Vector");
228: ABBREVIATIONS.put("WeakHashMap", "java.util.WeakHashMap");
229: ABBREVIATIONS.put("Collection[]", "java.util.Collection[]");
230: ABBREVIATIONS.put("Comparator[]", "java.util.Comparator[]");
231: ABBREVIATIONS.put("Enumeration[]", "java.util.Enumeration[]");
232: ABBREVIATIONS.put("EventListener[]",
233: "java.util.EventListener[]");
234: ABBREVIATIONS.put("Iterator[]", "java.util.Iterator[]");
235: ABBREVIATIONS.put("List[]", "java.util.List[]");
236: ABBREVIATIONS.put("ListIterator[]", "java.util.ListIterator[]");
237: ABBREVIATIONS.put("Map[]", "java.util.Map[]");
238: ABBREVIATIONS.put("Map.Entry[]", "java.util.Map.Entry[]");
239: ABBREVIATIONS.put("Observer[]", "java.util.Observer[]");
240: ABBREVIATIONS.put("RandomAccess[]", "java.util.RandomAccess[]");
241: ABBREVIATIONS.put("Set[]", "java.util.Set[]");
242: ABBREVIATIONS.put("SortedMap[]", "java.util.SortedMap[]");
243: ABBREVIATIONS.put("SortedSet[]", "java.util.SortedSet[]");
244: ABBREVIATIONS.put("AbstractCollection[]",
245: "java.util.AbstractCollection[]");
246: ABBREVIATIONS.put("AbstractList[]", "java.util.AbstractList[]");
247: ABBREVIATIONS.put("AbstractMap[]", "java.util.AbstractMap[]");
248: ABBREVIATIONS.put("AbstractSequentialList []",
249: "java.util.AbstractSequentialList[]");
250: ABBREVIATIONS.put("AbstractSet[]", "java.util.AbstractSet[]");
251: ABBREVIATIONS.put("ArrayList[]", "java.util.ArrayList[]");
252: ABBREVIATIONS.put("Arrays[]", "java.util.Arrays[]");
253: ABBREVIATIONS.put("BitSet[]", "java.util.BitSet[]");
254: ABBREVIATIONS.put("Calendar[]", "java.util.Calendar[]");
255: ABBREVIATIONS.put("Collections[]", "java.util.Collections[]");
256: ABBREVIATIONS.put("Currency[]", "java.util.Currency[]");
257: ABBREVIATIONS.put("Date[]", "java.util.Date[]");
258: ABBREVIATIONS.put("Dictionary[]", "java.util.Dictionary[]");
259: ABBREVIATIONS.put("EventListenerProxy[]",
260: "java.util.EventListenerProxy[]");
261: ABBREVIATIONS.put("EventObject[]", "java.util.EventObject[]");
262: ABBREVIATIONS.put("GregorianCalender[]",
263: "java.util.GregorianCalender[]");
264: ABBREVIATIONS.put("HashMap[]", "java.util.HashMap[]");
265: ABBREVIATIONS.put("HashSet[]", "java.util.HashSet[]");
266: ABBREVIATIONS.put("Hashtable[]", "java.util.Hashtable[]");
267: ABBREVIATIONS.put("IdentityHashMap[]",
268: "java.util.IdentityHashMap[]");
269: ABBREVIATIONS.put("LinkedHashMap[]",
270: "java.util.LinkedHashMap[]");
271: ABBREVIATIONS.put("LinkedHashSet[]",
272: "java.util.LinkedHashSet[]");
273: ABBREVIATIONS.put("LinkedList[]", "java.util.LinkedList[]");
274: ABBREVIATIONS.put("ListResourceBundle[]",
275: "java.util.ListResourceBundle[]");
276: ABBREVIATIONS.put("Locale[]", "java.util.Locale[]");
277: ABBREVIATIONS.put("Observable[]", "java.util.Observable[]");
278: ABBREVIATIONS.put("Properties[]", "java.util.Properties[]");
279: ABBREVIATIONS.put("PropertyPermission[]",
280: "java.util.PropertyPermission[]");
281: ABBREVIATIONS.put("PropertyResourceBundle[]",
282: "java.util.PropertyResourceBundle[]");
283: ABBREVIATIONS.put("Random[]", "java.util.Random[]");
284: ABBREVIATIONS.put("ResourceBundle[]",
285: "java.util.ResourceBundle[]");
286: ABBREVIATIONS.put("SimpleTimeZone[]",
287: "java.util.SimpleTimeZone[]");
288: ABBREVIATIONS.put("Stack[]", "java.util.Stack[]");
289: ABBREVIATIONS.put("StringTokenizer[]",
290: "java.util.StringTokenizer[]");
291: ABBREVIATIONS.put("Timer[]", "java.util.Timer[]");
292: ABBREVIATIONS.put("TimerTask[]", "java.util.TimerTask[]");
293: ABBREVIATIONS.put("TimeZone[]", "java.util.TimeZone[]");
294: ABBREVIATIONS.put("TreeMap[]", "java.util.TreeMap[]");
295: ABBREVIATIONS.put("TreeSet[]", "java.util.TreeSet[]");
296: ABBREVIATIONS.put("Vector[]", "java.util.Vector[]");
297: ABBREVIATIONS.put("WeakHashMap[]", "java.util.WeakHashMap[]");
298: ABBREVIATIONS.put("Collection[][]", "java.util.Collection[][]");
299: ABBREVIATIONS.put("Comparator[][]", "java.util.Comparator[][]");
300: ABBREVIATIONS.put("Enumeration[][]",
301: "java.util.Enumeration[][]");
302: ABBREVIATIONS.put("EventListener[][]",
303: "java.util.EventListener[][]");
304: ABBREVIATIONS.put("Iterator[][]", "java.util.Iterator[][]");
305: ABBREVIATIONS.put("List[][]", "java.util.List[][]");
306: ABBREVIATIONS.put("ListIterator[][]",
307: "java.util.ListIterator[][]");
308: ABBREVIATIONS.put("Map[][]", "java.util.Map[][]");
309: ABBREVIATIONS.put("Map.Entry[][]", "java.util.Map.Entry[][]");
310: ABBREVIATIONS.put("Observer[][]", "java.util.Observer[][]");
311: ABBREVIATIONS.put("RandomAccess[][]",
312: "java.util.RandomAccess[][]");
313: ABBREVIATIONS.put("Set[][]", "java.util.Set[][]");
314: ABBREVIATIONS.put("SortedMap[][]", "java.util.SortedMap[][]");
315: ABBREVIATIONS.put("SortedSet[][]", "java.util.SortedSet[][]");
316: ABBREVIATIONS.put("AbstractCollection[][]",
317: "java.util.AbstractCollection[][]");
318: ABBREVIATIONS.put("AbstractList[][]",
319: "java.util.AbstractList[][]");
320: ABBREVIATIONS.put("AbstractMap[][]",
321: "java.util.AbstractMap[][]");
322: ABBREVIATIONS.put("AbstractSequentialList [][]",
323: "java.util.AbstractSequentialList[][]");
324: ABBREVIATIONS.put("AbstractSet[][]",
325: "java.util.AbstractSet[][]");
326: ABBREVIATIONS.put("ArrayList[][]", "java.util.ArrayList[][]");
327: ABBREVIATIONS.put("Arrays[][]", "java.util.Arrays[][]");
328: ABBREVIATIONS.put("BitSet[][]", "java.util.BitSet[][]");
329: ABBREVIATIONS.put("Calendar[][]", "java.util.Calendar[][]");
330: ABBREVIATIONS.put("Collections[][]",
331: "java.util.Collections[][]");
332: ABBREVIATIONS.put("Currency[][]", "java.util.Currency[][]");
333: ABBREVIATIONS.put("Date[][]", "java.util.Date[][]");
334: ABBREVIATIONS.put("Dictionary[][]", "java.util.Dictionary[][]");
335: ABBREVIATIONS.put("EventListenerProxy[][]",
336: "java.util.EventListenerProxy[][]");
337: ABBREVIATIONS.put("EventObject[][]",
338: "java.util.EventObject[][]");
339: ABBREVIATIONS.put("GregorianCalender[][]",
340: "java.util.GregorianCalender[][]");
341: ABBREVIATIONS.put("HashMap[][]", "java.util.HashMap[][]");
342: ABBREVIATIONS.put("HashSet[][]", "java.util.HashSet[][]");
343: ABBREVIATIONS.put("Hashtable[][]", "java.util.Hashtable[][]");
344: ABBREVIATIONS.put("IdentityHashMap[][]",
345: "java.util.IdentityHashMap[][]");
346: ABBREVIATIONS.put("LinkedHashMap[][]",
347: "java.util.LinkedHashMap[][]");
348: ABBREVIATIONS.put("LinkedHashSet[][]",
349: "java.util.LinkedHashSet[][]");
350: ABBREVIATIONS.put("LinkedList[][]", "java.util.LinkedList[][]");
351: ABBREVIATIONS.put("ListResourceBundle[][]",
352: "java.util.ListResourceBundle[][]");
353: ABBREVIATIONS.put("Locale[][]", "java.util.Locale[][]");
354: ABBREVIATIONS.put("Observable[][]", "java.util.Observable[][]");
355: ABBREVIATIONS.put("Properties[][]", "java.util.Properties[][]");
356: ABBREVIATIONS.put("PropertyPermission[][]",
357: "java.util.PropertyPermission[][]");
358: ABBREVIATIONS.put("PropertyResourceBundle[][]",
359: "java.util.PropertyResourceBundle[][]");
360: ABBREVIATIONS.put("Random[][]", "java.util.Random[][]");
361: ABBREVIATIONS.put("ResourceBundle[][]",
362: "java.util.ResourceBundle[][]");
363: ABBREVIATIONS.put("SimpleTimeZone[][]",
364: "java.util.SimpleTimeZone[][]");
365: ABBREVIATIONS.put("Stack[][]", "java.util.Stack[][]");
366: ABBREVIATIONS.put("StringTokenizer[][]",
367: "java.util.StringTokenizer[][]");
368: ABBREVIATIONS.put("Timer[][]", "java.util.Timer[][]");
369: ABBREVIATIONS.put("TimerTask[][]", "java.util.TimerTask[][]");
370: ABBREVIATIONS.put("TimeZone[][]", "java.util.TimeZone[][]");
371: ABBREVIATIONS.put("TreeMap[][]", "java.util.TreeMap[][]");
372: ABBREVIATIONS.put("TreeSet[][]", "java.util.TreeSet[][]");
373: ABBREVIATIONS.put("Vector[][]", "java.util.Vector[][]");
374: ABBREVIATIONS.put("WeakHashMap[][]",
375: "java.util.WeakHashMap[][]");
376: }
377:
378: /**
379: * Compiles and returns a new type pattern.
380: *
381: * @param pattern the full pattern as a string
382: * @param subtypePatternType the subtype pattern type
383: * @return the pattern
384: */
385: public static TypePattern compileTypePattern(final String pattern,
386: final SubtypePatternType subtypePatternType) {
387: return new TypePattern(pattern, subtypePatternType);
388: }
389:
390: /**
391: * Compiles and returns a new name pattern.
392: *
393: * @param pattern the full pattern as a string
394: * @return the pattern
395: */
396: public static NamePattern compileNamePattern(final String pattern) {
397: return new NamePattern(pattern);
398: }
399: }
|