1 27 28 package org.objectweb.speedo.metadata; 29 30 35 public class SpeedoVersion { 36 37 public final static byte VERSION_NUMBER = 3; 38 public final static byte STATE_COMPARISON = 2; 39 public final static byte DATE_TIME = 1; 40 public final static byte NO_VERSION = 0; 41 42 45 public SpeedoClass jdoClass; 46 47 50 public byte strategy = NO_VERSION; 51 52 58 public static byte toByte(String s) { 59 if (s.equalsIgnoreCase("version-number")) 60 return VERSION_NUMBER; 61 else if (s.equalsIgnoreCase("state-comparison")) 62 return STATE_COMPARISON; 63 else if (s.equalsIgnoreCase("date-time")) 64 return DATE_TIME; 65 else 66 return NO_VERSION; 67 } 68 69 74 public static String toString(byte b) { 75 if (b == VERSION_NUMBER) 76 return "versionnumber"; 77 else if (b == STATE_COMPARISON) 78 return "statecomparison"; 79 else if (b == DATE_TIME) 80 return "datetime"; 81 else 82 return "no-version"; 83 } 84 } 85 | Popular Tags |