當前位置: 首頁>>代碼示例>>Java>>正文


Java VariableMapper.resolveVariable方法代碼示例

本文整理匯總了Java中javax.el.VariableMapper.resolveVariable方法的典型用法代碼示例。如果您正苦於以下問題:Java VariableMapper.resolveVariable方法的具體用法?Java VariableMapper.resolveVariable怎麽用?Java VariableMapper.resolveVariable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.el.VariableMapper的用法示例。


在下文中一共展示了VariableMapper.resolveVariable方法的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: 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

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

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

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

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

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

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

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

示例10: 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:deathspeeder,項目名稱:class-guard,代碼行數:17,代碼來源:AstIdentifier.java

示例11: getMethodExpression

import javax.el.VariableMapper; //導入方法依賴的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

示例12: getType

import javax.el.VariableMapper; //導入方法依賴的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

示例13: getValue

import javax.el.VariableMapper; //導入方法依賴的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

示例14: isReadOnly

import javax.el.VariableMapper; //導入方法依賴的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

示例15: setValue

import javax.el.VariableMapper; //導入方法依賴的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


注:本文中的javax.el.VariableMapper.resolveVariable方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。