~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/compiler/ast/IntertypeMemberClassDeclaration.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:
11
11
 * ******************************************************************/
12
12
package org.aspectj.ajdt.internal.compiler.ast;
13
13
 
 
14
import java.lang.reflect.Field;
14
15
import java.lang.reflect.Modifier;
15
16
import java.util.Collections;
16
17
 
18
19
import org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceLocation;
19
20
import org.aspectj.ajdt.internal.compiler.lookup.EclipseTypeMunger;
20
21
import org.aspectj.ajdt.internal.compiler.lookup.InterTypeScope;
 
22
import org.aspectj.org.eclipse.jdt.core.compiler.CharOperation;
21
23
import org.aspectj.org.eclipse.jdt.internal.compiler.ClassFile;
22
24
import org.aspectj.org.eclipse.jdt.internal.compiler.CompilationResult;
 
25
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode;
23
26
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration;
24
27
import org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeReference;
25
28
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BlockScope;
26
29
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ClassScope;
27
30
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope;
 
31
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.NestedTypeBinding;
28
32
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding;
 
33
import org.aspectj.org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding;
29
34
import org.aspectj.weaver.AjAttribute;
30
35
import org.aspectj.weaver.NewMemberClassTypeMunger;
31
36
import org.aspectj.weaver.ResolvedType;
62
67
                ensureScopeSetup();
63
68
                super.resolve(aspectScope);
64
69
        }
65
 
 
 
70
        /**
 
71
         * Bytecode generation for a member inner type
 
72
         */
 
73
        /*
 
74
        public void generateCode(ClassScope classScope, ClassFile enclosingClassFile) {
 
75
                if ((this.bits & ASTNode.HasBeenGenerated) != 0) {
 
76
                        return;
 
77
                }
 
78
                try {
 
79
                        Field f = ReferenceBinding.class.getDeclaredField("constantPoolName");
 
80
                        char[] name = CharOperation.concat(onTypeResolvedBinding.constantPoolName(), binding.sourceName, '$');
 
81
                        f.setAccessible(true);
 
82
                        f.set(this.binding, name);
 
83
                } catch (Exception e) {
 
84
                        e.printStackTrace();
 
85
                }
 
86
                if (this.binding != null) {
 
87
                        ((NestedTypeBinding) this.binding).computeSyntheticArgumentSlotSizes();
 
88
                }
 
89
                generateCode(enclosingClassFile);
 
90
        }
 
91
*/
66
92
        @Override
67
93
        public void resolve() {
68
94
                super.resolve();
207
233
                if (!onTypeResolvedBinding.isValidBinding()) {
208
234
                        cuScope.problemReporter().invalidType(onType, onTypeResolvedBinding);
209
235
                        ignoreFurtherInvestigation = true;
 
236
                } else {
 
237
                        // fix up the ITD'd type?
 
238
                        ((NestedTypeBinding) this.binding).enclosingType = (SourceTypeBinding) onTypeResolvedBinding;
 
239
                        // this done at build type for the nested type now:
 
240
                        // ((NestedTypeBinding) this.binding).compoundName = CharOperation.splitOn('.', "Basic$_".toCharArray());
210
241
                }
211
242
        }
212
243
 
250
281
                ResolvedType aspectType = world.fromEclipse(classScope.referenceContext.binding);
251
282
                return new EclipseTypeMunger(world, newMemberClassTypeMunger, aspectType, null);
252
283
        }
 
284
 
 
285
        public char[] alternativeName() {
 
286
                return onType.getLastToken();
 
287
        }
253
288
}