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