예제 #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();
  }
예제 #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;
    }
  }
예제 #3
0
 public MethodInfo getMethodInfo(ELContext elctx) {
   return node.getMethodInfo(getContext(elctx));
 }
예제 #4
0
 public Class<?> getType(ELContext elctx) {
   return node.getType(getContext(elctx));
 }
예제 #5
0
 public boolean isReadOnly(ELContext elctx) {
   return node.isReadOnly(getContext(elctx));
 }
예제 #6
0
 public void setValue(ELContext elctx, Object value) {
   node.setValue(getContext(elctx), value);
 }
예제 #7
0
 public Object getValue(ELContext elctx) {
   return node.getValue(getContext(elctx));
 }
예제 #8
0
 public Object invoke(ELContext elctx, Closure[] args) {
   return node.invoke(getContext(elctx), args);
 }