当前位置: 首页>>代码示例>>Java>>正文


Java PropertyNotFoundException类代码示例

本文整理汇总了Java中javax.el.PropertyNotFoundException的典型用法代码示例。如果您正苦于以下问题:Java PropertyNotFoundException类的具体用法?Java PropertyNotFoundException怎么用?Java PropertyNotFoundException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PropertyNotFoundException类属于javax.el包,在下文中一共展示了PropertyNotFoundException类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public void setValue(EvaluationContext ctx, Object value)
        throws ELException {
    Target t = getTarget(ctx);
    ctx.setPropertyResolved(false);
    ELResolver resolver = ctx.getELResolver();

    // coerce to the expected type
    Class<?> targetClass = resolver.getType(ctx, t.base, t.property);
    if (COERCE_TO_ZERO == true
            || !isAssignable(value, targetClass)) {
        resolver.setValue(ctx, t.base, t.property,
                ELSupport.coerceToType(value, targetClass));
    } else {
        resolver.setValue(ctx, t.base, t.property, value);
    }
    if (!ctx.isPropertyResolved()) {
        throw new PropertyNotFoundException(MessageFactory.get(
                "error.resolver.unhandled", t.base, t.property));            
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:AstValue.java

示例2: getType

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public Class<?> getType(EvaluationContext ctx) throws ELException {
    VariableMapper varMapper = ctx.getVariableMapper();
    if (varMapper != null) {
        ValueExpression expr = varMapper.resolveVariable(this.image);
        if (expr != null) {
            return expr.getType(ctx.getELContext());
        }
    }
    ctx.setPropertyResolved(false);
    Class<?> result = ctx.getELResolver().getType(ctx, null, this.image);
    if (!ctx.isPropertyResolved()) {
        throw new PropertyNotFoundException(MessageFactory.get(
                "error.resolver.unhandled.null", this.image));
    }
    return result;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AstIdentifier.java

示例3: getValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
    VariableMapper varMapper = ctx.getVariableMapper();
    if (varMapper != null) {
        ValueExpression expr = varMapper.resolveVariable(this.image);
        if (expr != null) {
            return expr.getValue(ctx.getELContext());
        }
    }
    ctx.setPropertyResolved(false);
    Object result = ctx.getELResolver().getValue(ctx, null, this.image);
    if (!ctx.isPropertyResolved()) {
        throw new PropertyNotFoundException(MessageFactory.get(
                "error.resolver.unhandled.null", this.image));
    }
    return result;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AstIdentifier.java

示例4: isReadOnly

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
    VariableMapper varMapper = ctx.getVariableMapper();
    if (varMapper != null) {
        ValueExpression expr = varMapper.resolveVariable(this.image);
        if (expr != null) {
            return expr.isReadOnly(ctx.getELContext());
        }
    }
    ctx.setPropertyResolved(false);
    boolean result = ctx.getELResolver().isReadOnly(ctx, null, this.image);
    if (!ctx.isPropertyResolved()) {
        throw new PropertyNotFoundException(MessageFactory.get(
                "error.resolver.unhandled.null", this.image));
    }
    return result;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AstIdentifier.java

示例5: setValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public void setValue(EvaluationContext ctx, Object value)
        throws ELException {
    VariableMapper varMapper = ctx.getVariableMapper();
    if (varMapper != null) {
        ValueExpression expr = varMapper.resolveVariable(this.image);
        if (expr != null) {
            expr.setValue(ctx.getELContext(), value);
            return;
        }
    }
    ctx.setPropertyResolved(false);
    ctx.getELResolver().setValue(ctx, null, this.image, value);
    if (!ctx.isPropertyResolved()) {
        throw new PropertyNotFoundException(MessageFactory.get(
                "error.resolver.unhandled.null", this.image));
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:19,代码来源:AstIdentifier.java

示例6: getValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public Object getValue(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            try {
                return this.variableResolver.resolveVariable(property
                        .toString());
            } catch (javax.servlet.jsp.el.ELException e) {
                throw new ELException(e.getMessage(), e.getCause());
            }
        }
    }

    if (!context.isPropertyResolved()) {
        return elResolver.getValue(context, base, property);
    }
    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:25,代码来源:ELResolverImpl.java

示例7: getType

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public Class<?> getType(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            try {
                Object obj = this.variableResolver.resolveVariable(property
                        .toString());
                return (obj != null) ? obj.getClass() : null;
            } catch (javax.servlet.jsp.el.ELException e) {
                throw new ELException(e.getMessage(), e.getCause());
            }
        }
    }

    if (!context.isPropertyResolved()) {
        return elResolver.getType(context, base, property);
    }
    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:26,代码来源:ELResolverImpl.java

示例8: setValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        throw new PropertyNotWritableException(
                "Legacy VariableResolver wrapped, not writable");
    }

    if (!context.isPropertyResolved()) {
        elResolver.setValue(context, base, property, value);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:ELResolverImpl.java

示例9: isReadOnly

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public boolean isReadOnly(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        return true;
    }

    return elResolver.isReadOnly(context, base, property);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:15,代码来源:ELResolverImpl.java

示例10: getValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public Object getValue(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            return page.findAttribute(key);
        }
    }

    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:20,代码来源:ScopedAttributeELResolver.java

示例11: setValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null) {
        context.setPropertyResolved(true);
        if (property != null) {
            String key = property.toString();
            PageContext page = (PageContext) context
                    .getContext(JspContext.class);
            int scope = page.getAttributesScope(key);
            if (scope != 0) {
                page.setAttribute(key, value, scope);
            } else {
                page.setAttribute(key, value);
            }
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:25,代码来源:ScopedAttributeELResolver.java

示例12: getType

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
@SuppressWarnings({ "unchecked", "rawtypes" }) // TCK signature test fails with generics
public Class getType(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
        }
    }
    return null;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:17,代码来源:ImplicitObjectELResolver.java

示例13: setValue

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public void setValue(ELContext context, Object base, Object property,
        Object value) throws NullPointerException,
        PropertyNotFoundException, PropertyNotWritableException,
        ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            throw new PropertyNotWritableException();
        }
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:ImplicitObjectELResolver.java

示例14: isReadOnly

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
public boolean isReadOnly(ELContext context, Object base, Object property)
        throws NullPointerException, PropertyNotFoundException, ELException {
    if (context == null) {
        throw new NullPointerException();
    }

    if (base == null && property != null) {
        int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
        if (idx >= 0) {
            context.setPropertyResolved(true);
            return true;
        }
    }
    return false;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:17,代码来源:ImplicitObjectELResolver.java

示例15: getType

import javax.el.PropertyNotFoundException; //导入依赖的package包/类
@Override
@SuppressWarnings({ "unchecked", "rawtypes" }) // TCK signature test fails
												// with generics
public Class getType(ELContext context, Object base, Object property)
		throws NullPointerException, PropertyNotFoundException, ELException {
	if (context == null) {
		throw new NullPointerException();
	}

	if (base == null && property != null) {
		int idx = Arrays.binarySearch(SCOPE_NAMES, property.toString());
		if (idx >= 0) {
			context.setPropertyResolved(true);
		}
	}
	return null;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:18,代码来源:ImplicitObjectELResolver.java


注:本文中的javax.el.PropertyNotFoundException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。