示例#1
0
 public List<TypeDeclaration> removeTypesGeneratedFromResource(Resource resource) {
   List<TypeDeclaration> typesToBeRemoved = getTypesGeneratedFromResource(resource);
   if (!typesToBeRemoved.isEmpty()) {
     JavaDialectRuntimeData dialect =
         (JavaDialectRuntimeData) getDialectRuntimeRegistry().getDialectData("java");
     for (TypeDeclaration type : typesToBeRemoved) {
       if (type.getTypeClassName() != null) {
         // the type declaration might not have been built up to actual class, if an error was
         // found first
         // in this case, no accessor would have been wired
         classFieldAccessorStore.removeType(type);
         dialect.remove(type.getTypeClassName());
       }
       removeTypeDeclaration(type.getTypeName());
     }
     dialect.reload();
   }
   return typesToBeRemoved;
 }
示例#2
0
 public ClassLoader getPackageClassLoader() {
   JavaDialectRuntimeData javaRuntime =
       (JavaDialectRuntimeData) getDialectRuntimeRegistry().getDialectData("java");
   return javaRuntime.getClassLoader();
 }