jvanzyl     00/10/09 14:27:10

  Modified:    src/java/org/apache/velocity/runtime/parser
                        ASTIdentifier.java ASTMethod.java ASTReference.java
                        Node.java SimpleNode.java
  Log:
  - cleaning out unused code.
  
  Revision  Changes    Path
  1.3       +0 -31     
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTIdentifier.java
  
  Index: ASTIdentifier.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTIdentifier.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ASTIdentifier.java        2000/10/09 15:06:29     1.2
  +++ ASTIdentifier.java        2000/10/09 21:27:09     1.3
  @@ -58,35 +58,4 @@
       {
           return executor.execute(o, context);
       }
  -
  -    public Object invoke(Object result, Context context)
  -    {
  -        String identifier = getFirstToken().image;
  -        String method = "get" + identifier;
  -        Object newResult;
  -        
  -        newResult = ClassUtils.invoke(result, method);
  -        if (newResult == null)
  -        {
  -            method = "get";
  -            Object[] args = { identifier };
  -            Class[] ptypes = null;
  -
  -            // Have to make sure class types are
  -            // correct for a proper signature match.
  -
  -            if (result instanceof Map)
  -            {
  -                // This can be created once.
  -                ptypes = new Class[1];
  -                ptypes[0] = new Object().getClass();
  -            }
  -
  -            result = ClassUtils.invoke(result, method, args, ptypes);
  -        }
  -        else
  -            result = newResult;
  -        
  -        return result;
  -    }
   }
  
  
  
  1.3       +0 -23     
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTMethod.java
  
  Index: ASTMethod.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTMethod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ASTMethod.java    2000/10/09 15:06:29     1.2
  +++ ASTMethod.java    2000/10/09 21:27:10     1.3
  @@ -68,27 +68,4 @@
               return null;
           }            
       }
  -
  -    public Object invoke(Object result, Context context)
  -    {
  -        // node 1: method name
  -        // The rest of the nodes are parameters
  -        // to the method. They may be references
  -        // or string literals. If they are
  -        // references then we just use a little
  -        // recursion.
  -
  -        String method = jjtGetChild(0).getFirstToken().image;
  -        int parameters = jjtGetNumChildren() - 1;
  -
  -        Object[] params = new Object[parameters];
  -
  -        for (int j = 0; j < parameters; j++)
  -        {
  -            Node p = jjtGetChild(j + 1);
  -            params[j] = p.value(context);
  -        }
  -        
  -        return ClassUtils.invoke(result, method, params); 
  -    }
   }
  
  
  
  1.4       +1 -1      
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTReference.java
  
  Index: ASTReference.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/ASTReference.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ASTReference.java 2000/10/09 15:06:30     1.3
  +++ ASTReference.java 2000/10/09 21:27:10     1.4
  @@ -124,7 +124,7 @@
           int children = jjtGetNumChildren();
           
           for (int i = 0; i < children - 1; i++)
  -            result = jjtGetChild(i).invoke(result, context);
  +            result = jjtGetChild(i).execute(result, context);
   
           Object[] args = { value };
           ClassUtils.invoke(result, "set" + jjtGetChild(children - 1)
  
  
  
  1.3       +0 -1      
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Node.java
  
  Index: Node.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/Node.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Node.java 2000/10/09 15:06:30     1.2
  +++ Node.java 2000/10/09 21:27:10     1.3
  @@ -56,7 +56,6 @@
       public void render(Context context, Writer writer)
           throws IOException;
   
  -    public Object invoke(Object o, Context context);
       public Object execute(Object o, Context context);
   
       public void setInfo(int info);
  
  
  
  1.3       +0 -3      
jakarta-velocity/src/java/org/apache/velocity/runtime/parser/SimpleNode.java
  
  Index: SimpleNode.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/parser/SimpleNode.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SimpleNode.java   2000/10/09 15:06:33     1.2
  +++ SimpleNode.java   2000/10/09 21:27:10     1.3
  @@ -170,9 +170,6 @@
           return null;
       }        
   
  -    public Object invoke(Object o, Context context) 
  -    { return null; }
  -
       public void render(Context context, Writer writer)
           throws IOException
       {
  
  
  

Reply via email to