~ubuntu-branches/ubuntu/wily/aspectj/wily-proposed

« back to all changes in this revision

Viewing changes to org.aspectj/modules/org.aspectj.matcher/src/org/aspectj/weaver/patterns/ModifiersPattern.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2011-03-15 23:54:31 UTC
  • mfrom: (1.2.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20110315235431-iq2gxbsx08kpwuiw
* New upstream release.
* Updated Standards-Version to 3.9.1 (no changes needed).
* Fix local Javadoc links:
  - d/patches/07_javadoc_links.diff: Use locally installed
   javadoc packages and hyperlink with them.
  - d/control: Add B-D on default-java-doc and libasm3-java-doc.
* d/control: Drop B-D on itself (our new bootstrap infrastructure doesn't need
  that anymore).
* Split packages into :
  - aspectj: only contains CLI tools.
  - libaspectj-java: JAR librairies for /usr/share/java.
  - libaspectj-java-doc: 4 API's Javadoc.
  - aspectj-doc: Programming Guides and SDK Documentation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
        public static final ModifiersPattern ANY = new ModifiersPattern(0, 0);
28
28
 
 
29
        private static Map<String, Integer> modifierFlags = null;
 
30
 
 
31
        static {
 
32
                modifierFlags = new HashMap<String, Integer>();
 
33
                int flag = 1;
 
34
                while (flag <= Modifier.STRICT) {
 
35
                        String flagName = Modifier.toString(flag);
 
36
                        modifierFlags.put(flagName, new Integer(flag));
 
37
                        flag = flag << 1;
 
38
                }
 
39
        }
 
40
 
29
41
        public ModifiersPattern(int requiredModifiers, int forbiddenModifiers) {
30
42
                this.requiredModifiers = requiredModifiers;
31
43
                this.forbiddenModifiers = forbiddenModifiers;
78
90
                s.writeShort(forbiddenModifiers);
79
91
        }
80
92
 
81
 
        private static Map modifierFlags = null;
82
 
 
83
93
        public static int getModifierFlag(String name) {
84
 
                if (modifierFlags == null) {
85
 
                        modifierFlags = new HashMap();
86
 
                        int flag = 1;
87
 
                        while (flag <= Modifier.STRICT) {
88
 
                                String flagName = Modifier.toString(flag);
89
 
                                modifierFlags.put(flagName, new Integer(flag));
90
 
                                flag = flag << 1;
91
 
                        }
92
 
                }
93
 
                Integer flag = (Integer) modifierFlags.get(name);
 
94
                Integer flag = modifierFlags.get(name);
94
95
                if (flag == null) {
95
96
                        return -1;
96
97
                }