Package railo.transformer.bytecode

Examples of railo.transformer.bytecode.Statement


   */
  public static boolean hasSisterTagAfter(Tag tag, String nameToFind) {
    Body body=(Body) tag.getParent();
    List<Statement> stats = body.getStatements();
    Iterator<Statement> it = stats.iterator();
    Statement other;
   
    boolean isAfter=false;
    while(it.hasNext()) {
      other=it.next();
     
View Full Code Here


  public static boolean hasSisterTagWithSameName(Tag tag) {
   
    Body body=(Body) tag.getParent();
    List<Statement> stats = body.getStatements();
    Iterator<Statement> it = stats.iterator();
    Statement other;
    String name=tag.getTagLibTag().getName();
   
    while(it.hasNext()) {
      other=it.next();
      if(other != tag && other instanceof Tag && ((Tag) other).getTagLibTag().getName().equals(name))
View Full Code Here

    trg.setParent(src.getParent());
   
    Body p=(Body) src.getParent();
    List<Statement> stats = p.getStatements();
    Iterator<Statement> it = stats.iterator();
    Statement stat;
    int count=0;
   
    while(it.hasNext()) {
      stat=it.next();
      if(stat==src) {
View Full Code Here

      count++;
    }
  }
 
  public static Page getAncestorPage(Statement stat) throws BytecodeException {
    Statement parent=stat;
    while(true)  {
      parent=parent.getParent();
      if(parent==null) {
        throw new BytecodeException("missing parent Statement of Statement",stat.getStart());
        //return null;
      }
      if(parent instanceof Pagereturn (Page) parent;
View Full Code Here

      if(parent instanceof Pagereturn (Page) parent;
    }
  }
 
  public static Page getAncestorPage(Statement stat, Page defaultValue) {
    Statement parent=stat;
    while(true)  {
      parent=parent.getParent();
      if(parent==null) {
        return defaultValue;
      }
      if(parent instanceof Pagereturn (Page) parent;
    }
View Full Code Here

      if(parent instanceof Pagereturn (Page) parent;
    }
  }
 
  public static void listAncestor(Statement stat) {
    Statement parent=stat;
    aprint.o(stat);
    while(true)  {
      parent=parent.getParent();
      if(parent instanceof Page)aprint.o("page-> "+ ((Page)parent).getSource());
      else aprint.o("parent-> "+ parent);
      if(parent==null) break;
    }
  }
View Full Code Here

  }
 
 
  public static Tag getAncestorComponent(Statement stat) throws BytecodeException {
    //print.ln("getAncestorPage:"+stat);
    Statement parent=stat;
    while(true)  {
      parent=parent.getParent();
      //print.ln(" - "+parent);
      if(parent==null) {
        throw new BytecodeException("missing parent Statement of Statement",stat.getStart());
        //return null;
      }
View Full Code Here

    return defaultValue; 
  }


  public static boolean isCFC(Statement s) {
    Statement p;
    while((p=s.getParent())!=null){
      s=p;
    }
   
    return true;
View Full Code Here

  }

  public static void throwIfNotEmpty(Tag tag) throws EvaluatorException {
    Body body = tag.getBody();
    List<Statement> statments = body.getStatements();
    Statement stat;
    Iterator<Statement> it = statments.iterator();
    TagLibTag tlt;
   
    while(it.hasNext()) {
      stat=it.next();
View Full Code Here

  }
 

 
  private static TagLoop getParentTagLoop(TagLoop stat) {
    Statement parent = stat;
    while(true)  {
      parent=parent.getParent();
      if(parent==null)return null;
      if(parent instanceof TagLoopreturn (TagLoop) parent;
    }
  }
View Full Code Here

TOP

Related Classes of railo.transformer.bytecode.Statement

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.