com.google.dart.compiler
Interface Source


public interface Source

Abstract interface to a source file.


Method Summary
 boolean exists()
          Determines whether the given source exists.
 long getLastModified()
          Returns the last-modified timestamp for this source, using the same units as Date.getTime().
 java.lang.String getName()
          Gets the name of this source.
 java.io.Reader getSourceReader()
          Gets a reader for the dart file's source code.
 java.net.URI getUri()
          Gets the identifier for this source.
 

Method Detail

exists

boolean exists()
Determines whether the given source exists.


getLastModified

long getLastModified()
Returns the last-modified timestamp for this source, using the same units as Date.getTime().


getName

java.lang.String getName()
Gets the name of this source.


getSourceReader

java.io.Reader getSourceReader()
                               throws java.io.IOException
Gets a reader for the dart file's source code. The caller is responsible for closing the returned reader.

Throws:
java.io.IOException

getUri

java.net.URI getUri()
Gets the identifier for this source. This is used to uniquely identify the source, but should not be used to obtain the source content. Use getSourceReader() to obtain the source content.