static InMemorySourceFile fromSourceCode(String sourceCode) {
    String className = new ClassNameExtractor().extractFromSourceCode(sourceCode);
    return new InMemorySourceFile(className, sourceCode);
  }
In-memory representation of the name and source code of a Java class.
geode-junit/src/main/java/org/apache/geode/test/compiler/InMemorySourceFile.java