~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/AsmElementFormatter.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:
116
116
                                                kindOfDP = "implements ";
117
117
                                                try {
118
118
                                                        ResolvedType rtx = tx.resolve(((AjLookupEnvironment) declare.scope.environment()).factory.getWorld());
119
 
                                                        if (!rtx.isInterface())
 
119
                                                        if (!rtx.isInterface()) {
120
120
                                                                kindOfDP = "extends ";
 
121
                                                        }
121
122
                                                } catch (Throwable t) {
122
123
                                                        // What can go wrong???? who knows!
123
124
                                                }
128
129
                                                typename = typename.substring(typename.lastIndexOf(".") + 1);
129
130
                                        }
130
131
                                        details.append(typename);
131
 
                                        if ((i + 1) < newParents.length)
 
132
                                        if ((i + 1) < newParents.length) {
132
133
                                                details.append(",");
 
134
                                        }
133
135
                                }
134
136
                                node.setDetails(kindOfDP + details.toString());
135
137
 
170
172
                        InterTypeDeclaration itd = (InterTypeDeclaration) methodDeclaration;
171
173
                        String fqname = itd.getOnType().toString();
172
174
                        if (fqname.indexOf(".") != -1) {
 
175
                                // TODO the string handling round here is embarrassing
 
176
                                node.addFullyQualifiedName(fqname + "." + new String(itd.getDeclaredSelector()));
173
177
                                fqname = fqname.substring(fqname.lastIndexOf(".") + 1);
174
178
                        }
175
179
                        String name = fqname + "." + new String(itd.getDeclaredSelector());
185
189
                                // StringBuffer argumentsSignature = new StringBuffer("fubar");
186
190
                                // argumentsSignature.append("(");
187
191
                                // if (methodDeclaration.arguments!=null && methodDeclaration.arguments.length>1) {
188
 
                                //              
 
192
                                //
189
193
                                // for (int i = 1;i<methodDeclaration.arguments.length;i++) {
190
194
                                // argumentsSignature.append(methodDeclaration.arguments[i]);
191
195
                                // if (i+1<methodDeclaration.arguments.length) argumentsSignature.append(",");
252
256
                String tpList = "";
253
257
                for (int i = 0; i < list.size(); i++) {
254
258
                        tpList += genTypePatternLabel(list.get(i));
255
 
                        if (i < list.size() - 1)
 
259
                        if (i < list.size() - 1) {
256
260
                                tpList += ", ";
 
261
                        }
257
262
                }
258
263
                return tpList;
259
264
        }
416
421
                        pe.setParameterNames(Collections.EMPTY_LIST);
417
422
                        pe.setParameterSignatures(Collections.EMPTY_LIST, Collections.EMPTY_LIST);
418
423
                } else {
419
 
                        List names = new ArrayList();
420
 
                        List paramSigs = new ArrayList();
421
 
                        List paramSourceRefs = new ArrayList();
 
424
                        List<String> names = new ArrayList<String>();
 
425
                        List<char[]> paramSigs = new ArrayList<char[]>();
 
426
                        List<String> paramSourceRefs = new ArrayList<String>();
422
427
                        boolean problemWithSourceRefs = false;
423
428
                        for (int i = 0; i < argArray.length; i++) {
424
429
                                String argName = new String(argArray[i].name);
454
459
 
455
460
        // TODO: fix this way of determing ajc-added arguments, make subtype of Argument with extra info
456
461
        private boolean acceptArgument(String name, String type) {
457
 
                if (name.charAt(0) != 'a' && type.charAt(0) != 'o')
 
462
                if (name.charAt(0) != 'a' && type.charAt(0) != 'o') {
458
463
                        return true;
 
464
                }
459
465
                return !name.startsWith("ajc$this_") && !type.equals("org.aspectj.lang.JoinPoint.StaticPart")
460
466
                                && !type.equals("org.aspectj.lang.JoinPoint") && !type.equals("org.aspectj.runtime.internal.AroundClosure");
461
467
        }
467
473
 
468
474
                if (!ResolvedType.isMissing(typeX)) {
469
475
                        label = typeX.getName();
470
 
                        if (tp.isIncludeSubtypes())
 
476
                        if (tp.isIncludeSubtypes()) {
471
477
                                label += "+";
 
478
                        }
472
479
                } else {
473
480
                        label = TYPE_PATTERN_LITERAL;
474
481
                }