Package etch.compiler.opt.ToString

Examples of etch.compiler.opt.ToString.StringItem


  public List<FmtItem> mkFormatList( boolean isExcept, boolean hasExtends )
  {
    List<FmtItem> fmts = new ArrayList<FmtItem>();
   
    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );

    return fmts;
  }
View Full Code Here


  public List<FmtItem> mkFormatList( boolean isExcept, boolean hasExtends )
  {
    List<FmtItem> fmts = new ArrayList<FmtItem>();
   
    if (!isExcept)
      fmts.add( new StringItem( name().name+"(" ) );

    if (hasExtends)
    {
      fmts.add( new FieldItem( isExcept ? "super.getMessage()" : "super.toString()" ) );
      fmts.add( new StringItem( "; " ) );
    }
   
    boolean first = true;
    for (Parameter p: list)
    {
      if (first)
      {
        first = false;
        fmts.add( new StringItem( p.name().name+"=" ) );
      }
      else
      {
        fmts.add( new StringItem( "; "+p.name().name+"=" ) );
      }
      fmts.add( new FieldItem( p.name().name ) );
    }
   
    if (!isExcept)
      fmts.add( new StringItem( ")" ) );

    return fmts;
  }
View Full Code Here

TOP

Related Classes of etch.compiler.opt.ToString.StringItem

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.