Interface CompilationUnit
-
- All Known Subinterfaces:
CompilationUnitWithSource
@ConsumerType public interface CompilationUnit
This interface describes a compilation unit - usually a java class.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getLastModified()
Return the last modified for the compilation unit.java.lang.String
getMainClassName()
Returns the name of the top level public type.java.io.Reader
getSource()
Return a reader for the contents.
-
-
-
Method Detail
-
getSource
java.io.Reader getSource() throws java.io.IOException
Return a reader for the contents. The compiler will close this reader in all cases!- Returns:
- The reader.
- Throws:
java.io.IOException
- If the source can't be read.
-
getMainClassName
java.lang.String getMainClassName()
Returns the name of the top level public type. This name includes the package.- Returns:
- the name of the top level public type.
-
getLastModified
long getLastModified()
Return the last modified for the compilation unit.- Returns:
- The last modified information or
-1
if the information can't be detected.
-
-