diff options
author | mkersten <mkersten> | 2004-03-29 22:35:35 +0000 |
---|---|---|
committer | mkersten <mkersten> | 2004-03-29 22:35:35 +0000 |
commit | 6f035006e996dca8d183fa9028f5e0b057b84ff9 (patch) | |
tree | 67e62181fd5711796d84d4a67d8a9e7175dde8b2 | |
parent | 3b6a9d338f07bac03b12d81d118f23d40c2a8e7c (diff) | |
download | aspectj-6f035006e996dca8d183fa9028f5e0b057b84ff9.tar.gz aspectj-6f035006e996dca8d183fa9028f5e0b057b84ff9.zip |
Added more information on source signature (for ajdoc)
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java index 674877a37..8434d1e82 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AsmHierarchyBuilder.java @@ -429,7 +429,11 @@ public class AsmHierarchyBuilder extends ASTVisitor { makeLocation(constructorDeclaration), constructorDeclaration.modifiers, "", - new ArrayList()); + new ArrayList()); + + peNode.setModifiers(constructorDeclaration.modifiers); + peNode.setSourceSignature(genSourceSignature(constructorDeclaration)); + ((IProgramElement)stack.peek()).addChild(peNode); stack.push(peNode); return true; @@ -437,6 +441,26 @@ public class AsmHierarchyBuilder extends ASTVisitor { public void endVisit(ConstructorDeclaration constructorDeclaration, ClassScope scope) { stack.pop(); } + private String genSourceSignature(ConstructorDeclaration constructorDeclaration) { + StringBuffer output = new StringBuffer(); + constructorDeclaration.printModifiers(constructorDeclaration.modifiers, output); + output.append(constructorDeclaration.selector).append('('); + if (constructorDeclaration.arguments != null) { + for (int i = 0; i < constructorDeclaration.arguments.length; i++) { + if (i > 0) output.append(", "); //$NON-NLS-1$ + constructorDeclaration.arguments[i].print(0, output); + } + } + output.append(')'); + if (constructorDeclaration.thrownExceptions != null) { + output.append(" throws "); //$NON-NLS-1$ + for (int i = 0; i < constructorDeclaration.thrownExceptions.length; i++) { + if (i > 0) output.append(", "); //$NON-NLS-1$ + constructorDeclaration.thrownExceptions[i].print(0, output); + } + } + return output.toString(); + } // public boolean visit(Clinit clinit, ClassScope scope) { // ProgramElementNode peNode = new ProgramElementNode( |