⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exprfactory.java

📁 RESIN 3.2 最新源码
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
   * Creates a geq expression.   */  public Expr createGeq(Expr left, Expr right)  {    return new GeqExpr(left, right);  }  /**   * Creates an eq expression.   */  public Expr createEq(Expr left, Expr right)  {    return new EqExpr(left, right);  }  /**   * Creates a neq expression.   */  public Expr createNeq(Expr left, Expr right)  {    return new NeqExpr(left, right);  }  /**   * Creates an equals expression.   */  public Expr createEquals(Expr left, Expr right)  {    return new EqualsExpr(left, right);  }  /**   * Creates an assignment expression.   */  public Expr createAssign(AbstractVarExpr left, Expr right)  {    return new AssignExpr(left, right);  }  /**   * Creates an assignment expression.   */  public Expr createAssignRef(AbstractVarExpr left, Expr right)  {    return new AssignRefExpr(left, right);  }  /**   * Creates a ref '&$a' expression.   */  public RefExpr createRef(Expr base)  {    return new RefExpr(base);  }  /**   * Creates an and expression.   */  public Expr createAnd(Expr left, Expr right)  {    return new AndExpr(left, right);  }  /**   * Creates an or expression.   */  public Expr createOr(Expr left, Expr right)  {    return new OrExpr(left, right);  }  /**   * Creates an xor expression.   */  public Expr createXor(Expr left, Expr right)  {    return new XorExpr(left, right);  }  /**   * Creates a comma expression.   */  public Expr createComma(Expr left, Expr right)  {    return new CommaExpr(left, right);  }  /**   * Creates an instanceof expression.   */  public Expr createInstanceOf(Expr expr, String name)  {    return new InstanceOfExpr(expr, name);  }  /**   * Creates an instanceof expression.   */  public Expr createInstanceOfVar(Expr expr, Expr name)  {    return new InstanceOfVarExpr(expr, name);  }  /**   * Creates an each expression.   */  public Expr createEach(Expr expr)  {    return new EachExpr(expr);  }  /**   * Creates a list expression.   */  public final Expr createList(QuercusParser parser,			       ListHeadExpr head, Expr value)  {    boolean isSuppress = value instanceof SuppressErrorExpr;    if (isSuppress) {      SuppressErrorExpr suppressExpr = (SuppressErrorExpr) value;      value = suppressExpr.getExpr();    }    Expr expr;    if (value instanceof EachExpr) {      expr = createListEach(head.getVarList(), (EachExpr) value);    }    else      expr = createList(head, value);    if (isSuppress)      return createSuppress(expr);    else      return expr;  }  /**   * Creates a list expression.   */  public ListHeadExpr createListHead(ArrayList<Expr> keys)  {    return new ListHeadExpr(keys);  }  /**   * Creates a list expression.   */  public Expr createList(ListHeadExpr head, Expr value)  {    return new ListExpr(head, value);  }  /**   * Creates a list expression.   */  public Expr createListEach(Expr []varList, EachExpr value)  {    return new ListEachExpr(varList, value);  }  /**   * Creates an conditional expression.   */  public Expr createConditional(Expr test, Expr left, Expr right)  {    return new ConditionalExpr(test, left, right);  }  /**   * Creates a array() expression.   */  public Expr createArrayFun(ArrayList<Expr> keys, ArrayList<Expr> values)  {    return new ArrayFunExpr(keys, values);  }  /**   * Creates a new function call.   */  public Expr createFunction(Location loc,			     String name,			     ArrayList<Expr> args)  {    return new FunctionExpr(loc, name, args);  }  /**   * Creates a new var function call.   */  public VarFunctionExpr createVarFunction(Location loc,					   Expr name,					   ArrayList<Expr> args)  {    return new VarFunctionExpr(loc, name, args);  }  /**   * Creates a new function call.   */  public Expr createClassMethod(Location loc,				String className,				String name,				ArrayList<Expr> args)  {    return new ClassMethodExpr(loc, className, name, args);  }    /**   * Creates a new function call based on the class context.   */  public Expr createLateStaticBindingClassMethod(Location loc,                                                 String name,                                                 ArrayList<Expr> args)  {    return new LateStaticBindingClassMethodExpr(loc, name, args);  }  /**   * Creates a static function call.   */  public Expr createStaticMethod(Location loc,				 String className,				 String name,				 ArrayList<Expr> args)  {    return new StaticMethodExpr(loc, className, name, args);  }    /**   * Creates a static function call based on the calling class.   */  public Expr createLateStaticBindingStaticMethod(Location loc,                                                  String name,                                                  ArrayList<Expr> args)  {    return new LateStaticBindingStaticMethodExpr(loc, name, args);  }  /**   * Creates a new method A::$f()   */  public Expr createStaticVarMethod(Location loc,				    String className,				    Expr var,				    ArrayList<Expr> args)  {    return new StaticVarMethodExpr(loc, className, var, args);  }    /**   * Creates a new method static::$f()   */  public Expr createLateStaticBindingStaticVarMethod(Location loc,                                                     Expr var,                                                     ArrayList<Expr> args)  {    return new LateStaticBindingStaticVarMethodExpr(loc, var, args);  }  /**   * Creates a new method call.   */  public Expr createMethodCall(Location loc,				       Expr objExpr,				       String name,				       ArrayList<Expr> args)  {    return new MethodCallExpr(loc, objExpr, name, args);  }  /**   * Creates a new method call.   */  public Expr createVarMethodCall(Location loc,				  Expr objExpr,				  Expr name,				  ArrayList<Expr> args)  {    return new VarMethodCallExpr(loc, objExpr, name, args);  }  /**   * Creates a new function call.   */  public NewExpr createNew(Location loc,			   String name,			   ArrayList<Expr> args)  {    return new NewExpr(loc, name, args);  }  /**   * Creates a new function call.   */  public VarNewExpr createVarNew(Location loc,				 Expr name,				 ArrayList<Expr> args)  {    return new VarNewExpr(loc, name, args);  }  /**   * Creates an include expr   */  public Expr createInclude(Location loc,			    Path source,			    Expr expr)  {    return new IncludeExpr(loc, source, expr, false);  }  /**   * Creates an include expr   */  public Expr createRequire(Location loc,			    Path source,			    Expr expr)  {    return new IncludeExpr(loc, source, expr, true);  }  /**   * Creates an include expr   */  public Expr createIncludeOnce(Location loc,				Path source,				Expr expr)  {    return new IncludeOnceExpr(loc, source, expr, false);  }  /**   * Creates an include expr   */  public Expr createRequireOnce(Location loc,				Path source,				Expr expr)  {    return new IncludeOnceExpr(loc, source, expr, true);  }  /**   * Creates a Quercus class import.   */  public Expr createImport(Location loc,                           String name,                           boolean isWildcard)  {    return new ImportExpr(loc, name, isWildcard);  }  /**   * Creates a null literal expression.   */  public Statement createNullStatement()  {    return NullStatement.NULL;  }  /**   * Creates an echo statement   */  public Statement createEcho(Location loc, Expr expr)  {    return new EchoStatement(loc, expr);  }  /**   * Creates an expr statement   */  public Statement createExpr(Location loc, Expr expr)  {    return new ExprStatement(loc, expr);  }  public final Statement createBlock(Location loc,				     ArrayList<Statement> statementList)  {    if (statementList.size() == 1)      return statementList.get(0);    Statement []statements = new Statement[statementList.size()];    statementList.toArray(statements);    return createBlockImpl(loc, statements);  }  public final Statement createBlock(Location loc, Statement []statementList)  {    if (statementList.length == 1)      return statementList[0];    Statement []statements = new Statement[statementList.length];    System.arraycopy(statementList, 0, statements, 0, statementList.length);    return createBlockImpl(loc, statements);  }  /**   * Creates an expr statement   */  public final BlockStatement createBlockImpl(Location loc,					      ArrayList<Statement> statementList)  {    Statement []statements = new Statement[statementList.size()];    statementList.toArray(statements);        return createBlockImpl(loc, statements);  }  /**   * Creates an expr statement   */  public BlockStatement createBlockImpl(Location loc, Statement []statements)  {    return new BlockStatement(loc, statements);  }  /**   * Creates a text statement   */  public Statement createText(Location loc, String text)  {    return new TextStatement(loc, text);  }  /**   * Creates an if statement   */  public Statement createIf(Location loc,			    Expr test,			    Statement trueBlock,			    Statement falseBlock)  {    return new IfStatement(loc, test, trueBlock, falseBlock);  }  /**   * Creates a switch statement   */  public Statement createSwitch(Location loc,				Expr value,				ArrayList<Expr[]> caseList,				ArrayList<BlockStatement> blockList,				Statement defaultBlock)  {    return new SwitchStatement(loc, value, caseList, blockList, defaultBlock);  }  /**   * Creates a for statement   */  public Statement createFor(Location loc,			     Expr init,			     Expr test,			     Expr incr,			     Statement block)  {    return new ForStatement(loc, init, test, incr, block);  }  /**   * Creates a foreach statement   */  public Statement createForeach(Location loc,				 Expr objExpr,				 AbstractVarExpr key,				 AbstractVarExpr value,				 boolean isRef,				 Statement block)  {    return new ForeachStatement(loc, objExpr, key, value, isRef, block);  }  /**   * Creates a while statement   */  public Statement createWhile(Location loc,			       Expr test,			       Statement block)  {    return new WhileStatement(loc, test, block);  }  /**   * Creates a do-while statement   */  public Statement createDo(Location loc,			    Expr test,			    Statement block)  {    return new DoStatement(loc, test, block);  }  /**   * Creates a break statement   */  public BreakStatement createBreak(Location location, Expr target)  {    return new BreakStatement(location, target);  }  /**   * Creates a continue statement   */  public ContinueStatement createContinue(Location location, Expr target)  {    return new ContinueStatement(location, target);  }  /**   * Creates a global statement   */  public Statement createGlobal(Location loc,				VarExpr var)  {    return new GlobalStatement(loc, var);  }  /**   * Creates a global var statement   */  public Statement createVarGlobal(Location loc,                                   VarVarExpr var)  {    return new VarGlobalStatement(loc, var);  }  /**   * Creates a static statement   */  public Statement createStatic(Location loc,				VarExpr var,				Expr value)  {    return new StaticStatement(loc, var, value);  }  /**   * Creates a throw statement   */  public Statement createThrow(Location loc,				Expr value)  {    return new ThrowStatement(loc, value);  }  /**   * Creates a try statement   */  public TryStatement createTry(Location loc,				Statement block)  {    return new TryStatement(loc, block);  }  /**   * Creates a return statement   */  public Statement createReturn(Location loc,				Expr value)  {    return new ReturnStatement(loc, value);  }  /**   * Creates a return ref statement   */  public Statement createReturnRef(Location loc,				   Expr value)  {    return new ReturnRefStatement(loc, value);  }  /**   * Creates a new function definition def.   */  public Statement createFunctionDef(Location loc,				     Function fun)  {    return new FunctionDefStatement(loc, fun);  }  /**   * Creates a new function def statement   */  public Statement createClassDef(Location loc,				  InterpretedClassDef cl)  {    return new ClassDefStatement(loc, cl);  }  //  // functions  //    /**   * Creates a new FunctionInfo   */  public FunctionInfo createFunctionInfo(Quercus quercus, String name)  {    return new FunctionInfo(quercus, name);  }    /**   * Creates a new function definition.   */  public Function createFunction(Location loc,                                 String name,                                 FunctionInfo info,                                 Arg []argList,                                 Statement []statementList)  {    return new Function(this, loc, name, info, argList, statementList);  }  /**   * Creates a new object method definition.   */  public Function createObjectMethod(Location loc,                                     InterpretedClassDef cl,                                     String name,                                     FunctionInfo info,                                     Arg []argList,                                     Statement []statementList)  {    return new ObjectMethod(this, loc, cl, name, info, argList, statementList);  }  /**   * Creates a new object method definition.   */  public Function createMethodDeclaration(Location loc,                                          InterpretedClassDef cl,                                          String name,                                          FunctionInfo info,                                          Arg []argList)  {    return new MethodDeclaration(this, loc, cl, name, info, argList);  }  public InterpretedClassDef createClassDef(Location location,                                            String name,                                            String parentName,                                            String[] ifaceList)  {    return new InterpretedClassDef(location, name, parentName, ifaceList);  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -