Coverage Report - org.mule.module.xml.expression.BeanPayloadExpressionEvaluator
 
Classes in this File Line Coverage Branch Coverage Complexity
BeanPayloadExpressionEvaluator
0%
0/7
0%
0/2
1.667
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.module.xml.expression;
 8  
 
 9  
 import org.jaxen.JaxenException;
 10  
 import org.jaxen.XPath;
 11  
 import org.jaxen.javabean.JavaBeanXPath;
 12  
 
 13  
 /** TODO */
 14  0
 public class BeanPayloadExpressionEvaluator extends AbstractXPathExpressionEvaluator
 15  
 {
 16  
     public static final String NAME = "bean";
 17  
 
 18  
     protected XPath createXPath(String expression, Object object) throws JaxenException
 19  
     {
 20  0
         expression = expression.replaceAll("[.]", "/");
 21  0
         return new JavaBeanXPath(expression);
 22  
     }
 23  
 
 24  
     protected Object extractResultFromNode(Object result)
 25  
     {
 26  0
         if(result instanceof org.jaxen.javabean.Element)
 27  
         {
 28  0
             return ((org.jaxen.javabean.Element)result).getObject();
 29  
         }
 30  0
         return result;
 31  
     }
 32  
 
 33  
     /** {@inheritDoc} */
 34  
     public String getName()
 35  
     {
 36  0
         return NAME;
 37  
     }
 38  
 }