Util.java 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * (c) copyright John Gough, 2016-2017
  3. */
  4. package j2cps;
  5. // import java.util.function.Predicate;
  6. /**
  7. *
  8. * @author john
  9. */
  10. public class Util {
  11. //
  12. // All these constants are package private
  13. //
  14. static final int PRISTINE = 0;
  15. static final int ONLIST = 0x1;
  16. static final int ONTODO = 0x2;
  17. static final int ONSYMS = 0x4;
  18. static final int FROMJAR = 0x8;
  19. static final int FROMCLS = 0x10;
  20. static final int APINEEDS = 0x20;
  21. static final int FOUNDCPS = 0x40;
  22. static final int CURRENT = 0x80;
  23. static final char FWDSLSH = '/';
  24. static final char FILESEP =
  25. System.getProperty("file.separator").charAt(0);
  26. static final char JAVADOT = '.';
  27. static final char LOWLINE = '_';
  28. public void Assert(boolean p) {
  29. if (!p)
  30. throw new IllegalArgumentException( "Assertion Failed");
  31. }
  32. public static String Tag(int tag) {
  33. switch (tag) {
  34. case ONLIST: return "ONLIST,";
  35. case ONTODO: return "ONTODO,";
  36. case ONSYMS: return "ONSYMS,";
  37. case FROMJAR: return "FROMJAR,";
  38. case FROMCLS: return "FROMCLS,";
  39. case APINEEDS: return "APINEEDS,";
  40. case FOUNDCPS: return "FOUNDCPS,";
  41. case CURRENT: return "CURRENT,";
  42. default: return "unknown,";
  43. }
  44. }
  45. }