public static int getSourceKey(String name) {
for (int i = 0; i < MASK_COUNT; i++) {
if (name.equals(allSources[i]))
- return 1<<i;
+ {
+ return 1<<i;
+ }
}
return 0;
}
return ((PRIMARY_SOURCES_MASK & getSourceKey(source)) != 0);
}
-
-// public static String[] allSourcesFromReflection;
-//
-// public static String[] allSources()
-//
-// {
-// /**
-// * @j2sNative
-// *
-// * return C$.allTypes;
-// *
-// */
-//
-// {
-// if (allSourcesFromReflection == null)
-// {
-// List<String> src = new ArrayList<>();
-// for (Field f : DBRefSource.class.getFields())
-// {
-// if (String.class.equals(f.getType()))
-// {
-// try
-// {
-// src.add((String) f.get(null));
-// } catch (Exception x)
-// {
-// x.printStackTrace();
-// }
-// }
-// }
-// allSourcesFromReflection = src.toArray(new String[0]);
-// }
-// return allSourcesFromReflection;
-// }
-// }
-
public static boolean isPrimaryCandidate(String ucversion) {
// tricky - this test really needs to search the sequence's set of dbrefs to
// see if there is a primary reference that derived this reference.