| 123 | |
| 124 | |
| 125 | public static class SourceCode extends SimpleJavaFileObject { |
| 126 | private String contents = null; |
| 127 | private String className; |
| 128 | |
| 129 | public SourceCode(String className, String contents) throws Exception { |
| 130 | super(URI.create("string:///" + className.replace('.', '/') |
| 131 | + Kind.SOURCE.extension), Kind.SOURCE); |
| 132 | this.contents = contents; |
| 133 | this.className = className; |
| 134 | } |
| 135 | |
| 136 | public String getClassName() { |
| 137 | return className; |
| 138 | } |
| 139 | |
| 140 | @Override |
| 141 | public CharSequence getCharContent(boolean ignoreEncodingErrors) |
| 142 | throws IOException { |
| 143 | return contents; |
| 144 | } |
| 145 | } |
| 146 | |
| 147 | /** |
| 148 | * |
nothing calls this directly
no outgoing calls
no test coverage detected