00001 package gov.nasa.arc.ase.jpf; 00002 00003 import java.util.Date; 00004 import java.text.DateFormat; 00005 00006 public class NewBuild { 00007 public static void main(String[] args) { 00008 int build = Build.getBuild() + 1; 00009 00010 System.out.println("package gov.nasa.arc.ase.jpf;"); 00011 System.out.println(); 00012 System.out.println("class Build {"); 00013 System.out.println("private static int build = " + build + ";"); 00014 System.out.println("public static int getBuild() { return build; }"); 00015 System.out.println("public static String getBuildDate() { return \"" + today() + "\"; }"); 00016 System.out.println("}"); 00017 System.err.println("Current build is " + build); 00018 } 00019 private static String today() { 00020 Date now = new Date(); 00021 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); 00022 00023 return df.format(now); 00024 } 00025 }