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

gw.lang.javac.StringJavaFileObject Maven / Gradle / Ivy

There is a newer version: 1.18.2
Show newest version
package gw.lang.javac;

import java.io.IOException;
import java.net.URI;
import javax.tools.SimpleJavaFileObject;

/**
*/
public class StringJavaFileObject extends SimpleJavaFileObject
{
  private final String _src;

  public StringJavaFileObject( String name, String src )
  {
    super( URI.create( "string:///" + name.replace( '.', '/' ) + Kind.SOURCE.extension ), Kind.SOURCE );
    _src = src;
  }

  @Override
  public CharSequence getCharContent( boolean ignoreEncodingErrors ) throws IOException
  {
    return _src;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy