args.remove(args.get(nextArgIndex));
}
+ } else if (arg.equals("-makeAjReflectable")) {
+ buildConfig.setMakeReflectable(true);
} else if (arg.equals("-sourceroots")) {
if (args.size() > nextArgIndex) {
List sourceRoots = new ArrayList();
private boolean isXTerminateAfterCompilation;
private boolean proceedOnError;
private boolean inJava5Mode;
+ private boolean reflectable;
private boolean noAtAspectJAnnotationProcessing;
private IIntermediateResultsRequestor intermediateResultsRequestor;
private IProgressListener progressListener;
IOutputClassFileNameProvider outputFileNameProvider, IBinarySourceProvider binarySourceProvider,
Map fullBinarySourceEntries, /* fileName |-> List<UnwovenClassFile> */
boolean isXterminateAfterCompilation, boolean proceedOnError, boolean noAtAspectJProcessing,
+ boolean reflectable,
AjState incrementalCompilationState) {
this.compiler = compiler;
this.isBatchCompile = isBatchCompile;
this.proceedOnError = proceedOnError;
this.binarySourceSetForFullWeave = fullBinarySourceEntries;
this.eWorld = eFactory;
+ this.reflectable= reflectable;
this.inJava5Mode = false;
this.noAtAspectJAnnotationProcessing = noAtAspectJProcessing;
this.incrementalCompilationState = incrementalCompilationState;
if (inJava5Mode && !noAtAspectJAnnotationProcessing) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.ADDING_AT_ASPECTJ_ANNOTATIONS, unit.getFileName());
- AddAtAspectJAnnotationsVisitor atAspectJVisitor = new AddAtAspectJAnnotationsVisitor(unit);
+ AddAtAspectJAnnotationsVisitor atAspectJVisitor = new AddAtAspectJAnnotationsVisitor(unit,reflectable);
unit.traverse(atAspectJVisitor, unit.scope);
CompilationAndWeavingContext.leavingPhase(tok);
}
private boolean isXTerminateAfterCompilation;
private boolean proceedOnError;
private boolean inJava5Mode;
+ private boolean makeReflectable;
private boolean noAtAspectJAnnotationProcessing;
private IIntermediateResultsRequestor intermediateResultsRequestor;
private IProgressListener progressListener;
EclipseFactory eFactory, IIntermediateResultsRequestor intRequestor, IProgressListener progressListener,
IOutputClassFileNameProvider outputFileNameProvider, IBinarySourceProvider binarySourceProvider,
Map fullBinarySourceEntries, /* fileName |-> List<UnwovenClassFile> */
- boolean isXterminateAfterCompilation, boolean proceedOnError, boolean noAtAspectJProcessing,
+ boolean isXterminateAfterCompilation, boolean proceedOnError, boolean noAtAspectJProcessing, boolean makeReflectable,
AjState incrementalCompilationState) {
this.compiler = compiler;
this.isBatchCompile = isBatchCompile;
this.binarySourceSetForFullWeave = fullBinarySourceEntries;
this.eWorld = eFactory;
this.inJava5Mode = false;
+ this.makeReflectable = makeReflectable;
this.noAtAspectJAnnotationProcessing = noAtAspectJProcessing;
this.incrementalCompilationState = incrementalCompilationState;
if (inJava5Mode && !noAtAspectJAnnotationProcessing) {
ContextToken tok = CompilationAndWeavingContext.enteringPhase(
CompilationAndWeavingContext.ADDING_AT_ASPECTJ_ANNOTATIONS, unit.getFileName());
- AddAtAspectJAnnotationsVisitor atAspectJVisitor = new AddAtAspectJAnnotationsVisitor(unit);
+ AddAtAspectJAnnotationsVisitor atAspectJVisitor = new AddAtAspectJAnnotationsVisitor(unit,makeReflectable);
unit.traverse(atAspectJVisitor, unit.scope);
CompilationAndWeavingContext.leavingPhase(tok);
}
*/
public class AddAtAspectJAnnotationsVisitor extends ASTVisitor {
+ private boolean makeReflectable;
// private CompilationUnitDeclaration unit;
- public AddAtAspectJAnnotationsVisitor(CompilationUnitDeclaration unit) {
+ public AddAtAspectJAnnotationsVisitor(CompilationUnitDeclaration unit, boolean makeReflectable) {
// this.unit = unit;
+ this.makeReflectable= makeReflectable;
}
public boolean visit(TypeDeclaration localTypeDeclaration, BlockScope scope) {
} else if (methodDeclaration instanceof DeclareDeclaration) {
((DeclareDeclaration) methodDeclaration).addAtAspectJAnnotations();
} else if (methodDeclaration instanceof InterTypeDeclaration) {
- ((InterTypeDeclaration) methodDeclaration).addAtAspectJAnnotations();
+ if (makeReflectable) {
+ ((InterTypeDeclaration) methodDeclaration).addAtAspectJAnnotations();
+ }
}
return false;
}
setAddSerialVerUID(global.isAddSerialVerUID());
setXmlConfigured(global.isXmlConfigured());
setTiming(global.isTiming());
+ setMakeReflectable(global.isMakeReflectable());
}
void join(Collection local, Collection global) {
public void setXmlConfigured(boolean b) {
options.xmlConfigured = b;
}
+
+ public void setMakeReflectable(boolean b) {
+ options.makeReflectable = b;
+ }
public boolean isXmlConfigured() {
return options.xmlConfigured;
}
+
+ public boolean isMakeReflectable() {
+ return options.makeReflectable;
+ }
public boolean isXNotReweavable() {
return options.xNotReweavable;
this, // IOutputFilenameProvider
this, // IBinarySourceProvider
state.getBinarySourceMap(), buildConfig.isTerminateAfterCompilation(), buildConfig.getProceedOnError(),
- buildConfig.isNoAtAspectJAnnotationProcessing(), state);
+ buildConfig.isNoAtAspectJAnnotationProcessing(), buildConfig.isMakeReflectable(), state);
} else {
return new AjCompilerAdapter(forCompiler, batchCompile, getBcelWorld(), getWeaver(), factory,
getInterimResultRequestor(), progressListener,
this, // IOutputFilenameProvider
this, // IBinarySourceProvider
state.getBinarySourceMap(), buildConfig.isTerminateAfterCompilation(), buildConfig.getProceedOnError(),
- buildConfig.isNoAtAspectJAnnotationProcessing(), state);
+ buildConfig.isNoAtAspectJAnnotationProcessing(), buildConfig.isMakeReflectable(), state);
}
}
public String xConfigurationInfo;
public boolean addSerialVerUID = false;
public boolean xmlConfigured = false;
+ public boolean makeReflectable = false;
// these next four not exposed by IDEs
public boolean generateModel = false;