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

« back to all changes in this revision

Viewing changes to org.aspectj/modules/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/CompactTypeStructureRepresentation.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:
20
20
import org.aspectj.org.eclipse.jdt.internal.compiler.env.IBinaryType;
21
21
 
22
22
/**
23
 
 * Used to determine if a type has structurally changed during incremental
24
 
 * compilation.  At the end of compilation we create one of these objects
25
 
 * using the bytes for the class about to be woven.  On a subsequent
26
 
 * incremental compile we compare the new form of the class with a previously
27
 
 * stored CompactTypeStructureRepresentation instance.  A structural change
28
 
 * will indicate we need to do recompile other dependent types.
 
23
 * Used to determine if a type has structurally changed during incremental compilation. At the end of compilation we create one of
 
24
 * these objects using the bytes for the class about to be woven. On a subsequent incremental compile we compare the new form of the
 
25
 * class with a previously stored CompactTypeStructureRepresentation instance. A structural change will indicate we need to do
 
26
 * recompile other dependent types.
29
27
 */
30
28
public class CompactTypeStructureRepresentation implements IBinaryType {
31
 
                static char[][] NoInterface = CharOperation.NO_CHAR_CHAR;
32
 
                static IBinaryNestedType[] NoNestedType = new IBinaryNestedType[0];
33
 
                static IBinaryField[] NoField = new IBinaryField[0];
34
 
                static IBinaryMethod[] NoMethod = new IBinaryMethod[0];
35
 
        
36
 
            // this is the core state for comparison
37
 
                char[] className;
38
 
                int modifiers;
39
 
                char[] genericSignature;
40
 
                char[] superclassName;
41
 
                char[][] interfaces;
42
 
 
43
 
                // this is the extra state that enables us to be an IBinaryType
44
 
                char[] enclosingTypeName;
45
 
                boolean isLocal, isAnonymous, isMember;
46
 
                char[] sourceFileName;
47
 
                char[] fileName;
48
 
                char[] sourceName;
49
 
                long tagBits;
50
 
                boolean isBinaryType;
51
 
                IBinaryField[] binFields;
52
 
                IBinaryMethod[] binMethods;
53
 
                IBinaryNestedType[] memberTypes;
54
 
                IBinaryAnnotation[] annotations;
55
 
                
56
 
                public CompactTypeStructureRepresentation(ClassFileReader cfr) {
57
 
                        
58
 
                        this.enclosingTypeName = cfr.getEnclosingTypeName();
59
 
                        this.isLocal = cfr.isLocal();
60
 
                        this.isAnonymous = cfr.isAnonymous();
61
 
                        this.isMember = cfr.isMember();
62
 
                        this.sourceFileName = cfr.sourceFileName();
63
 
                        this.fileName = cfr.getFileName();
64
 
                        this.tagBits = cfr.getTagBits();
65
 
                        this.isBinaryType = cfr.isBinaryType();
66
 
                        this.binFields = cfr.getFields(); if (binFields==null) binFields = NoField;
67
 
                        this.binMethods = cfr.getMethods();if (binMethods==null) binMethods = NoMethod;
68
 
                        this.memberTypes = cfr.getMemberTypes();
69
 
                        this.annotations = cfr.getAnnotations();
70
 
                        this.sourceName = cfr.getSourceName();
71
 
                        this.className = cfr.getName();  // slashes...
72
 
                        this.modifiers = cfr.getModifiers();
73
 
                        this.genericSignature = cfr.getGenericSignature();
74
 
//                      if (this.genericSignature.length == 0) {
75
 
//                              this.genericSignature = null;
76
 
//                      }
77
 
                        this.superclassName = cfr.getSuperclassName(); // slashes...
78
 
                        interfaces = cfr.getInterfaceNames();
79
 
 
80
 
                }
81
 
 
82
 
                public char[] getEnclosingTypeName() {
83
 
                        return enclosingTypeName;
84
 
                }
85
 
                
86
 
                public int getModifiers() {
87
 
                        return modifiers;
88
 
                }
89
 
 
90
 
                public char[] getGenericSignature() {
91
 
                        return genericSignature;
92
 
                }
93
 
 
94
 
                public char[][] getInterfaceNames() {
95
 
                        return interfaces;
96
 
                }
97
 
 
98
 
                public boolean isAnonymous() {
99
 
                        return isAnonymous;
100
 
                }
101
 
 
102
 
                public char[] sourceFileName() {
103
 
                        return sourceFileName;
104
 
                }
105
 
 
106
 
                public boolean isLocal() {
107
 
                        return isLocal;
108
 
                }
109
 
 
110
 
                public boolean isMember() {
111
 
                        return isMember;
112
 
                }
113
 
                
114
 
                public char[] getSuperclassName() {
115
 
                        return superclassName;
116
 
                }
117
 
                
118
 
                public char[] getFileName() {
119
 
                        return fileName;
120
 
                }
121
 
 
122
 
                public char[] getName() {
123
 
                        return className;
124
 
                }
125
 
                
126
 
                public long getTagBits() {
127
 
                        return tagBits;
128
 
                }
129
 
 
130
 
                public boolean isBinaryType() {
131
 
                        return isBinaryType;
132
 
                }
133
 
                
134
 
                public IBinaryField[] getFields() {
135
 
                        return binFields;
136
 
                }
137
 
                
138
 
