All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.voovan.tools.complier.MemFileManager Maven / Gradle / Ivy

There is a newer version: 4.3.8
Show newest version
package org.voovan.tools.complier;

import javax.tools.FileObject;
import javax.tools.ForwardingJavaFileManager;
import javax.tools.JavaFileManager;
import javax.tools.JavaFileObject;
import java.io.IOException;

/**
 * 内存文件管理实现
 * @author helyho
 * 
 * Voovan Framework.
 * WebSite: https://github.com/helyho/Voovan
 * Licence: Apache v2 License
 */
public class MemFileManager extends ForwardingJavaFileManager {

	private JavaMemClass javaMemClass;
	protected MemFileManager(JavaFileManager fileManager) {
		super(fileManager);
	}
	
	public JavaMemClass getJavaMemClass() {
		return javaMemClass;
	}
	
	@Override
	public JavaFileObject getJavaFileForOutput(JavaFileManager.Location location,
            String className,
            JavaFileObject.Kind kind,
            FileObject sibling)
     throws IOException{
		javaMemClass = new JavaMemClass(className, kind);
		return javaMemClass;
		
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy