From: aclement Date: Mon, 23 Aug 2010 20:44:16 +0000 (+0000) Subject: 323438 X-Git-Tag: V1_6_10RC1~16 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=701e6bd6988b9a60b68a45c9d750605c873c26c2;p=aspectj.git 323438 --- diff --git a/runtime/src/org/aspectj/runtime/reflect/Factory.java b/runtime/src/org/aspectj/runtime/reflect/Factory.java index 4e88f8cf5..06e073873 100644 --- a/runtime/src/org/aspectj/runtime/reflect/Factory.java +++ b/runtime/src/org/aspectj/runtime/reflect/Factory.java @@ -10,6 +10,7 @@ * Contributors: * Xerox/PARC initial implementation * Alex Vasseur new factory methods for variants of JP + * Abraham Nevado new factory methods for collapsed SJPs * ******************************************************************/ package org.aspectj.runtime.reflect; @@ -83,6 +84,36 @@ public final class Factory { lookupClassLoader = lexicalClass.getClassLoader(); } + + /** + * Create a signature and build a JoinPoint in one step. Prior to 1.6.10 this was done as a two step operation in the generated + * code but merging these methods in the runtime library enables the generated code to be shorter. Generating code that + * uses this method requires the weaver to be invoked with -Xset:targetRuntime1_6_10=true. + * + * @since 1.6.10 + */ + public JoinPoint.StaticPart makeSJP(String kind, String modifiers, String methodName, String declaringType, String paramTypes, + String paramNames, String exceptionTypes, String returnType, int l) { + Signature sig = this.makeMethodSig(modifiers, methodName, declaringType, paramTypes, paramNames, exceptionTypes, returnType); + return new JoinPointImpl.StaticPartImpl(count++, kind, sig, makeSourceLoc(l, -1)); + } + + /** + * Create a signature and build a JoinPoint in one step. Prior to 1.6.10 this was done as a two step operation in the generated + * code but merging these methods in the runtime library enables the generated code to be shorter. Generating code that + * uses this method requires the weaver to be invoked with -Xset:targetRuntime1_6_10=true. + *

+ * This method differs from the previous one in that it includes no exceptionTypes parameter - it is an optimization for the + * case where there are no exceptions. The generated code won't build an empty string and will not pass it into here. + * + * @since 1.6.10 + */ + public JoinPoint.StaticPart makeSJP(String kind, String modifiers, String methodName, String declaringType, String paramTypes, + String paramNames, String returnType, int l) { + Signature sig = this.makeMethodSig(modifiers, methodName, declaringType, paramTypes, paramNames, "", returnType); + return new JoinPointImpl.StaticPartImpl(count++, kind, sig, makeSourceLoc(l, -1)); + } + public JoinPoint.StaticPart makeSJP(String kind, Signature sig, SourceLocation loc) { return new JoinPointImpl.StaticPartImpl(count++, kind, sig, loc); }