Compiles the class.  className is a fully qualified Java class, e.g.
work.jsp.Test

@param fileName Java source name -- in VFS format
@param lineMap mapping from generated class back to the source class

@return compiled class
970122
public void compile(String fileName, LineMap lineMap)
    throws IOException, ClassNotFoundException
  {
    compile(fileName, lineMap, false);
  }
1186758
public Class compile(String sCode, String sName) {
        GroovyClassLoader loader = getGroovyClassLoader();
        LOG.warn("Compiling filter: " + sName);
        Class groovyClass = loader.parseClass(sCode, sName);
        return groovyClass;
    }
754000
private static InputStream getStreamFromClasspath(String fileName)
    {
        String path = fileName;
        InputStream dtdStream = PersistenceXMLLoader.class.getClassLoader().getResourceAsStream(path);
        return dtdStream;
    }
1212273
public static SourceLineAnnotation createUnknown(@DottedClassName String className) {
        return createUnknown(className, AnalysisContext.currentAnalysisContext().lookupSourceFile(className), -1, -1);
    }
120794
private String convertFileNameToBaseClassName(String filename) {
        if (filename.endsWith("_.java")) {
            return substringBeforeLast(filename, "_.java") + BASE_SUFFIX_;
        } else {
            return substringBeforeLast(filename, ".java") + BASE_SUFFIX;
        }
    }
294494
public Class<? extends Supplier<RoutingHandler>> compileClass()
    {
        try {
            this.generateRoutes();

            log.debug("\n\nGenerated Class Source:\n\n" + this.sourceString);

            return CompilerUtils.CACHED_COMPILER.loadFromJava(packageName + "." + className, this.sourceString);

        } catch (Exception e) {
            log.error(e.getMessage(), e);
            return null;
        }
    }
655457
protected Class<?> loadSourceClass( final String name ) {
        final String fileName = '/' + name.replace('.', '/') + ".java";
        final URL url = getResource( fileName );
        if ( url == null )
            return null;
        try (FileReader reader
                = new FileReader((InputStream) url.getContent())) {
            Interpreter.debug("Loading class from source file: " + fileName);
            declaringInterpreter.eval( reader );
        } catch ( IOException | EvalError e ) {
            if (Interpreter.DEBUG.get())
                e.printStackTrace();
        }
        try {
            return plainClassForName( name );
        } catch ( final ClassNotFoundException e ) {
            Interpreter.debug("Class not found in source file: " + name);
            return null;
        }
    }
134637
public static String fileAsString(String filename) {
    File classpathFile = getClasspathFile(filename);
    return fileAsString(classpathFile);
  }
59563
public ClassFile getClassFile(String name) throws IOException {
        if (name.indexOf('.') > 0) {
            int i = name.lastIndexOf('.');
            String pathname = name.replace('.', File.separatorChar) + ".class";
            if (baseFileName.equals(pathname) ||
                    baseFileName.equals(pathname.substring(0, i) + "$" +
                                        pathname.substring(i+1, pathname.length()))) {
                return readClassFile(path);
            }
        } else {
            if (baseFileName.equals(name.replace('/', File.separatorChar) + ".class")) {
                return readClassFile(path);
            }
        }
        return null;
    }
557008
public JClass forName(String name)
  {
    SoftReference<JClass> jClassRef = _classMap.get(name);

    JClass jClass = jClassRef != null ? jClassRef.get() : null;

    if (jClass == null) {
      jClass = _staticClassMap.get(name);

      if (jClass == null) {
        if (name.startsWith("[")) {
          JClass subClass = descriptorToClass(name, 1);
          jClass = new JClassArray(subClass);
        }
        else
          jClass = loadClass(name);
      }
      
      _classMap.put(name, new SoftReference<JClass>(jClass));
    }

    return jClass;
  }
728055
public boolean processClassFile(String fileName) {
        Path path = Paths.get(fileName);
        try {
            ClassFile cf = ClassFile.read(path);
            processClass(cf);
            return true;
        } catch (NoSuchFileException nsfe) {
            errorNoFile(fileName);
        } catch (IOException | ConstantPoolException ex) {
            errorException(ex);
        }
        return false;
    }
533934
public void generate(final File fileName) {
        final File outputFile = removeTemplatePrefix(fileName);
        templateFile = fileName;

        try (final InputStream in = new BufferedInputStream(new FileInputStream(fileName));
             final OutputStream out = new BufferedOutputStream(new FileOutputStream(outputFile))) {
            final Transformer transformer = TransformerFactory.newInstance().newTransformer();
            final SAXParserFactory parserFactory = SAXParserFactory.newInstance();
            parserFactory.setNamespaceAware(true);
            XMLReader reader = parserFactory.newSAXParser().getXMLReader();
            this.setContentHandler(null);
            this.setParent(reader);
            reader = this;
            final Source source = new SAXSource(reader, new InputSource(in));
            source.setSystemId(fileName.toURI().toString());
            final Result result = new StreamResult(out);
            transformer.transform(source, result);
        } catch (final RuntimeException e) {
            throw e;
        } catch (final Exception e) {
            logger.error("Failed to transform " + fileName + ": " + e.getMessage(), e);
        }
    }
377070
@Override
    public String findClassAbsoluteFileName(String fileName, String className, List<String> sourceRoots) {
        // usually the fileName is just the name of the file without any package information
        // so lets turn the package name into a path
        int lastIdx = className.lastIndexOf('.');
        if (lastIdx > 0 && !(fileName.contains("/") || fileName.contains(File.separator))) {
            String packagePath = className.substring(0, lastIdx).replace('.', File.separatorChar);
            fileName = packagePath + File.separator + fileName;
        }
        File baseDir = getBaseDir();
        String answer = findInSourceFolders(baseDir, fileName);
        if (answer == null && sourceRoots != null) {
            for (String sourceRoot : sourceRoots) {
                answer = findInSourceFolders(new File(sourceRoot), fileName);
                if (answer != null) break;
            }
        }
        return answer;
    }
873800
private function assembleClassMap(TypeMap $typeMap, string $linefeed, string $indentation): string
    {
        $classMap = [];
        foreach ($typeMap->getTypes() as $type) {
            $classMap[] = sprintf(
                '%snew ClassMap(\'%s\', %s::class),',
                $indentation,
                $type->getXsdName(),
                'Type\\'.$type->getName()
            );
        }

        return implode($linefeed, $classMap);
    }
66638
public static Class forName(String className) {
        try {
            return Class.forName(className);
        } catch (ClassNotFoundException e) {
            if (aliasClassMap.containsKey(className)) {
                return aliasClassMap.get(className);
            }

            throw new BeanMappingException("forName class[" + className + "] is error!", e);
        }
    }
314487
@Override
   public boolean compileFiles(String[] files)
   {
      JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
      if (compiler == null) {
         throw new IllegalStateException(
                 "No compiler detected, make sure you are running on top of a JDK instead of a JRE.");
      }
      StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null);
      Iterable<? extends JavaFileObject> fileList = fileManager.getJavaFileObjectsFromStrings(Arrays
              .asList(files));

      return internalCompile(compiler, wrapJavaFileManager(fileManager), setupDiagnosticListener(),
              fileList);
   }
894890
public static File getClassFileFromDirectoryInClassPath(String className) {
		String fileName = StringSupport.replaceAll(className, ".", "/");
		fileName += ".class";
		return getFileFromDirectoryInClassPath(fileName, System.getProperty("java.class.path"));
	}