public boolean isLiteralText() {
return false;
}
+
+ /**
+ * @since EL 2.2
+ */
+ @Override
+ public boolean isParametersProvided() {
+ return this.getNode().isParametersProvided();
+ }
+
}
import javax.el.PropertyNotFoundException;
import javax.el.PropertyNotWritableException;
import javax.el.ValueExpression;
+import javax.el.ValueReference;
import javax.el.VariableMapper;
import org.apache.el.lang.ELSupport;
private transient Node node;
public ValueExpressionImpl() {
-
+ super();
}
/**
public String toString() {
return "ValueExpression["+this.expr+"]";
}
+
+ /**
+ * @since EL 2.2
+ */
+ @Override
+ public ValueReference getValueReference(ELContext context) {
+ EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
+ this.varMapper);
+ return this.getNode().getValueReference(ctx);
+ }
+
}
import javax.el.ELResolver;
import javax.el.MethodInfo;
import javax.el.PropertyNotFoundException;
+import javax.el.ValueReference;
import org.apache.el.lang.ELSupport;
import org.apache.el.lang.EvaluationContext;
}
return result;
}
+
+ /**
+ * @since EL 2.2
+ */
+ @Override
+ public ValueReference getValueReference(EvaluationContext ctx) {
+ // Check this is a reference to a base and a property
+ if (this.children.length > 2 && this.jjtGetChild(2) instanceof Suffix) {
+ // This is a method call
+ return null;
+ }
+ Target t = getTarget(ctx);
+ return new ValueReference(t.base, this.jjtGetChild(1).getValue(ctx));
+ }
+
+
}
import javax.el.ELException;
import javax.el.MethodInfo;
+import javax.el.ValueReference;
import org.apache.el.lang.EvaluationContext;
/**
* @author Jacob Hookom [jacob@hookom.net]
- * @version $Change: 181177 $$Date$$Author$
+ * $Id$
*/
public interface Node {
public Object getValue(EvaluationContext ctx) throws ELException;
public void setValue(EvaluationContext ctx, Object value) throws ELException;
- public Class getType(EvaluationContext ctx) throws ELException;
+ public Class<?> getType(EvaluationContext ctx) throws ELException;
public boolean isReadOnly(EvaluationContext ctx) throws ELException;
public void accept(NodeVisitor visitor) throws Exception;
- public MethodInfo getMethodInfo(EvaluationContext ctx, Class[] paramTypes) throws ELException;
- public Object invoke(EvaluationContext ctx, Class[] paramTypes, Object[] paramValues) throws ELException;
+ public MethodInfo getMethodInfo(EvaluationContext ctx, Class<?>[] paramTypes)
+ throws ELException;
+ public Object invoke(EvaluationContext ctx, Class<?>[] paramTypes,
+ Object[] paramValues) throws ELException;
+
+ /**
+ * @since EL 2.2
+ */
+ public ValueReference getValueReference(EvaluationContext ctx);
+
+ /**
+ * @since EL 2.2
+ */
+ public boolean isParametersProvided();
}
import javax.el.ELException;
import javax.el.MethodInfo;
import javax.el.PropertyNotWritableException;
+import javax.el.ValueReference;
import org.apache.el.lang.ELSupport;
import org.apache.el.lang.EvaluationContext;
}
}
- // Interface el.parser.Node uses raw types (and is auto-generated)
- public Object invoke(EvaluationContext ctx,
- @SuppressWarnings("unchecked") Class[] paramTypes,
+ public Object invoke(EvaluationContext ctx, Class<?>[] paramTypes,
Object[] paramValues) throws ELException {
throw new UnsupportedOperationException();
}
- // Interface el.parser.Node uses a raw type (and is auto-generated)
public MethodInfo getMethodInfo(EvaluationContext ctx,
- @SuppressWarnings("unchecked") Class[] paramTypes)
- throws ELException {
+ Class<?>[] paramTypes) throws ELException {
throw new UnsupportedOperationException();
}
+
+ /**
+ * @since EL 2.2
+ */
+ public ValueReference getValueReference(EvaluationContext ctx) {
+ return null;
+ }
+
+ /**
+ * @since EL 2.2
+ */
+ public boolean isParametersProvided() {
+ return false;
+ }
}