1463 StringTokenizer st = new StringTokenizer(tagSetNames, ","); |
1463 StringTokenizer st = new StringTokenizer(tagSetNames, ","); |
1464 while (st.hasMoreTokens()) { |
1464 while (st.hasMoreTokens()) { |
1465 String className = st.nextToken(); |
1465 String className = st.nextToken(); |
1466 |
1466 |
1467 Object o = null; |
1467 Object o = null; |
|
1468 Class<?> setClass = null; |
1468 try { |
1469 try { |
1469 Class<?> setClass = Class.forName(className); |
1470 ClassLoader cl = TIFFImageMetadata.class.getClassLoader(); |
|
1471 setClass = Class.forName(className, false, cl); |
|
1472 if (!TIFFTagSet.class.isAssignableFrom(setClass)) { |
|
1473 fatal(node, "TagSets in IFD must be subset of" |
|
1474 + " TIFFTagSet class"); |
|
1475 } |
1470 Method getInstanceMethod = |
1476 Method getInstanceMethod = |
1471 setClass.getMethod("getInstance", (Class[])null); |
1477 setClass.getMethod("getInstance", (Class[])null); |
1472 o = getInstanceMethod.invoke(null, (Object[])null); |
1478 o = getInstanceMethod.invoke(null, (Object[])null); |
1473 } catch (NoSuchMethodException e) { |
1479 } catch (NoSuchMethodException e) { |
1474 throw new RuntimeException(e); |
1480 throw new RuntimeException(e); |