Package abstrasy

Examples of abstrasy.Node$VDelegable


  public Node external_move(Node startAt) throws Exception {
    startAt.isGoodArgsLength(true, 3);
    File f = new File(startAt.getSubNode(1, Node.TYPE_STRING).getString());
    File f2 = new File(startAt.getSubNode(2, Node.TYPE_STRING).getString());
    return new Node((f.renameTo(f2)) ? Node.TRUE: Node.FALSE);
  }
View Full Code Here


  public Node external_copy_file(Node startAt) throws Exception {
    startAt.isGoodArgsCnt(3);
    File f = new File(startAt.getSubNode(1, Node.TYPE_STRING).getString());
    File f2 = new File(startAt.getSubNode(2, Node.TYPE_STRING).getString());
    return new Node((External_FileSystemAdapter.copyFile(f.getAbsolutePath(), f2.getAbsolutePath())) ? Node.FALSE: Node.TRUE);
  }
View Full Code Here

  public Node external_copy_directory(Node startAt) throws Exception {
    startAt.isGoodArgsCnt(3);
    File f = new File(startAt.getSubNode(1, Node.TYPE_STRING).getString());
    File f2 = new File(startAt.getSubNode(2, Node.TYPE_STRING).getString());
    return new Node((External_FileSystemAdapter.copyDir(f.getAbsolutePath(), f2.getAbsolutePath())) ? Node.FALSE: Node.TRUE);
  }
View Full Code Here

  }

  public Node external_make_directory(Node startAt) throws Exception {
    startAt.isGoodArgsCnt(2);
    File f = new File(startAt.getSubNode(1, Node.TYPE_STRING).getString());
    return new Node((f.mkdirs()) ? Node.TRUE: Node.FALSE);
  }
View Full Code Here

  }

  public Node external_toURL(Node startAt) throws Exception {
    startAt.isGoodArgsCnt(2);
    File f = new File(startAt.getSubNode(1, Node.TYPE_STRING).getString());
    return new Node(f.toURI().toURL().toString());
  }
View Full Code Here

        return null;
    }
   
    public Node external_is_opened(Node startAt) throws Exception {
        startAt.isGoodArgsCnt(1);
        return new Node(inUse ? Node.TRUE: Node.FALSE);
    }
View Full Code Here

   * @param arg0 (argument unique de argv)
   * @return
   * @throws Exception
   */
  public Node call_unary(Node arg0) throws Exception {
        Node expr=Node.createExpr().append(methode);//.append(symbol); (optimisation l.bruninx, 2012-06-26)
        if(arg0!=null)expr.append(arg0);
    //Heap.push(); (optimisation l.bruninx, 2012-06-26)
        //Heap.setSELF(object);
    return expr.exec(false);
        //Heap.pull();
        //return result;
  }
View Full Code Here

   * @return
   */
  public static ContextualCall createContextualCall(Node vObject, String symbole) {
        //System.out.println("Context OBJ="+vObject);
        //System.out.println("Context SYM="+symbole);
        Node meth;
        try{
            ASymbol symb=new ASymbol(PCoder.unselfing(symbole));
            meth=Heap.getv(vObject, symb);
            /*
             * meth prend déjà une référence vers sont propre heap.
View Full Code Here

        try {
            Object eobject = externalNode.getExternal();
            Object args[] = { startAt };
            Class acls[] = { startAt.getClass() };
            Method meth;
            Node mnode = startAt.elementAt(0);
            mnode.requireNodeType(Node.TYPE_QSYMBOL);
            String mname = PCoder.unselfing(mnode.getSymbol().getStr());
           
            try {
                meth = eobject.getClass().getMethod(Name.toExternal(mname), acls);
            }
            catch (Exception ex1) {
                ex1.printStackTrace();
                meth = null;
            }

            if (meth == null)
                throw new InterpreterException(StdErrors.extend(StdErrors.External_error, "not found " + mname + " : "+externalNode  ));

           
            Node old_self = SELF.swap(externalNode);
            Object obj = meth.invoke(eobject, args);
            SELF.restore(old_self);
           

            if (obj != null)
View Full Code Here

        externalNode.requireNodeType(Node.TYPE_EXTERNAL);
        Object eobject = externalNode.getExternal();
        Object args[] = { startAt };
        Class acls[] = { startAt.getClass() };
        Method meth;
        Node mnode = startAt.elementAt(0);
        mnode.requireNodeType(Node.TYPE_QSYMBOL);
        String mname = PCoder.unselfing(mnode.getSymbol().getStr());
        try {
            meth = eobject.getClass().getMethod(Name.toExternal(mname), acls);
        }
        catch (Exception ex1) {
            return null;
View Full Code Here

TOP

Related Classes of abstrasy.Node$VDelegable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.