Java源码示例:javax.servlet.jsp.el.FunctionMapper
示例1
@Override
public Expression parseExpression(String expression,
@SuppressWarnings("rawtypes") Class expectedType,
FunctionMapper fMapper) throws ELException {
try {
ELContextImpl ctx =
new ELContextImpl(ELContextImpl.getDefaultResolver(factory));
if (fMapper != null) {
ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
}
ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
return new ExpressionImpl(ve, factory);
} catch (javax.el.ELException e) {
throw new ELParseException(e.getMessage());
}
}
示例2
@Override
public Expression parseExpression(String expression,
@SuppressWarnings("rawtypes") // API does not use generics
Class expectedType,
FunctionMapper fMapper) throws ELException {
try {
ELContextImpl ctx =
new ELContextImpl(ELContextImpl.getDefaultResolver());
if (fMapper != null) {
ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
}
ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
return new ExpressionImpl(ve);
} catch (javax.el.ELException e) {
throw new ELParseException(e.getMessage());
}
}
示例3
@Override
public Expression parseExpression(String expression,
@SuppressWarnings("rawtypes") // API does not use generics
Class expectedType,
FunctionMapper fMapper) throws ELException {
try {
ELContextImpl ctx =
new ELContextImpl(ELContextImpl.getDefaultResolver());
if (fMapper != null) {
ctx.setFunctionMapper(new FunctionMapperImpl(fMapper));
}
ValueExpression ve = this.factory.createValueExpression(ctx, expression, expectedType);
return new ExpressionImpl(ve);
} catch (javax.el.ELException e) {
throw new ELParseException(e.getMessage());
}
}
示例4
public Expression parseExpression(String expression,
Class expectedType,
FunctionMapper fMapper )
throws ELException {
ExpressionFactory fac = ExpressionFactory.newInstance();
javax.el.ValueExpression expr;
ELContextImpl elContext = new ELContextImpl(null);
javax.el.FunctionMapper fm = new FunctionMapperWrapper(fMapper);
elContext.setFunctionMapper(fm);
try {
expr = fac.createValueExpression(
elContext,
expression, expectedType);
} catch (javax.el.ELException ex) {
throw new ELException(ex);
}
return new ExpressionImpl(expr, pageContext);
}
示例5
@Override
public Object evaluate(String expression,
@SuppressWarnings("rawtypes") Class expectedType,
VariableResolver vResolver, FunctionMapper fMapper)
throws ELException {
return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}
示例6
@Override
public Object evaluate(String expression,
@SuppressWarnings("rawtypes") // API does not use generics
Class expectedType,
VariableResolver vResolver, FunctionMapper fMapper)
throws ELException {
return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}
示例7
@Override
public Object evaluate(String expression,
@SuppressWarnings("rawtypes") // API does not use generics
Class expectedType,
VariableResolver vResolver, FunctionMapper fMapper)
throws ELException {
return this.parseExpression(expression, expectedType, fMapper).evaluate(vResolver);
}
示例8
public Object evaluate(String expression,
Class expectedType,
VariableResolver vResolver,
FunctionMapper fMapper )
throws ELException {
ELContextImpl elContext;
if (vResolver instanceof VariableResolverImpl) {
elContext = (ELContextImpl) pageContext.getELContext();
}
else {
// The provided variable Resolver is a custom resolver,
// wrap it with a ELResolver
elContext = new ELContextImpl(new ELResolverWrapper(vResolver));
}
javax.el.FunctionMapper fm = new FunctionMapperWrapper(fMapper);
elContext.setFunctionMapper(fm);
ExpressionFactory fac = ExpressionFactory.newInstance();
Object value;
try {
ValueExpression expr = fac.createValueExpression(
elContext,
expression,
expectedType);
value = expr.getValue(elContext);
} catch (javax.el.ELException ex) {
throw new ELException(ex);
}
return value;
}
示例9
public FunctionMapperImpl(FunctionMapper fnMapper) {
this.fnMapper = fnMapper;
}
示例10
public FunctionMapperImpl(FunctionMapper fnMapper) {
this.fnMapper = fnMapper;
}
示例11
public FunctionMapperImpl(FunctionMapper fnMapper) {
this.fnMapper = fnMapper;
}
示例12
FunctionMapperWrapper(FunctionMapper mapper) {
this.mapper = mapper;
}
示例13
@Override
public Object evaluate(String arg0, Class arg1, VariableResolver arg2, FunctionMapper arg3) throws ELException {
return null;
}
示例14
@Override
public Expression parseExpression(String arg0, Class arg1, FunctionMapper arg2) throws ELException {
return null;
}