Package org.allspice.structured

Examples of org.allspice.structured.FieldDecl


    stub = new ClassStub(cname,new SimpleResolver(finfo.getFullQualified(cd.superClass)),cd.classType == ClassType.INTERFACE) ;
    classStubs.put(cname,stub) ;
    boolean foundInit = false ;
    for(FieldOrMethod fom: cd.decls) {
      if (fom instanceof FieldDecl) {
        FieldDecl fdec = (FieldDecl)fom ;
        StubResolver fldstub = new SimpleResolver(finfo.getFullQualified(fdec.type)) ;
        stub = stub.addField(new FieldStub(fdec.name,enclosing,fldstub,fdec.fieldAttrs.isStatic,false,fdec.intializer));
      }
      else if (fom instanceof MethodDecl) {
        MethodDecl mdec = (MethodDecl)fom ;
View Full Code Here


  }
  public static ImmutableCollection<FieldOrMethod> createFields(FieldAttrs fieldattrs,String type,ImmutableCollection<VarRec> declarationlist) {
    ImmutableCollection<FieldOrMethod> fields = new FIFO<FieldOrMethod>() ;
    for(VarRec vrec: declarationlist) {
        fields = fields.insert(new FieldDecl(fieldattrs,type+vrec.arraydims,vrec.id,vrec.init_opt)) ;
    }
    return fields ;

  }
View Full Code Here

          } catch (CompilerException e) {
            errors.add(e) ;
          }
        }
        else if (fom instanceof FieldDecl) {
          FieldDecl fdecl = (FieldDecl)fom ;
          if (fdecl.fieldAttrs.isStatic && fdecl.intializer != null) {
            SetValueExpr se = new SetValueExpr(new FieldVarExpr(cname.toString(),fdecl.name,null),fdecl.intializer,null) ;
            body = body.insert(new ExprStatement(se,null)) ;         
          }
        }
View Full Code Here

TOP

Related Classes of org.allspice.structured.FieldDecl

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.