本文整理汇总了Java中org.apache.el.lang.EvaluationContext.isPropertyResolved方法的典型用法代码示例。如果您正苦于以下问题:Java EvaluationContext.isPropertyResolved方法的具体用法?Java EvaluationContext.isPropertyResolved怎么用?Java EvaluationContext.isPropertyResolved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.el.lang.EvaluationContext
的用法示例。
在下文中一共展示了EvaluationContext.isPropertyResolved方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setValue
import org.apache.el.lang.EvaluationContext; //导入方法依赖的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));
}
}
示例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));
}
}
示例3: 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;
}
示例4: 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;
}
示例5: 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));
}
}
示例6: 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;
}
示例7: 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;
}
示例8: 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;
}
示例9: setValue
import org.apache.el.lang.EvaluationContext; //导入方法依赖的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));
}
}
示例10: getType
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public Class<?> getType(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
Class<?> result = ctx.getELResolver().getType(ctx, t.base, t.property);
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get(
"error.resolver.unhandled", t.base, t.property));
}
return result;
}
示例11: getValue
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
Object base = this.children[0].getValue(ctx);
int propCount = this.jjtGetNumChildren();
int i = 1;
Object suffix = null;
ELResolver resolver = ctx.getELResolver();
while (base != null && i < propCount) {
suffix = this.children[i].getValue(ctx);
if (i + 1 < propCount &&
(this.children[i+1] instanceof AstMethodParameters)) {
AstMethodParameters mps =
(AstMethodParameters) this.children[i+1];
// This is a method
Object[] paramValues = mps.getParameters(ctx);
base = resolver.invoke(ctx, base, suffix,
getTypesFromValues(paramValues), paramValues);
i+=2;
} else {
// This is a property
if (suffix == null) {
return null;
}
ctx.setPropertyResolved(false);
base = resolver.getValue(ctx, base, suffix);
i++;
}
}
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get(
"error.resolver.unhandled", base, suffix));
}
return base;
}
示例12: isReadOnly
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
boolean result =
ctx.getELResolver().isReadOnly(ctx, t.base, t.property);
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get(
"error.resolver.unhandled", t.base, t.property));
}
return result;
}
示例13: getType
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public Class<?> getType(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
Class<?> result = ctx.getELResolver().getType(ctx, t.base, t.property);
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled", t.base, t.property));
}
return result;
}
示例14: getValue
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public Object getValue(EvaluationContext ctx) throws ELException {
Object base = this.children[0].getValue(ctx);
int propCount = this.jjtGetNumChildren();
int i = 1;
Object suffix = null;
ELResolver resolver = ctx.getELResolver();
while (base != null && i < propCount) {
suffix = this.children[i].getValue(ctx);
if (i + 1 < propCount && (this.children[i + 1] instanceof AstMethodParameters)) {
AstMethodParameters mps = (AstMethodParameters) this.children[i + 1];
// This is a method
Object[] paramValues = mps.getParameters(ctx);
base = resolver.invoke(ctx, base, suffix, getTypesFromValues(paramValues), paramValues);
i += 2;
} else {
// This is a property
if (suffix == null) {
return null;
}
ctx.setPropertyResolved(false);
base = resolver.getValue(ctx, base, suffix);
i++;
}
}
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled", base, suffix));
}
return base;
}
示例15: isReadOnly
import org.apache.el.lang.EvaluationContext; //导入方法依赖的package包/类
@Override
public boolean isReadOnly(EvaluationContext ctx) throws ELException {
Target t = getTarget(ctx);
ctx.setPropertyResolved(false);
boolean result = ctx.getELResolver().isReadOnly(ctx, t.base, t.property);
if (!ctx.isPropertyResolved()) {
throw new PropertyNotFoundException(MessageFactory.get("error.resolver.unhandled", t.base, t.property));
}
return result;
}