From 4ee35142ffc1fb7d5776021c533bd4bfbb9cea1c Mon Sep 17 00:00:00 2001 From: mkersten Date: Thu, 11 Mar 2004 19:19:56 +0000 Subject: Added methods for retrieving the signature of a program element as it occurrs in the source code. Needed by ajdoc, possibly useful to other clients. --- asm/src/org/aspectj/asm/IProgramElement.java | 6 ++++++ asm/src/org/aspectj/asm/internal/ProgramElement.java | 16 +++++++++------- 2 files changed, 15 insertions(+), 7 deletions(-) (limited to 'asm/src') diff --git a/asm/src/org/aspectj/asm/IProgramElement.java b/asm/src/org/aspectj/asm/IProgramElement.java index 8bf641ce8..ca6dac5bb 100644 --- a/asm/src/org/aspectj/asm/IProgramElement.java +++ b/asm/src/org/aspectj/asm/IProgramElement.java @@ -117,6 +117,12 @@ public interface IProgramElement extends Serializable { public void setBytecodeName(String bytecodeName); public void setBytecodeSignature(String bytecodeSignature); + /** + * @return the full signature of this element, as it appears in the source + */ + public String getSourceSignature(); + public void setSourceSignature(String string); + public IProgramElement walk(HierarchyWalker walker); /** diff --git a/asm/src/org/aspectj/asm/internal/ProgramElement.java b/asm/src/org/aspectj/asm/internal/ProgramElement.java index 6f83e3be9..6141f600e 100644 --- a/asm/src/org/aspectj/asm/internal/ProgramElement.java +++ b/asm/src/org/aspectj/asm/internal/ProgramElement.java @@ -251,6 +251,8 @@ public class ProgramElement implements IProgramElement { // private static int AccInterface = 0x0200; private static int AccAbstract = 0x0400; // private static int AccStrictfp = 0x0800; + + private String sourceSignature; public String getBytecodeName() { @@ -268,14 +270,14 @@ public class ProgramElement implements IProgramElement { public void setBytecodeSignature(String bytecodeSignature) { this.bytecodeSignature = bytecodeSignature; } + + public String getSourceSignature() { + return sourceSignature; + } -// public String getFullSignature() { -// return fullSignature; -// } -// -// public void setFullSignature(String string) { -// fullSignature = string; -// } + public void setSourceSignature(String string) { + sourceSignature = string; + } public void setKind(Kind kind) { this.kind = kind; -- cgit v1.2.3