Java 类org.apache.commons.beanutils.expression.DefaultResolver 实例源码

项目:viritin    文件:DynaBeanItem.java   
@Override
public Property getItemProperty(Object id) {
    final String propertyName = id.toString();
    if (getDynaBean().getDynaClass().getDynaProperty(propertyName) == null) {
        DefaultResolver defaultResolver = new DefaultResolver();
        if (!(defaultResolver.hasNested(propertyName) || defaultResolver.
                isIndexed(propertyName))) {
            // Lazy query container detects some debug properties via 
            // Item!! 
            return null;
        }
    }
    DynaProperty prop = propertyIdToProperty.get(id);
    if (prop == null) {
        prop = new DynaProperty(propertyName);
        propertyIdToProperty.put(id, prop);
    }
    return prop;
}
项目:NotifyTools    文件:PropertyUtilsBean.java   
/**
 * Configure the {@link Resolver} implementation used by BeanUtils.
 * <p>
 * The {@link Resolver} handles the <i>property name</i>
 * expressions and the implementation in use effectively
 * controls the dialect of the <i>expression language</i>
 * that BeanUtils recongnises.
 * <p>
 * {@link DefaultResolver} is the default implementation used.
 *
 * @param resolver The property expression resolver.
 * @since 1.8.0
 */
public void setResolver(final Resolver resolver) {
    if (resolver == null) {
        this.resolver = new DefaultResolver();
    } else {
        this.resolver = resolver;
    }
}