Structure[] structures = new Structures[numStructures]; for(int i = 0; i < numStructures; i++) { structures[i] = new Structure("whatever", 99, "some color")l }
Structure s = new Structure("matthew", 22, "BLUE");
Structure s = new Structure(); //............... JAXBContext ctx = JAXBContext.newInstance("com.yourcompany.yourpackage"); ctx.createMarshaller().marshal(s, System.out);
public static void loadStructure(Submission sub) { sub.struct = new Structure(); sub.struct.load(new File("temp", sub.dir.getName() + sub.name)); }
public static void main(String args[]) { System.out.println("parsing: " + args[0]); Parser parser = new Parser(); parser.struct = new Structure(); parser.parseFile(new File("."), args[0]); System.out.println(parser.struct); }
Structure structure = new Structure(); structure.UpdateSize(123); structure.UpdateX(34);
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { // getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) errors++; struct.addToken(new CSharpToken(FILE_END, files[i], -1, -1, -1)); } this.parseEnd(); return struct; }
public jplag.Structure filter(jplag.Structure struct) { if (struct==null) return null; jplag.Structure res = new jplag.Structure(); for (int i=0; i<struct.size(); i++) { jplag.Token oldToken = struct.tokens[i]; if (table[oldToken.type]!=-1) res.addToken(new jplag.javax.JavaToken(table[oldToken.type], oldToken.file, oldToken.getLine())); } return res; } }
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) errors++; System.gc();//Emeric struct.addToken(new JavaToken(FILE_END, files[i], -1, -1, -1)); } this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) errors++; System.gc();//Emeric struct.addToken(new JavaToken(FILE_END, files[i], -1, -1, -1)); } this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) { errors++; } System.gc();//Emeric struct.addToken(new Python3Token(FILE_END, files[i], -1, -1, -1)); } this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new jplag.Structure(); errors = 0; JavaParser parser = null; // This will be (re)initialised in parseFile() for (int i = 0; i < files.length; i++) { actFile = files[i]; getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!JavaParser.parseFile(dir, files[i], parser, this)) errors++; struct.addToken(new JavaToken(FILE_END, actFile, -1, -1, -1)); } this.parseEnd(); return struct; }
public jplag.Structure scan(File dir, String files[]) { struct = new jplag.Structure(); errors = 0; CPPScanner scanner = null;// will be initialized in Method scanFile for (int i = 0; i < files.length; i++) { actFile = files[i]; getProgram().print(null, "Scanning file " + files[i] + "\n"); if (!CPPScanner.scanFile(dir, files[i], scanner, this)) errors++; struct.addToken(new CPPToken(FILE_END, actFile, 1)); } this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { getProgram().print("", "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) errors++; struct.addToken(new TextToken(FILE_END, files[i], this)); } Structure tmp = struct; struct = null; this.parseEnd(); return tmp; }
public jplag.Structure parse(File dir, String files[]) { struct = new jplag.Structure(); errors = 0; SchemeParser parser = null;// no worry it will be reinitialized // in method parseFile(...) for (int i = 0; i < files.length; i++) { actFile = files[i]; getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!SchemeParser.parseFile(dir, files[i], parser, this)) errors++; struct.addToken(new SchemeToken(FILE_END, actFile, 1)); } this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new Structure(); errors = 0; for (int i = 0; i < files.length; i++) { getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!parseFile(dir, files[i])) errors++; struct.addToken(new CharToken(FILE_END, files[i], this)); } //System.err.println(struct.toString()); if (errors == 0) program.print(null, "OK"); else program.print(null, errors + " ERROR" + (errors > 1 ? "S" : "")); this.parseEnd(); return struct; }
public jplag.Structure parse(File dir, String files[]) { struct = new jplag.Structure(); errors = 0; JavaParser parser = null;// no worry it will be reinitialized // in method parseFile(...) for (int i = 0; i < files.length; i++) { actFile = files[i]; getProgram().print(null, "Parsing file " + files[i] + "\n"); if (!JavaParser.parseFile(dir, files[i], parser, this)) errors++; struct.addToken(new JavaToken(FILE_END, actFile, 0)); } // System.err.println(struct.toString()); if (errors == 0) program.print(null, "OK\n"); else program.print(null, errors + " ERRORS\n"); this.parseEnd(); return struct; }