org.voovan.tools.compiler.JavaMemSource Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of voovan-framework Show documentation
Show all versions of voovan-framework Show documentation
Voovan is a java framwork and it not depends on any third-party framework.
package org.voovan.tools.compiler;
import javax.tools.SimpleJavaFileObject;
import java.net.URI;
/**
* 内存源码保存对象
* @author helyho
*
* Voovan Framework.
* WebSite: https://github.com/helyho/Voovan
* Licence: Apache v2 License
*/
public class JavaMemSource extends SimpleJavaFileObject{
private String code;
public JavaMemSource(String name,String code) {
super(URI.create("string:///" + name.replace('.', '/')+ Kind.SOURCE.extension),Kind.SOURCE);
this.code = code;
}
@Override
public CharSequence getCharContent(boolean ignoreEncodingErrors) {
return code;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy