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


Java VariableMapper类代码示例

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


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

示例1: setValue

import javax.el.VariableMapper; //导入依赖的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:sdw2330976,项目名称:apache-tomcat-7.0.57,代码行数:19,代码来源:AstIdentifier.java

示例2: buildEvaluationContext

import javax.el.VariableMapper; //导入依赖的package包/类
public static EvaluationContext buildEvaluationContext(
        Map<String, Method> functionMethodMap,
        Map<String, Object> attributeMap) {

    VariableMapper vMapper = buildVariableMapper(attributeMap);
    FunctionMapper fMapper = buildFunctionMapper(functionMethodMap);

    EsfingeELContext context = new EsfingeELContext(fMapper, vMapper,
    		new ArrayELResolver(), new ListELResolver(), new MapELResolver(), new BeanELResolver());

    return new EvaluationContext(context, fMapper, vMapper);
}
 
开发者ID:EsfingeFramework,项目名称:querybuilder,代码行数:13,代码来源:ELUtils.java

示例3: createELContext

import javax.el.VariableMapper; //导入依赖的package包/类
private ELContext createELContext(final ELResolver resolver, final FunctionMapper functionMapper, final VariableMapper variableMapper) {

        return new ELContext() {
            @Override
            public ELResolver getELResolver() {
                return resolver;
            }

            @Override
            public FunctionMapper getFunctionMapper() {
                return functionMapper;
            }

            @Override
            public VariableMapper getVariableMapper() {
                return variableMapper;
            }
        };
    }
 
开发者ID:astefanutti,项目名称:metrics-cdi,代码行数:20,代码来源:ElMetricName.java

示例4: getType

import javax.el.VariableMapper; //导入依赖的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

示例5: getValue

import javax.el.VariableMapper; //导入依赖的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

示例6: isReadOnly

import javax.el.VariableMapper; //导入依赖的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

示例7: getValueReference

import javax.el.VariableMapper; //导入依赖的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

示例8: _backupContextVariables

import javax.el.VariableMapper; //导入依赖的package包/类
/**
 * Saves the var and varStatus information from both the variable mapper as well as the
 * page context so that the values may be restored to their values after the for each tag
 * has finished iterating.
 * @param vm the current variable mapper
 */
private void _backupContextVariables(VariableMapper vm)
{
  if (_var != null)
  {
    // Store off the current values used by the var name so that it may be restored after
    // tag processing
    _previousVarExpression = vm.resolveVariable(_var);
    _previousPageContextVarValue = pageContext.getAttribute(_var);
  }

  if (_varStatus != null)
  {
    // Store off the current values for the varStatus name to be able to restore it after
    // processing this tag
    _previousVarStatusExpression = vm.resolveVariable(_varStatus);
    _previousPageContextVarStatusValue = pageContext.getAttribute(_varStatus);
  }
}
 
开发者ID:apache,项目名称:myfaces-trinidad,代码行数:25,代码来源:ForEachTag.java

示例9: ValueExpressionImpl

import javax.el.VariableMapper; //导入依赖的package包/类
/**
 * 
 */
public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper,
        VariableMapper varMapper, Class expectedType) {
    this.expr = expr;
    this.node = node;
    this.fnMapper = fnMapper;
    this.varMapper = varMapper;
    this.expectedType = expectedType;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:12,代码来源:ValueExpressionImpl.java

示例10: ExpressionBuilder

import javax.el.VariableMapper; //导入依赖的package包/类
/**
 *
 */
public ExpressionBuilder(String expression, ELContext ctx)
        throws ELException {
    this.expression = expression;

    FunctionMapper ctxFn = ctx.getFunctionMapper();
    VariableMapper ctxVar = ctx.getVariableMapper();

    if (ctxFn != null) {
        this.fnMapper = new FunctionMapperFactory(ctxFn);
    }
    if (ctxVar != null) {
        this.varMapper = new VariableMapperFactory(ctxVar);
    }
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:18,代码来源:ExpressionBuilder.java

示例11: getType

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

示例12: getValue

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

示例13: isReadOnly

import javax.el.VariableMapper; //导入依赖的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

示例14: setValue

import javax.el.VariableMapper; //导入依赖的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

示例15: getValueReference

import javax.el.VariableMapper; //导入依赖的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


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