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

com.javanut.pronghorn.pipe.util.build.SimpleSourceFileObject Maven / Gradle / Ivy

Go to download

Ring buffer based queuing utility for applications that require high performance and/or a small footprint. Well suited for embedded and stream based processing.

There is a newer version: 1.1.27
Show newest version
package com.javanut.pronghorn.pipe.util.build;

import java.io.File;
import java.io.IOException;

import javax.tools.SimpleJavaFileObject;

public class SimpleSourceFileObject extends SimpleJavaFileObject {

	final CharSequence body;
	final String className;
	
	public SimpleSourceFileObject(String className, CharSequence body) {
		super(new File(className+".java").toURI(),Kind.SOURCE);
        this.className = className;
		this.body = body; 
	}
    
    @Override
	public String getName() {
    	return className;
	}

	public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
        //generate new source into the StringBuffer and return it.
        return body;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy