Browse Source

323438

tags/V1_6_10RC1
aclement 13 years ago
parent
commit
701e6bd698
1 changed files with 31 additions and 0 deletions
  1. 31
    0
      runtime/src/org/aspectj/runtime/reflect/Factory.java

+ 31
- 0
runtime/src/org/aspectj/runtime/reflect/Factory.java View File

@@ -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);
}

Loading…
Cancel
Save