@Override public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }
public MethodExpression createMethodExpression(Class expectedReturnType, Class[] expectedParamTypes) throws ELException { Node n = this.build(); if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } } }
@Override public MethodInfo getMethodInfo(ELContext context) throws ELException { context.notifyBeforeEvaluation(getExpressionString()); MethodInfo result = new MethodInfo(this.expr, this.expectedType, this.paramTypes); context.notifyAfterEvaluation(getExpressionString()); return result; }
public MethodExpression createMethodExpression(Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException { Node n = this.build(); if (!n.isParametersProvided() && expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } } }
@Override public MethodInfo getMethodInfo(ELContext context) throws ELException { context.notifyBeforeEvaluation(getExpressionString()); MethodInfo result = new MethodInfo(this.expr, this.expectedType, this.paramTypes); context.notifyAfterEvaluation(getExpressionString()); return result; }
public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }
public MethodExpression createMethodExpression(Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException { Node n = this.build(); if (!n.isParametersProvided() && expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } }
@Override public Object invoke(ELContext context, Object[] params) throws ELException { context.notifyBeforeEvaluation(getExpressionString()); Object result; if (this.expectedType != null) { result = context.convertToType(this.expr, this.expectedType); } else { result = this.expr; } context.notifyAfterEvaluation(getExpressionString()); return result; }
@Override public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }
public MethodExpression createMethodExpression(Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException { Node n = this.build(); if (!n.isParametersProvided() && expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } } }
@Override public Object invoke(ELContext context, Object[] params) throws ELException { context.notifyBeforeEvaluation(getExpressionString()); Object result; if (this.expectedType != null) { result = context.convertToType(this.expr, this.expectedType); } else { result = this.expr; } context.notifyAfterEvaluation(getExpressionString()); return result; }
@Override public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }
public MethodExpression createMethodExpression(Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException { Node n = this.build(); if (!n.isParametersProvided() && expectedParamTypes == null) { throw new NullPointerException(MessageFactory .get("error.method.nullParms")); } if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException("Not a Valid Method Expression: " + expression); } } }
@Override public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }
public MethodExpression createMethodExpression(Class<?> expectedReturnType, Class<?>[] expectedParamTypes) throws ELException { Node n = this.build(); if (!n.isParametersProvided() && expectedParamTypes == null) { throw new NullPointerException(MESSAGES.nullParameterTypes()); } if (n instanceof AstValue || n instanceof AstIdentifier) { return new MethodExpressionImpl(expression, n, this.fnMapper, this.varMapper, expectedReturnType, expectedParamTypes); } else if (n instanceof AstLiteralExpression) { return new MethodExpressionLiteral(expression, expectedReturnType, expectedParamTypes); } else { throw new ELException(MESSAGES.invalidMethodExpression(expression)); } } }
@Override public boolean equals(Object obj) { return (obj instanceof MethodExpressionLiteral && this.hashCode() == obj.hashCode()); }