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

com.abubusoft.kripton.processor.bind.JavaWriterHelper Maven / Gradle / Ivy

There is a newer version: 8.2.0-rc.4
Show newest version
/**
 * 
 */
package com.abubusoft.kripton.processor.bind;

import java.io.IOException;

import javax.annotation.processing.Filer;

import com.squareup.javapoet.JavaFile;
import com.squareup.javapoet.TypeSpec;

/**
 * The Class JavaWriterHelper.
 *
 * @author Francesco Benincasa ([email protected])
 */
public abstract class JavaWriterHelper {

	/**
	 * Write java 2 file.
	 *
	 * @param filer the filer
	 * @param packageName the package name
	 * @param typeSpec the type spec
	 * @throws IOException Signals that an I/O exception has occurred.
	 */
	public static void writeJava2File(Filer filer, String packageName, TypeSpec typeSpec) throws IOException {
		JavaFile target = JavaFile.builder(packageName, typeSpec).skipJavaLangImports(true).build();
		target.writeTo(filer);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy