• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java EvaluationContext类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj = this.children[0].getValue(ctx);
    if (obj == null) {
        return Boolean.TRUE;
    } else if (obj instanceof String) {
        return Boolean.valueOf(((String) obj).length() == 0);
    } else if (obj instanceof Object[]) {
        return Boolean.valueOf(((Object[]) obj).length == 0);
    } else if (obj instanceof Collection) {
        return Boolean.valueOf(((Collection) obj).isEmpty());
    } else if (obj instanceof Map) {
        return Boolean.valueOf(((Map) obj).isEmpty());
    }
    return Boolean.FALSE;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:AstEmpty.java


示例2: getType

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
public Class getType(EvaluationContext ctx)
        throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    return m.getReturnType();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:17,代码来源:AstFunction.java


示例3: isReadOnly

import org.apache.el.lang.EvaluationContext; //导入依赖的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:how2j,项目名称:lazycat,代码行数:17,代码来源:AstIdentifier.java


示例4: getType

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Class<?> getType(EvaluationContext ctx)
        throws ELException {
    
    FunctionMapper fnMapper = ctx.getFunctionMapper();
    
    // quickly validate again for this request
    if (fnMapper == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.null"));
    }
    Method m = fnMapper.resolveFunction(this.prefix, this.localName);
    if (m == null) {
        throw new ELException(MessageFactory.get("error.fnMapper.method",
                this.getOutputName()));
    }
    return m.getReturnType();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:18,代码来源:AstFunction.java


示例5: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj = this.children[0].getValue(ctx);
    if (obj == null) {
        return Boolean.TRUE;
    } else if (obj instanceof String) {
        return Boolean.valueOf(((String) obj).length() == 0);
    } else if (obj instanceof Object[]) {
        return Boolean.valueOf(((Object[]) obj).length == 0);
    } else if (obj instanceof Collection<?>) {
        return Boolean.valueOf(((Collection<?>) obj).isEmpty());
    } else if (obj instanceof Map<?,?>) {
        return Boolean.valueOf(((Map<?,?>) obj).isEmpty());
    }
    return Boolean.FALSE;
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:AstEmpty.java


示例6: getType

import org.apache.el.lang.EvaluationContext; //导入依赖的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


示例7: isReadOnly

import org.apache.el.lang.EvaluationContext; //导入依赖的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:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:AstIdentifier.java


示例8: getValueReference

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public ValueReference getValueReference(EvaluationContext ctx) {
    VariableMapper varMapper = ctx.getVariableMapper();

    if (varMapper == null) {
        return null;
    }

    ValueExpression expr = varMapper.resolveVariable(this.image);

    if (expr == null) {
        return null;
    }

    return expr.getValueReference(ctx);
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:17,代码来源:AstIdentifier.java


示例9: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的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:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:AstIdentifier.java


示例10: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    StringBuilder sb = new StringBuilder(16);
    Object obj = null;
    if (this.children != null) {
        for (int i = 0; i < this.children.length; i++) {
            obj = this.children[i].getValue(ctx);
            if (obj != null) {
                sb.append(ELSupport.coerceToString(obj));
            }
        }
    }
    return sb.toString();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:16,代码来源:AstCompositeExpression.java


示例11: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj0 = this.children[0].getValue(ctx);
    Object obj1 = this.children[1].getValue(ctx);
    if (obj0 == obj1) {
        return Boolean.TRUE;
    }
    if (obj0 == null || obj1 == null) {
        return Boolean.FALSE;
    }
    return (compare(obj0, obj1) <= 0) ? Boolean.TRUE : Boolean.FALSE;
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:14,代码来源:AstLessThanEqual.java


示例12: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj = this.children[0].getValue(ctx);
    Boolean b = coerceToBoolean(obj);
    if (b.booleanValue()) {
        return b;
    }
    obj = this.children[1].getValue(ctx);
    b = coerceToBoolean(obj);
    return b;
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:13,代码来源:AstOr.java


示例13: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj = this.children[0].getValue(ctx);
    Boolean b = coerceToBoolean(obj);
    return Boolean.valueOf(!b.booleanValue());
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:8,代码来源:AstNot.java


示例14: getParameterTypes

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
public Class<?>[] getParameterTypes(EvaluationContext ctx) {
    ArrayList<Class<?>> paramTypes = new ArrayList<Class<?>>();
    for (int i = 0; i < this.jjtGetNumChildren(); i++) {
        paramTypes.add(this.jjtGetChild(i).getType(ctx));
    }
    return paramTypes.toArray(new Class<?>[paramTypes.size()]);
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:8,代码来源:AstMethodParameters.java


示例15: getParameters

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
public Object[] getParameters(EvaluationContext ctx) {
	ArrayList<Object> params = new ArrayList<Object>();
	for (int i = 0; i < this.jjtGetNumChildren(); i++) {
		params.add(this.jjtGetChild(i).getValue(ctx));
	}
	return params.toArray(new Object[params.size()]);
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:8,代码来源:AstMethodParameters.java


示例16: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj0 = this.children[0].getValue(ctx);
    Object obj1 = this.children[1].getValue(ctx);
    return ELArithmetic.multiply(obj0, obj1);
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:8,代码来源:AstMult.java


示例17: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(ELContext context) throws PropertyNotFoundException, ELException {
	EvaluationContext ctx = new EvaluationContext(context, this.fnMapper, this.varMapper);
	Object value = this.getNode().getValue(ctx);
	if (this.expectedType != null) {
		return ELSupport.coerceToType(value, this.expectedType);
	}
	return value;
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:10,代码来源:ValueExpressionImpl.java


示例18: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
	Object obj = this.children[0].getValue(ctx);

	if (obj == null) {
		return Long.valueOf(0);
	}
	if (obj instanceof BigDecimal) {
		return ((BigDecimal) obj).negate();
	}
	if (obj instanceof BigInteger) {
		return ((BigInteger) obj).negate();
	}
	if (obj instanceof String) {
		if (isStringFloat((String) obj)) {
			return new Double(-Double.parseDouble((String) obj));
		}
		return Long.valueOf(-Long.parseLong((String) obj));
	}
	if (obj instanceof Long) {
		return Long.valueOf(-((Long) obj).longValue());
	}
	if (obj instanceof Double) {
		return new Double(-((Double) obj).doubleValue());
	}
	if (obj instanceof Integer) {
		return Integer.valueOf(-((Integer) obj).intValue());
	}
	if (obj instanceof Float) {
		return new Float(-((Float) obj).floatValue());
	}
	if (obj instanceof Short) {
		return Short.valueOf((short) -((Short) obj).shortValue());
	}
	if (obj instanceof Byte) {
		return Byte.valueOf((byte) -((Byte) obj).byteValue());
	}
	Long num = (Long) coerceToNumber(obj, Long.class);
	return Long.valueOf(-num.longValue());
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:41,代码来源:AstNegative.java


示例19: getValue

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx)
        throws ELException {
    Object obj = children[0].getValue(ctx);
    Boolean b = coerceToBoolean(obj);
    if (!b.booleanValue()) {
        return b;
    }
    obj = children[1].getValue(ctx);
    b = coerceToBoolean(obj);
    return b;
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:13,代码来源:AstAnd.java


示例20: isReadOnly

import org.apache.el.lang.EvaluationContext; //导入依赖的package包/类
@Override
public boolean isReadOnly(ELContext context)
        throws PropertyNotFoundException, ELException {
    EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
            this.varMapper);
    return this.getNode().isReadOnly(ctx);
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:8,代码来源:ValueExpressionImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ControlTouchEvent类代码示例发布时间:2022-05-22
下一篇:
Java Size类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap