Exemple #1
0
  private void writeObject(ObjectOutputStream out) throws IOException {
    // rebuild variable mapper to be saved
    if (context != null) {
      VariableMapperBuilder vmb = new VariableMapperBuilder(context);
      node.applyVariableMapper(vmb);
      this.vm = vmb.getVariableMapper();
    }

    out.defaultWriteObject();
  }
Exemple #2
0
  public int arity(ELContext elctx) {
    if (node instanceof ELNode.LAMBDA) {
      return ((ELNode.LAMBDA) node).vars.length;
    }

    MethodInfo info = node.getMethodInfo(getContext(elctx));
    if (info != null && info.getParamTypes() != null) {
      return info.getParamTypes().length;
    } else {
      return -1;
    }
  }
Exemple #3
0
 public MethodInfo getMethodInfo(ELContext elctx) {
   return node.getMethodInfo(getContext(elctx));
 }
Exemple #4
0
 public Class<?> getType(ELContext elctx) {
   return node.getType(getContext(elctx));
 }
Exemple #5
0
 public boolean isReadOnly(ELContext elctx) {
   return node.isReadOnly(getContext(elctx));
 }
Exemple #6
0
 public void setValue(ELContext elctx, Object value) {
   node.setValue(getContext(elctx), value);
 }
Exemple #7
0
 public Object getValue(ELContext elctx) {
   return node.getValue(getContext(elctx));
 }
Exemple #8
0
 public Object invoke(ELContext elctx, Closure[] args) {
   return node.invoke(getContext(elctx), args);
 }