org.extendj.ast
class ClassSource

General Info

Type Hierarchy:
java.lang.Object
  extended by org.extendj.ast.ClassSource
Direct Known Subclasses:
BytecodeClassSource, FileClassSource

Description

Source
Declared in /home/jesper/git/extendj/java4/frontend/PathPart.jadd at line 46
Aspect
PathPart

Member Filters

API level:

Aspect:

Constructors

public ClassSource(PathPart sourcePath)

Methods

public abstract long lastModified()
Returns:
Last modification time of the class source.
public abstract java.io.InputStream openInputStream()
                                             throws java.io.IOException
Returns:
Input stream pointing to the class source.
Throws:
java.io.IOException
public java.lang.String sourceName()
It is sufficient to only overload pathName if sourceName=pathName
Returns:
the full name of the class source (e.g. file path).
public abstract java.lang.String pathName()
Returns:
the path to the source file or the enclosing jar file
public java.lang.String relativeName()
It is sufficient to only overload pathName if relativeName = pathName
Returns:
the path to the source file, or the path to the file inside a jar file
public java.lang.String toString()
public CompilationUnit parseCompilationUnit(Program program)
                                     throws java.io.IOException
Parses the compilation unit from this class source. NB only call this once! The input stream is closed after the compilation unit is parsed.
Returns:
parsed compilation unit, or null if something failed
Throws:
java.io.IOException

Fields

protected final PathPart sourcePath
public static final ClassSource NONE
Used to represent an non-existent compilation unit source file.

This class source should never be used to attempt to load a class, it is simply used as a marker to indicate failure to find a compilation unit.

Inherited Members

Methods inherited from class java.lang.Object

clone
equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait