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


Java EvaluationContext.getVariableMapper方法代码示例

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


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

示例1: 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

示例2: setValue

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

示例4: setValue

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

示例5: 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:liaokailin,项目名称:tomcat7,代码行数:17,代码来源:AstIdentifier.java

示例6: 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

示例7: 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:how2j,项目名称:lazycat,代码行数:17,代码来源:AstIdentifier.java

示例8: 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

示例9: getMethodExpression

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
private final MethodExpression getMethodExpression(EvaluationContext ctx)
        throws ELException {
    Object obj = null;

    // case A: ValueExpression exists, getValue which must
    // be a MethodExpression
    VariableMapper varMapper = ctx.getVariableMapper();
    ValueExpression ve = null;
    if (varMapper != null) {
        ve = varMapper.resolveVariable(this.image);
        if (ve != null) {
            obj = ve.getValue(ctx);
        }
    }

    // case B: evaluate the identity against the ELResolver, again, must be
    // a MethodExpression to be able to invoke
    if (ve == null) {
        ctx.setPropertyResolved(false);
        obj = ctx.getELResolver().getValue(ctx, null, this.image);
    }

    // finally provide helpful hints
    if (obj instanceof MethodExpression) {
        return (MethodExpression) obj;
    } else if (obj == null) {
        throw new MethodNotFoundException("Identity '" + this.image
                + "' was null and was unable to invoke");
    } else {
        throw new ELException(
                "Identity '"
                        + this.image
                        + "' does not reference a MethodExpression instance, returned type: "
                        + obj.getClass().getName());
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:37,代码来源:AstIdentifier.java

示例10: getType

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
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);
    return ctx.getELResolver().getType(ctx, null, this.image);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:AstIdentifier.java

示例11: getValue

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
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);
    return ctx.getELResolver().getValue(ctx, null, this.image);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:AstIdentifier.java

示例12: isReadOnly

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
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);
    return ctx.getELResolver().isReadOnly(ctx, null, this.image);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:AstIdentifier.java

示例13: setValue

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
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);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:14,代码来源:AstIdentifier.java

示例14: getMethodExpression

import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
private final MethodExpression getMethodExpression(EvaluationContext ctx) throws ELException {
	Object obj = null;

	// case A: ValueExpression exists, getValue which must
	// be a MethodExpression
	VariableMapper varMapper = ctx.getVariableMapper();
	ValueExpression ve = null;
	if (varMapper != null) {
		ve = varMapper.resolveVariable(this.image);
		if (ve != null) {
			obj = ve.getValue(ctx);
		}
	}

	// case B: evaluate the identity against the ELResolver, again, must be
	// a MethodExpression to be able to invoke
	if (ve == null) {
		ctx.setPropertyResolved(false);
		obj = ctx.getELResolver().getValue(ctx, null, this.image);
	}

	// finally provide helpful hints
	if (obj instanceof MethodExpression) {
		return (MethodExpression) obj;
	} else if (obj == null) {
		throw new MethodNotFoundException("Identity '" + this.image + "' was null and was unable to invoke");
	} else {
		throw new ELException("Identity '" + this.image
				+ "' does not reference a MethodExpression instance, returned type: " + obj.getClass().getName());
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:32,代码来源:AstIdentifier.java


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