things.thinger.kernel.basic.tools
Class LocalJavaFileObject

java.lang.Object
  extended by javax.tools.SimpleJavaFileObject
      extended by things.thinger.kernel.basic.tools.LocalJavaFileObject
All Implemented Interfaces:
javax.tools.FileObject, javax.tools.JavaFileObject

public class LocalJavaFileObject
extends javax.tools.SimpleJavaFileObject

This will be a local file object.

Version:
1.0

Version History

EPG - Initial - 8 JUL 07
 
Author:
Erich P. Gatejen

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.tools.JavaFileObject
javax.tools.JavaFileObject.Kind
 
Field Summary
 
Fields inherited from class javax.tools.SimpleJavaFileObject
kind, uri
 
Constructor Summary
LocalJavaFileObject(java.lang.String name, java.lang.String actualName, javax.tools.JavaFileObject.Kind kind, java.io.File theFile)
          Constructor.
 
Method Summary
 java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
          We need to do this for the damn compiler.
 java.lang.String getName()
          Gets a user-friendly name for this file object.
 java.io.InputStream openInputStream()
          Get the file as an InputStream.
 java.io.OutputStream openOutputStream()
          Get the file as an OutputStream.
 
Methods inherited from class javax.tools.SimpleJavaFileObject
delete, getAccessLevel, getKind, getLastModified, getNestingKind, isNameCompatible, openReader, openWriter, toString, toUri
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LocalJavaFileObject

public LocalJavaFileObject(java.lang.String name,
                           java.lang.String actualName,
                           javax.tools.JavaFileObject.Kind kind,
                           java.io.File theFile)
                    throws java.lang.Throwable
Constructor.

Parameters:
name - Simple name for the object
actualName - The actual name of the file from the anchor. This will include the extension and stuff if it was actually there.
kind - The kind of JavaFileObject.
theFile - The file that represents this object.
Throws:
java.lang.Throwable
See Also:
SimpleJavaFileObject
Method Detail

getCharContent

public java.lang.CharSequence getCharContent(boolean ignoreEncodingErrors)
                                      throws java.io.IOException,
                                             java.lang.IllegalStateException,
                                             java.lang.UnsupportedOperationException
We need to do this for the damn compiler.

Specified by:
getCharContent in interface javax.tools.FileObject
Overrides:
getCharContent in class javax.tools.SimpleJavaFileObject
Throws:
java.io.IOException
java.lang.IllegalStateException
java.lang.UnsupportedOperationException

openInputStream

public java.io.InputStream openInputStream()
                                    throws java.io.IOException,
                                           java.lang.IllegalStateException,
                                           java.lang.UnsupportedOperationException
Get the file as an InputStream.

Specified by:
openInputStream in interface javax.tools.FileObject
Overrides:
openInputStream in class javax.tools.SimpleJavaFileObject
Returns:
an input stream to the file. You can assume it is buffered already.
Throws:
java.io.IOException
java.lang.IllegalStateException
java.lang.UnsupportedOperationException

openOutputStream

public java.io.OutputStream openOutputStream()
                                      throws java.io.IOException,
                                             java.lang.IllegalStateException,
                                             java.lang.UnsupportedOperationException
Get the file as an OutputStream.

Specified by:
openOutputStream in interface javax.tools.FileObject
Overrides:
openOutputStream in class javax.tools.SimpleJavaFileObject
Returns:
an input stream to the file. You can assume it is buffered already.
Throws:
java.io.IOException
java.lang.IllegalStateException
java.lang.UnsupportedOperationException

getName

public java.lang.String getName()
Gets a user-friendly name for this file object.

Specified by:
getName in interface javax.tools.FileObject
Overrides:
getName in class javax.tools.SimpleJavaFileObject
Returns:
the name


Things.