Example usage for org.apache.commons.jxpath.ri.model.beans PropertyPointer getParent

List of usage examples for org.apache.commons.jxpath.ri.model.beans PropertyPointer getParent

Introduction

In this page you can find the example usage for org.apache.commons.jxpath.ri.model.beans PropertyPointer getParent.

Prototype

public NodePointer getParent() 

Source Link

Document

Get the parent pointer.

Usage

From source file:jp.terasoluna.fw.beans.jxpath.BeanPointerExTest.java

/**
 * testGetPropertyPointer01() <br>
 * <br>//  w ww.j  av a2  s  .  com
 * () <br>
 * A <br>
 * <br>
 * () this.beanInfo:not null<br>
 * <br>
 * () PropertyPointer:new BeanPropertyPointerEx{<br>
 * parent=this<br>
 * beanInfo=?????beanInfo<br>
 * }<br>
 * <br>
 * ???? <br>
 * @throws Exception ?????
 */
@Test
public void testGetPropertyPointer01() throws Exception {
    // ??
    QName qName = new QName("name");
    Object bean = new Object();
    JXPathBeanInfo beanInfo = new JXPathBasicBeanInfo(bean.getClass());
    Locale locale = new Locale("ja");
    BeanPointerEx beanPointer = new BeanPointerEx(qName, bean, beanInfo, locale);

    // 
    PropertyPointer result = beanPointer.getPropertyPointer();

    // 
    assertSame(BeanPropertyPointerEx.class, result.getClass());
    assertSame(beanPointer, result.getParent());
    assertSame(beanInfo, ReflectionTestUtils.getField(result, "beanInfo"));
}