summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authoraclement <aclement>2010-08-23 20:44:16 +0000
committeraclement <aclement>2010-08-23 20:44:16 +0000
commit701e6bd6988b9a60b68a45c9d750605c873c26c2 (patch)
tree53ab6acd8f00b3e676e9e05d5ee4eba4c48d57f3 /runtime
parent068d72d06654b192bbfd1203699efe5501107bbe (diff)
downloadaspectj-701e6bd6988b9a60b68a45c9d750605c873c26c2.tar.gz
aspectj-701e6bd6988b9a60b68a45c9d750605c873c26c2.zip
323438
Diffstat (limited to 'runtime')
-rw-r--r--runtime/src/org/aspectj/runtime/reflect/Factory.java31
1 files changed, 31 insertions, 0 deletions
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 <tt>-Xset:targetRuntime1_6_10=true</tt>.
+ *
+ * @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 <tt>-Xset:targetRuntime1_6_10=true</tt>.
+ * <p>
+ * 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);
}