jvanzyl 00/10/30 18:49:49
Modified: src/java/org/apache/velocity/runtime/parser/node
ASTMethod.java
Log:
- changed import for Introspector.
Revision Changes Path
1.3 +8 -4
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java
Index: ASTMethod.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/node/ASTMethod.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ASTMethod.java 2000/10/21 03:21:03 1.2
+++ ASTMethod.java 2000/10/31 02:49:49 1.3
@@ -5,8 +5,8 @@
import java.lang.reflect.Method;
import org.apache.velocity.Context;
-import org.apache.velocity.util.Introspector;
import org.apache.velocity.runtime.parser.*;
+import org.apache.velocity.util.introspection.Introspector;
public class ASTMethod extends SimpleNode
{
@@ -39,15 +39,19 @@
paramCount = jjtGetNumChildren() - 1;
params = new Object[paramCount];
- method = Introspector.getMethod((Class) data, methodName, paramCount);
-
// Now the parameters have to be processed, there
// may be references contained within that need
// to be introspected.
for (int i = 0; i < paramCount; i++)
jjtGetChild(i + 1).init(context, null);
-
+
+ for (int j = 0; j < paramCount; j++)
+ params[j] = jjtGetChild(j + 1).value(context);
+
+ //method = Introspector.getMethod((Class) data, methodName, paramCount);
+ method = Introspector.getMethod((Class) data, methodName, params);
+
return method.getReturnType();
}