From 09464837f2fa6577ffba389e83c1c4a605d038ea Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 5 Jan 2005 16:43:46 +0000 Subject: BWD: Improved source loc stuff and helper methods --- .../src/org/aspectj/weaver/bcel/LazyMethodGen.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java index ae0fc6852..dc7741c4c 100644 --- a/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java +++ b/weaver/src/org/aspectj/weaver/bcel/LazyMethodGen.java @@ -49,6 +49,7 @@ import org.aspectj.apache.bcel.generic.ObjectType; import org.aspectj.apache.bcel.generic.Select; import org.aspectj.apache.bcel.generic.Type; import org.aspectj.bridge.IMessage; +import org.aspectj.bridge.ISourceLocation; import org.aspectj.weaver.AjAttribute; import org.aspectj.weaver.BCException; import org.aspectj.weaver.ISourceContext; @@ -1036,6 +1037,15 @@ public final class LazyMethodGen { public boolean isPrivate() { return Modifier.isPrivate(getAccessFlags()); } + public boolean isProtected() { + return Modifier.isProtected(getAccessFlags()); + } + public boolean isDefault() { + return !(isProtected() || isPrivate() || isPublic()); + } + public boolean isPublic() { + return Modifier.isPublic(getAccessFlags()); + } // ---- @@ -1241,6 +1251,11 @@ public final class LazyMethodGen { return memberView.isAjSynthetic(); } + public ISourceLocation getSourceLocation() { + if (memberView!=null) return memberView.getSourceLocation(); + return null; + } + public AjAttribute.EffectiveSignatureAttribute getEffectiveSignature() { //if (memberView == null) return null; return memberView.getEffectiveSignature(); @@ -1251,6 +1266,11 @@ public final class LazyMethodGen { return Member.typesToSignature(BcelWorld.fromBcel(getReturnType()), BcelWorld.fromBcel(getArgumentTypes())); } + + public String getParameterSignature() { + if (memberView!=null) return memberView.getParameterSignature(); + return Member.typesToSignature(BcelWorld.fromBcel(getArgumentTypes())); + } public BcelMethod getMemberView() { return memberView; -- cgit v1.2.3