コード例 #1
0
 private List<String> dependenciesOf(Package source) {
   List<String> result = new ArrayList<>();
   if (source.isAnnotationPresent(DependsUpon.class))
     for (Class<?> target : source.getAnnotation(DependsUpon.class).packagesOf())
       result.add(target.getPackage().getName());
   return result;
 }
コード例 #2
0
 private static Class<?> type(Location location) {
   try {
     return Class.forName(location.getClassName());
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }