View Javadoc

    1   /***************************************************************************************
    2    * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved.                 *
    3    * http://aspectwerkz.codehaus.org                                                    *
    4    * ---------------------------------------------------------------------------------- *
    5    * The software in this package is published under the terms of the LGPL license      *
    6    * a copy of which has been included with this distribution in the license.txt file.  *
    7    **************************************************************************************/
    8   package org.codehaus.aspectwerkz.expression.regexp;
    9
    10  import org.codehaus.aspectwerkz.expression.SubtypePatternType;
    11
    12  import java.io.Serializable;
    13  import java.util.HashMap;
    14  import java.util.Map;
    15
    16  /***
    17   * Implements an abstract regular expression pattern matcher for AspectWerkz.
    18   *
    19   * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
    20   */
    21  public abstract class Pattern implements Serializable {
    22      /***
    23       * Defines a single wildcard.
    24       */
    25      public static final String REGULAR_WILDCARD = "*";
    26
    27      /***
    28       * Defines a multiple wildcard.
    29       */
    30      public static final String EAGER_WILDCARD = "..";
    31
    32      /***
    33       * Abbreviations for all the classes in the java.lang.* and the java.util.* namespaces.
    34       */
    35      public static final Map ABBREVIATIONS = new HashMap();
    36
    37      static {
    38          // TODO: update for Java 1.5?
    39          // abbreviations used in XML def advice name
    40          ABBREVIATIONS.put("JoinPoint", "org.codehaus.aspectwerkz.joinpoint.JoinPoint");
    41          ABBREVIATIONS.put("StaticJoinPoint", "org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint");
    42          ABBREVIATIONS.put("Rtti", "org.codehaus.aspectwerkz.joinpoint.Rtti");
    43          // java.lang.*
    44          ABBREVIATIONS.put("CharSequence", "java.lang.CharSequence");
    45          ABBREVIATIONS.put("Cloneable", "java.lang.Cloneable");
    46          ABBREVIATIONS.put("Comparable", "java.lang.Comparable");
    47          ABBREVIATIONS.put("Runnable", "java.lang.Runnable");
    48          ABBREVIATIONS.put("Boolean", "java.lang.Boolean");
    49          ABBREVIATIONS.put("Byte", "java.lang.Byte");
    50          ABBREVIATIONS.put("Character", "java.lang.Character");
    51          ABBREVIATIONS.put("Class", "java.lang.Class");
    52          ABBREVIATIONS.put("ClassLoader", "java.lang.ClassLoader");
    53          ABBREVIATIONS.put("Compiler", "java.lang.Compiler");
    54          ABBREVIATIONS.put("Double", "java.lang.Double");
    55          ABBREVIATIONS.put("Float", "java.lang.Float");
    56          ABBREVIATIONS.put("InheritableThreadLocal", "java.lang.InheritableThreadLocal");
    57          ABBREVIATIONS.put("Integer", "java.lang.Integer");
    58          ABBREVIATIONS.put("Long", "java.lang.Long");
    59          ABBREVIATIONS.put("Math", "java.lang.Math");
    60          ABBREVIATIONS.put("Number", "java.lang.Number");
    61          ABBREVIATIONS.put("Object", "java.lang.Object");
    62          ABBREVIATIONS.put("Package", "java.lang.Package");
    63          ABBREVIATIONS.put("Process", "java.lang.Process");
    64          ABBREVIATIONS.put("Runtime", "java.lang.Runtime");
    65          ABBREVIATIONS.put("RuntimePermission", "java.lang.RuntimePermission");
    66          ABBREVIATIONS.put("SecurityManager", "java.lang.SecurityManager");
    67          ABBREVIATIONS.put("Short", "java.lang.Short");
    68          ABBREVIATIONS.put("StackTraceElement", "java.lang.StackTraceElement");
    69          ABBREVIATIONS.put("StrictMath", "java.lang.StrictMath");
    70          ABBREVIATIONS.put("String", "java.lang.String");
    71          ABBREVIATIONS.put("StringBuffer", "java.lang.StringBuffer");
    72          ABBREVIATIONS.put("System", "java.lang.System");
    73          ABBREVIATIONS.put("Thread", "java.lang.Thread");
    74          ABBREVIATIONS.put("ThreadGroup", "java.lang.ThreadGroup");
    75          ABBREVIATIONS.put("ThreadLocal", "java.lang.ThreadLocal");
    76          ABBREVIATIONS.put("Throwable", "java.lang.Throwable");
    77          ABBREVIATIONS.put("Exception", "java.lang.Exception");
    78          ABBREVIATIONS.put("Void", "java.lang.Void");
    79          ABBREVIATIONS.put("CharSequence[]", "java.lang.CharSequence[][]");
    80          ABBREVIATIONS.put("Cloneable[]", "java.lang.Cloneable[]");
    81          ABBREVIATIONS.put("Comparable[]", "java.lang.Comparable[]");
    82          ABBREVIATIONS.put("Runnable[]", "java.lang.Runnable[]");
    83          ABBREVIATIONS.put("Boolean[]", "java.lang.Boolean[]");
    84          ABBREVIATIONS.put("Byte[]", "java.lang.Byte[]");
    85          ABBREVIATIONS.put("Character[]", "java.lang.Character[]");
    86          ABBREVIATIONS.put("Class[]", "java.lang.Class[]");
    87          ABBREVIATIONS.put("ClassLoader[]", "java.lang.ClassLoader[]");
    88          ABBREVIATIONS.put("Compiler[]", "java.lang.Compiler[]");
    89          ABBREVIATIONS.put("Double[]", "java.lang.Double[]");
    90          ABBREVIATIONS.put("Float[]", "java.lang.Float[]");
    91          ABBREVIATIONS.put("InheritableThreadLocal[]", "java.lang.InheritableThreadLocal[]");
    92          ABBREVIATIONS.put("Integer[]", "java.lang.Integer[]");
    93          ABBREVIATIONS.put("Long[]", "java.lang.Long[]");
    94          ABBREVIATIONS.put("Math[]", "java.lang.Math[]");
    95          ABBREVIATIONS.put("Number[]", "java.lang.Number[]");
    96          ABBREVIATIONS.put("Object[]", "java.lang.Object[]");
    97          ABBREVIATIONS.put("Package[]", "java.lang.Package[]");
    98          ABBREVIATIONS.put("Process[]", "java.lang.Process[]");
    99          ABBREVIATIONS.put("Runtime[]", "java.lang.Runtime[]");
    100         ABBREVIATIONS.put("RuntimePermission[]", "java.lang.RuntimePermission[]");
    101         ABBREVIATIONS.put("SecurityManager[]", "java.lang.SecurityManager[]");
    102         ABBREVIATIONS.put("Short[]", "java.lang.Short[]");
    103         ABBREVIATIONS.put("StackTraceElement[]", "java.lang.StackTraceElement[]");
    104         ABBREVIATIONS.put("StrictMath[]", "java.lang.StrictMath[]");
    105         ABBREVIATIONS.put("String[]", "java.lang.String[]");
    106         ABBREVIATIONS.put("StringBuffer[]", "java.lang.StringBuffer[]");
    107         ABBREVIATIONS.put("System[]", "java.lang.System[]");
    108         ABBREVIATIONS.put("Thread[]", "java.lang.Thread[]");
    109         ABBREVIATIONS.put("ThreadGroup[]", "java.lang.ThreadGroup[]");
    110         ABBREVIATIONS.put("ThreadLocal[]", "java.lang.ThreadLocal[]");
    111         ABBREVIATIONS.put("Throwable[]", "java.lang.Throwable[]");
    112         ABBREVIATIONS.put("Exception[]", "java.lang.Exception[]");
    113         ABBREVIATIONS.put("Void[]", "java.lang.Void[]");
    114         ABBREVIATIONS.put("CharSequence[][]", "java.lang.CharSequence[][]");
    115         ABBREVIATIONS.put("Cloneable[][]", "java.lang.Cloneable[][]");
    116         ABBREVIATIONS.put("Comparable[][]", "java.lang.Comparable[][]");
    117         ABBREVIATIONS.put("Runnable[][]", "java.lang.Runnable[][]");
    118         ABBREVIATIONS.put("Boolean[][]", "java.lang.Boolean[][]");
    119         ABBREVIATIONS.put("Byte[][]", "java.lang.Byte[][]");
    120         ABBREVIATIONS.put("Character[][]", "java.lang.Character[][]");
    121         ABBREVIATIONS.put("Class[][]", "java.lang.Class[][]");
    122         ABBREVIATIONS.put("ClassLoader[][]", "java.lang.ClassLoader[][]");
    123         ABBREVIATIONS.put("Compiler[][]", "java.lang.Compiler[][]");
    124         ABBREVIATIONS.put("Double[][]", "java.lang.Double[][]");
    125         ABBREVIATIONS.put("Float[][]", "java.lang.Float[][]");
    126         ABBREVIATIONS.put("InheritableThreadLocal[][]", "java.lang.InheritableThreadLocal[][]");
    127         ABBREVIATIONS.put("Integer[][]", "java.lang.Integer[][]");
    128         ABBREVIATIONS.put("Long[][]", "java.lang.Long[][]");
    129         ABBREVIATIONS.put("Math[][]", "java.lang.Math[][]");
    130         ABBREVIATIONS.put("Number[][]", "java.lang.Number[][]");
    131         ABBREVIATIONS.put("Object[][]", "java.lang.Object[][]");
    132         ABBREVIATIONS.put("Package[][]", "java.lang.Package[][]");
    133         ABBREVIATIONS.put("Process[][]", "java.lang.Process[][]");
    134         ABBREVIATIONS.put("Runtime[][]", "java.lang.Runtime[][]");
    135         ABBREVIATIONS.put("RuntimePermission[][]", "java.lang.RuntimePermission[][]");
    136         ABBREVIATIONS.put("SecurityManager[][]", "java.lang.SecurityManager[][]");
    137         ABBREVIATIONS.put("Short[][]", "java.lang.Short[][]");
    138         ABBREVIATIONS.put("StackTraceElement[][]", "java.lang.StackTraceElement[][]");
    139         ABBREVIATIONS.put("StrictMath[][]", "java.lang.StrictMath[][]");
    140         ABBREVIATIONS.put("String[][]", "java.lang.String[][]");
    141         ABBREVIATIONS.put("StringBuffer[][]", "java.lang.StringBuffer[][]");
    142         ABBREVIATIONS.put("System[][]", "java.lang.System[][]");
    143         ABBREVIATIONS.put("Thread[][]", "java.lang.Thread[][]");
    144         ABBREVIATIONS.put("ThreadGroup[][]", "java.lang.ThreadGroup[][]");
    145         ABBREVIATIONS.put("ThreadLocal[][]", "java.lang.ThreadLocal[][]");
    146         ABBREVIATIONS.put("Throwable[][]", "java.lang.Throwable[][]");
    147         ABBREVIATIONS.put("Exception[][]", "java.lang.Exception[][]");
    148         ABBREVIATIONS.put("Void[][]", "java.lang.Void[][]");
    149         ABBREVIATIONS.put("Collection", "java.util.Collection");
    150         ABBREVIATIONS.put("Comparator", "java.util.Comparator");
    151         ABBREVIATIONS.put("Enumeration", "java.util.Enumeration");
    152         ABBREVIATIONS.put("EventListener", "java.util.EventListener");
    153         ABBREVIATIONS.put("Iterator", "java.util.Iterator");
    154         ABBREVIATIONS.put("List", "java.util.List");
    155         ABBREVIATIONS.put("ListIterator", "java.util.ListIterator");
    156         ABBREVIATIONS.put("Map", "java.util.Map");
    157         ABBREVIATIONS.put("Map.Entry", "java.util.Map.Entry");
    158         ABBREVIATIONS.put("Observer", "java.util.Observer");
    159         ABBREVIATIONS.put("RandomAccess", "java.util.RandomAccess");
    160         ABBREVIATIONS.put("Set", "java.util.Set");
    161         ABBREVIATIONS.put("SortedMap", "java.util.SortedMap");
    162         ABBREVIATIONS.put("SortedSet", "java.util.SortedSet");
    163         ABBREVIATIONS.put("AbstractCollection", "java.util.AbstractCollection");
    164         ABBREVIATIONS.put("AbstractList", "java.util.AbstractList");
    165         ABBREVIATIONS.put("AbstractMap", "java.util.AbstractMap");
    166         ABBREVIATIONS.put("AbstractSequentialList ", "java.util.AbstractSequentialList");
    167         ABBREVIATIONS.put("AbstractSet", "java.util.AbstractSet");
    168         ABBREVIATIONS.put("ArrayList", "java.util.ArrayList");
    169         ABBREVIATIONS.put("Arrays", "java.util.Arrays");
    170         ABBREVIATIONS.put("BitSet", "java.util.BitSet");
    171         ABBREVIATIONS.put("Calendar", "java.util.Calendar");
    172         ABBREVIATIONS.put("Collections", "java.util.Collections");
    173         ABBREVIATIONS.put("Currency", "java.util.Currency");
    174         ABBREVIATIONS.put("Date", "java.util.Date");
    175         ABBREVIATIONS.put("Dictionary", "java.util.Dictionary");
    176         ABBREVIATIONS.put("EventListenerProxy", "java.util.EventListenerProxy");
    177         ABBREVIATIONS.put("EventObject", "java.util.EventObject");
    178         ABBREVIATIONS.put("GregorianCalender", "java.util.GregorianCalender");
    179         ABBREVIATIONS.put("HashMap", "java.util.HashMap");
    180         ABBREVIATIONS.put("HashSet", "java.util.HashSet");
    181         ABBREVIATIONS.put("Hashtable", "java.util.Hashtable");
    182         ABBREVIATIONS.put("IdentityHashMap", "java.util.IdentityHashMap");
    183         ABBREVIATIONS.put("LinkedHashMap", "java.util.LinkedHashMap");
    184         ABBREVIATIONS.put("LinkedHashSet", "java.util.LinkedHashSet");
    185         ABBREVIATIONS.put("LinkedList", "java.util.LinkedList");
    186         ABBREVIATIONS.put("ListResourceBundle", "java.util.ListResourceBundle");
    187         ABBREVIATIONS.put("Locale", "java.util.Locale");
    188         ABBREVIATIONS.put("Observable", "java.util.Observable");
    189         ABBREVIATIONS.put("Properties", "java.util.Properties");
    190         ABBREVIATIONS.put("PropertyPermission", "java.util.PropertyPermission");
    191         ABBREVIATIONS.put("PropertyResourceBundle", "java.util.PropertyResourceBundle");
    192         ABBREVIATIONS.put("Random", "java.util.Random");
    193         ABBREVIATIONS.put("ResourceBundle", "java.util.ResourceBundle");
    194         ABBREVIATIONS.put("SimpleTimeZone", "java.util.SimpleTimeZone");
    195         ABBREVIATIONS.put("Stack", "java.util.Stack");
    196         ABBREVIATIONS.put("StringTokenizer", "java.util.StringTokenizer");
    197         ABBREVIATIONS.put("Timer", "java.util.Timer");
    198         ABBREVIATIONS.put("TimerTask", "java.util.TimerTask");
    199         ABBREVIATIONS.put("TimeZone", "java.util.TimeZone");
    200         ABBREVIATIONS.put("TreeMap", "java.util.TreeMap");
    201         ABBREVIATIONS.put("TreeSet", "java.util.TreeSet");
    202         ABBREVIATIONS.put("Vector", "java.util.Vector");
    203         ABBREVIATIONS.put("WeakHashMap", "java.util.WeakHashMap");
    204         ABBREVIATIONS.put("Collection[]", "java.util.Collection[]");
    205         ABBREVIATIONS.put("Comparator[]", "java.util.Comparator[]");
    206         ABBREVIATIONS.put("Enumeration[]", "java.util.Enumeration[]");
    207         ABBREVIATIONS.put("EventListener[]", "java.util.EventListener[]");
    208         ABBREVIATIONS.put("Iterator[]", "java.util.Iterator[]");
    209         ABBREVIATIONS.put("List[]", "java.util.List[]");
    210         ABBREVIATIONS.put("ListIterator[]", "java.util.ListIterator[]");
    211         ABBREVIATIONS.put("Map[]", "java.util.Map[]");
    212         ABBREVIATIONS.put("Map.Entry[]", "java.util.Map.Entry[]");
    213         ABBREVIATIONS.put("Observer[]", "java.util.Observer[]");
    214         ABBREVIATIONS.put("RandomAccess[]", "java.util.RandomAccess[]");
    215         ABBREVIATIONS.put("Set[]", "java.util.Set[]");
    216         ABBREVIATIONS.put("SortedMap[]", "java.util.SortedMap[]");
    217         ABBREVIATIONS.put("SortedSet[]", "java.util.SortedSet[]");
    218         ABBREVIATIONS.put("AbstractCollection[]", "java.util.AbstractCollection[]");
    219         ABBREVIATIONS.put("AbstractList[]", "java.util.AbstractList[]");
    220         ABBREVIATIONS.put("AbstractMap[]", "java.util.AbstractMap[]");
    221         ABBREVIATIONS.put("AbstractSequentialList []", "java.util.AbstractSequentialList[]");
    222         ABBREVIATIONS.put("AbstractSet[]", "java.util.AbstractSet[]");
    223         ABBREVIATIONS.put("ArrayList[]", "java.util.ArrayList[]");
    224         ABBREVIATIONS.put("Arrays[]", "java.util.Arrays[]");
    225         ABBREVIATIONS.put("BitSet[]", "java.util.BitSet[]");
    226         ABBREVIATIONS.put("Calendar[]", "java.util.Calendar[]");
    227         ABBREVIATIONS.put("Collections[]", "java.util.Collections[]");
    228         ABBREVIATIONS.put("Currency[]", "java.util.Currency[]");
    229         ABBREVIATIONS.put("Date[]", "java.util.Date[]");
    230         ABBREVIATIONS.put("Dictionary[]", "java.util.Dictionary[]");
    231         ABBREVIATIONS.put("EventListenerProxy[]", "java.util.EventListenerProxy[]");
    232         ABBREVIATIONS.put("EventObject[]", "java.util.EventObject[]");
    233         ABBREVIATIONS.put("GregorianCalender[]", "java.util.GregorianCalender[]");
    234         ABBREVIATIONS.put("HashMap[]", "java.util.HashMap[]");
    235         ABBREVIATIONS.put("HashSet[]", "java.util.HashSet[]");
    236         ABBREVIATIONS.put("Hashtable[]", "java.util.Hashtable[]");
    237         ABBREVIATIONS.put("IdentityHashMap[]", "java.util.IdentityHashMap[]");
    238         ABBREVIATIONS.put("LinkedHashMap[]", "java.util.LinkedHashMap[]");
    239         ABBREVIATIONS.put("LinkedHashSet[]", "java.util.LinkedHashSet[]");
    240         ABBREVIATIONS.put("LinkedList[]", "java.util.LinkedList[]");
    241         ABBREVIATIONS.put("ListResourceBundle[]", "java.util.ListResourceBundle[]");
    242         ABBREVIATIONS.put("Locale[]", "java.util.Locale[]");
    243         ABBREVIATIONS.put("Observable[]", "java.util.Observable[]");
    244         ABBREVIATIONS.put("Properties[]", "java.util.Properties[]");
    245         ABBREVIATIONS.put("PropertyPermission[]", "java.util.PropertyPermission[]");
    246         ABBREVIATIONS.put("PropertyResourceBundle[]", "java.util.PropertyResourceBundle[]");
    247         ABBREVIATIONS.put("Random[]", "java.util.Random[]");
    248         ABBREVIATIONS.put("ResourceBundle[]", "java.util.ResourceBundle[]");
    249         ABBREVIATIONS.put("SimpleTimeZone[]", "java.util.SimpleTimeZone[]");
    250         ABBREVIATIONS.put("Stack[]", "java.util.Stack[]");
    251         ABBREVIATIONS.put("StringTokenizer[]", "java.util.StringTokenizer[]");
    252         ABBREVIATIONS.put("Timer[]", "java.util.Timer[]");
    253         ABBREVIATIONS.put("TimerTask[]", "java.util.TimerTask[]");
    254         ABBREVIATIONS.put("TimeZone[]", "java.util.TimeZone[]");
    255         ABBREVIATIONS.put("TreeMap[]", "java.util.TreeMap[]");
    256         ABBREVIATIONS.put("TreeSet[]", "java.util.TreeSet[]");
    257         ABBREVIATIONS.put("Vector[]", "java.util.Vector[]");
    258         ABBREVIATIONS.put("WeakHashMap[]", "java.util.WeakHashMap[]");
    259         ABBREVIATIONS.put("Collection[][]", "java.util.Collection[][]");
    260         ABBREVIATIONS.put("Comparator[][]", "java.util.Comparator[][]");
    261         ABBREVIATIONS.put("Enumeration[][]", "java.util.Enumeration[][]");
    262         ABBREVIATIONS.put("EventListener[][]", "java.util.EventListener[][]");
    263         ABBREVIATIONS.put("Iterator[][]", "java.util.Iterator[][]");
    264         ABBREVIATIONS.put("List[][]", "java.util.List[][]");
    265         ABBREVIATIONS.put("ListIterator[][]", "java.util.ListIterator[][]");
    266         ABBREVIATIONS.put("Map[][]", "java.util.Map[][]");
    267         ABBREVIATIONS.put("Map.Entry[][]", "java.util.Map.Entry[][]");
    268         ABBREVIATIONS.put("Observer[][]", "java.util.Observer[][]");
    269         ABBREVIATIONS.put("RandomAccess[][]", "java.util.RandomAccess[][]");
    270         ABBREVIATIONS.put("Set[][]", "java.util.Set[][]");
    271         ABBREVIATIONS.put("SortedMap[][]", "java.util.SortedMap[][]");
    272         ABBREVIATIONS.put("SortedSet[][]", "java.util.SortedSet[][]");
    273         ABBREVIATIONS.put("AbstractCollection[][]", "java.util.AbstractCollection[][]");
    274         ABBREVIATIONS.put("AbstractList[][]", "java.util.AbstractList[][]");
    275         ABBREVIATIONS.put("AbstractMap[][]", "java.util.AbstractMap[][]");
    276         ABBREVIATIONS.put("AbstractSequentialList [][]", "java.util.AbstractSequentialList[][]");
    277         ABBREVIATIONS.put("AbstractSet[][]", "java.util.AbstractSet[][]");
    278         ABBREVIATIONS.put("ArrayList[][]", "java.util.ArrayList[][]");
    279         ABBREVIATIONS.put("Arrays[][]", "java.util.Arrays[][]");
    280         ABBREVIATIONS.put("BitSet[][]", "java.util.BitSet[][]");
    281         ABBREVIATIONS.put("Calendar[][]", "java.util.Calendar[][]");
    282         ABBREVIATIONS.put("Collections[][]", "java.util.Collections[][]");
    283         ABBREVIATIONS.put("Currency[][]", "java.util.Currency[][]");
    284         ABBREVIATIONS.put("Date[][]", "java.util.Date[][]");
    285         ABBREVIATIONS.put("Dictionary[][]", "java.util.Dictionary[][]");
    286         ABBREVIATIONS.put("EventListenerProxy[][]", "java.util.EventListenerProxy[][]");
    287         ABBREVIATIONS.put("EventObject[][]", "java.util.EventObject[][]");
    288         ABBREVIATIONS.put("GregorianCalender[][]", "java.util.GregorianCalender[][]");
    289         ABBREVIATIONS.put("HashMap[][]", "java.util.HashMap[][]");
    290         ABBREVIATIONS.put("HashSet[][]", "java.util.HashSet[][]");
    291         ABBREVIATIONS.put("Hashtable[][]", "java.util.Hashtable[][]");
    292         ABBREVIATIONS.put("IdentityHashMap[][]", "java.util.IdentityHashMap[][]");
    293         ABBREVIATIONS.put("LinkedHashMap[][]", "java.util.LinkedHashMap[][]");
    294         ABBREVIATIONS.put("LinkedHashSet[][]", "java.util.LinkedHashSet[][]");
    295         ABBREVIATIONS.put("LinkedList[][]", "java.util.LinkedList[][]");
    296         ABBREVIATIONS.put("ListResourceBundle[][]", "java.util.ListResourceBundle[][]");
    297         ABBREVIATIONS.put("Locale[][]", "java.util.Locale[][]");
    298         ABBREVIATIONS.put("Observable[][]", "java.util.Observable[][]");
    299         ABBREVIATIONS.put("Properties[][]", "java.util.Properties[][]");
    300         ABBREVIATIONS.put("PropertyPermission[][]", "java.util.PropertyPermission[][]");
    301         ABBREVIATIONS.put("PropertyResourceBundle[][]", "java.util.PropertyResourceBundle[][]");
    302         ABBREVIATIONS.put("Random[][]", "java.util.Random[][]");
    303         ABBREVIATIONS.put("ResourceBundle[][]", "java.util.ResourceBundle[][]");
    304         ABBREVIATIONS.put("SimpleTimeZone[][]", "java.util.SimpleTimeZone[][]");
    305         ABBREVIATIONS.put("Stack[][]", "java.util.Stack[][]");
    306         ABBREVIATIONS.put("StringTokenizer[][]", "java.util.StringTokenizer[][]");
    307         ABBREVIATIONS.put("Timer[][]", "java.util.Timer[][]");
    308         ABBREVIATIONS.put("TimerTask[][]", "java.util.TimerTask[][]");
    309         ABBREVIATIONS.put("TimeZone[][]", "java.util.TimeZone[][]");
    310         ABBREVIATIONS.put("TreeMap[][]", "java.util.TreeMap[][]");
    311         ABBREVIATIONS.put("TreeSet[][]", "java.util.TreeSet[][]");
    312         ABBREVIATIONS.put("Vector[][]", "java.util.Vector[][]");
    313         ABBREVIATIONS.put("WeakHashMap[][]", "java.util.WeakHashMap[][]");
    314     }
    315
    316     /***
    317      * Compiles and returns a new type pattern.
    318      *
    319      * @param pattern            the full pattern as a string
    320      * @param subtypePatternType the subtype pattern type
    321      * @return the pattern
    322      */
    323     public static TypePattern compileTypePattern(final String pattern, final SubtypePatternType subtypePatternType) {
    324         return new TypePattern(pattern, subtypePatternType);
    325     }
    326
    327     /***
    328      * Compiles and returns a new name pattern.
    329      *
    330      * @param pattern the full pattern as a string
    331      * @return the pattern
    332      */
    333     public static NamePattern compileNamePattern(final String pattern) {
    334         return new NamePattern(pattern);
    335     }
    336 }