                public IBinaryMethod[] getMethods() {
139
 
                        return binMethods;
140
 
                }
141
 
                
142
 
                public IBinaryNestedType[] getMemberTypes() {
143
 
                        return memberTypes;
144
 
                }
145
 
 
146
 
                public IBinaryAnnotation[] getAnnotations() {
147
 
                        return annotations;
148
 
                }
149
 
 
150
 
                public char[] getSourceName() {
151
 
                        return sourceName;
152
 
                }
153
 
 
 
29
        static char[][] NoInterface = CharOperation.NO_CHAR_CHAR;
 
30
        static IBinaryNestedType[] NoNestedType = new IBinaryNestedType[0];
 
31
        static IBinaryField[] NoField = new IBinaryField[0];
 
32
        static IBinaryMethod[] NoMethod = new IBinaryMethod[0];
 
33
 
 
34
        // this is the core state for comparison
 
35
        char[] className;
 
36
        int modifiers;
 
37
        char[] genericSignature;
 
38
        char[] superclassName;
 
39
        char[][] interfaces;
 
40
 
 
41
        // this is the extra state that enables us to be an IBinaryType
 
42
        char[] enclosingTypeName;
 
43
        boolean isLocal, isAnonymous, isMember;
 
44
        char[] sourceFileName;
 
45
        char[] fileName;
 
46
        char[] sourceName;
 
47
        long tagBits;
 
48
        boolean isBinaryType;
 
49
        IBinaryField[] binFields;
 
50
        IBinaryMethod[] binMethods;
 
51
        IBinaryNestedType[] memberTypes;
 
52
        IBinaryAnnotation[] annotations;
 
53
 
 
54
        public CompactTypeStructureRepresentation(ClassFileReader cfr) {
 
55
 
 
56
                this.enclosingTypeName = cfr.getEnclosingTypeName();
 
57
                this.isLocal = cfr.isLocal();
 
58
                this.isAnonymous = cfr.isAnonymous();
 
59
                this.isMember = cfr.isMember();
 
60
                this.sourceFileName = cfr.sourceFileName();
 
61
                this.fileName = cfr.getFileName();
 
62
                this.tagBits = cfr.getTagBits();
 
63
                this.isBinaryType = cfr.isBinaryType();
 
64
                this.binFields = cfr.getFields();
 
65
                if (binFields == null) {
 
66
                        binFields = NoField;
 
67
                }
 
68
                this.binMethods = cfr.getMethods();
 
69
                if (binMethods == null) {
 
70
                        binMethods = NoMethod;
 
71
                }
 
72
                this.memberTypes = cfr.getMemberTypes(true);
 
73
                this.annotations = cfr.getAnnotations();
 
74
                this.sourceName = cfr.getSourceName();
 
75
                this.className = cfr.getName(); // slashes...
 
76
                this.modifiers = cfr.getModifiers();
 
77
                this.genericSignature = cfr.getGenericSignature();
 
78
                // if (this.genericSignature.length == 0) {
 
79
                // this.genericSignature = null;
 
80
                // }
 
81
                this.superclassName = cfr.getSuperclassName(); // slashes...
 
82
                interfaces = cfr.getInterfaceNames();
 
83
 
 
84
        }
 
85
 
 
86
        public char[] getEnclosingTypeName() {
 
87
                return enclosingTypeName;
 
88
        }
 
89
 
 
90
        public int getModifiers() {
 
91
                return modifiers;
 
92
        }
 
93
 
 
94
        public char[] getGenericSignature() {
 
95
                return genericSignature;
 
96
        }
 
97
 
 
98
        public char[][] getInterfaceNames() {
 
99
                return interfaces;
 
100
        }
 
101
 
 
102
        public boolean isAnonymous() {
 
103
                return isAnonymous;
 
104
        }
 
105
 
 
106
        public char[] sourceFileName() {
 
107
                return sourceFileName;
 
108
        }
 
109
 
 
110
        public boolean isLocal() {
 
111
                return isLocal;
 
112
        }
 
113
 
 
114
        public boolean isMember() {
 
115
                return isMember;
 
116
        }
 
117
 
 
118
        public char[] getSuperclassName() {
 
119
                return superclassName;
 
120
        }
 
121
 
 
122
        public char[] getFileName() {
 
123
                return fileName;
 
124
        }
 
125
 
 
126
        public char[] getName() {
 
127
                return className;
 
128
        }
 
129
 
 
130
        public long getTagBits() {
 
131
                return tagBits;
 
132
        }
 
133
 
 
134
        public boolean isBinaryType() {
 
135
                return isBinaryType;
 
136
        }
 
137
 
 
138
        public IBinaryField[] getFields() {
 
139
                return binFields;
 
140
        }
 
141
 
 
142
        public IBinaryMethod[] getMethods() {
 
143
                return binMethods;
 
144
        }
 
145
 
 
146
        public IBinaryNestedType[] getMemberTypes() {
 
147
                return memberTypes;
 
148
        }
 
149
 
 
150
        public IBinaryAnnotation[] getAnnotations() {
 
151
                return annotations;
 
152
        }
 
153
 
 
154
        public char[] getSourceName() {
 
155
                return sourceName;
 
156
        }
154
157
 
155
158
}
 
 
b'\\ No newline at end of file'