[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-dev
Subject: cvs commit: jakarta-velocity/src/java/org/apache/velocity/runtime Runtime.java
From: jvanzyl () locus ! apache ! org
Date: 2000-11-28 4:17:09
[Download RAW message or body]
jvanzyl 00/11/27 20:17:09
Modified: src/java/org/apache/velocity/runtime Runtime.java
Log:
- updating the initializeDirectives() method to reflect the
reversion to simple getName()/getType() properties in each
of the directives.
Revision Changes Path
1.63 +2 -18 jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
Index: Runtime.java
===================================================================
RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- Runtime.java 2000/11/28 01:46:35 1.62
+++ Runtime.java 2000/11/28 04:17:08 1.63
@@ -154,7 +154,7 @@
* @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
* @author <a href="mailto:jlb@houseofdistraction.com">Jeff Bowden</a>
* @author <a href="mailto:geirm@optonline.net">Geir Magusson Jr.</a>
- * @version $Id: Runtime.java,v 1.62 2000/11/28 01:46:35 jvanzyl Exp $
+ * @version $Id: Runtime.java,v 1.63 2000/11/28 04:17:08 jvanzyl Exp $
*/
public class Runtime implements RuntimeConstants
{
@@ -731,26 +731,10 @@
* not visible. It's in a package that isn't
* readily accessible.
*
- * After the directive is instantiated, use
- * reflection to grab the values of the name and
- * type fields as they have been defined in the
- * individual directive.
- *
- * After the name and type are nabbed, then
- * set them.
*/
Class clazz = Class.forName(directiveClass);
Directive directive = (Directive) clazz.newInstance();
-
- String name = (String) clazz
- .getField(Directive.NAME_FIELD).get(directive);
-
- directive.setName(name);
-
- directive.setType(clazz.getField(Directive.TYPE_FIELD)
- .getInt(directive));
-
- runtimeDirectives.put(name, directive);
+ runtimeDirectives.put(directive.getName(), directive);
Runtime.info("Loaded Pluggable Directive: "
+ directiveClass);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic