Menu

Commit [r2544]  Maximize  Restore  History

Fixed noSuchMethodException because of the use of the wron interface. Every reference implementation must provide a default constructor (needed by the extension point) and a constructor that takes an IGeneratedJavaClass2 object as sole argument, to create the instance for replacing code.

This resolves #58.

hotzst 2009-10-01

changed /branches/UI_separation_II/ch.sahits.codegen.java/src/ch/sahits/codegen/java/generator/ast/ReferenceAST.java
/branches/UI_separation_II/ch.sahits.codegen.java/src/ch/sahits/codegen/java/generator/ast/ReferenceAST.java Diff Switch to side-by-side view
--- a/branches/UI_separation_II/ch.sahits.codegen.java/src/ch/sahits/codegen/java/generator/ast/ReferenceAST.java
+++ b/branches/UI_separation_II/ch.sahits.codegen.java/src/ch/sahits/codegen/java/generator/ast/ReferenceAST.java
@@ -35,6 +35,7 @@
 import ch.sahits.codegen.i18n.JavaMessages;
 import ch.sahits.codegen.java.extensions.ReferenceImplementation;
 import ch.sahits.datastructure.Pair;
+import ch.sahits.model.java.IGeneratedJavaClass2;
 import ch.sahits.model.java.IGeneratedJavaDBClass;
 import ch.sahits.util.StringManipulator;
 /**
@@ -283,7 +284,7 @@
 			throws NoSuchMethodException, InstantiationException,
 			IllegalAccessException, InvocationTargetException {
 		Pair[] replacementValues = new Pair[replacementMethodNames.length];
-		Class[] types = {IGeneratedJavaDBClass.class};
+		Class[] types = {IGeneratedJavaClass2.class};
 		Object[] args = {model};
 		Constructor construct = referenceImlementation.getDeclaredConstructor(types);
 		construct.setAccessible(true);
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.