JavaDoq 1.0 API

com.javadoq
Class SourceFile

java.lang.Object
  extended by com.javadoq.SourceFile

public class SourceFile
extends java.lang.Object

Represents a source file in a Java package.

Author:
J.J.Liu (Jianjun Liu) at http://www.javadoq.com

Field Summary
 java.util.List<JavaType> imports
          Imported types in the file.
 boolean isJava
          Whether the file is a Java source file.
 boolean isJavaCC
          Whether the file is a JavaCC source file.
 boolean isJJTree
          Whether the file is a JJTree source file.
protected  java.lang.String link
           
 java.lang.String name
          The simple name of the source file.
 JavaPackage pckg
          The package where the source file is located.
 java.lang.String source
          The absolute path name of the source file.
 
Constructor Summary
SourceFile(java.lang.String source, JavaPackage pckg, java.lang.String name)
          Constructs a SourceFile.
 
Method Summary
 JavaType findType(JavaName name)
          Finds a Java type in the scope of this file.
 JavaName getFullName()
          Gets the fully qualified name of the file.
 java.lang.String getLink()
          Gets the hyper link to the file from the root.
 java.lang.String getLinkName()
          Gets the target name of the file for hyper linking.
 java.lang.String getTarget()
          Gets the target path name from the root to the file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

source

public final java.lang.String source

The absolute path name of the source file.

Since:
1.0

pckg

public final JavaPackage pckg

The package where the source file is located.

Since:
1.0

name

public final java.lang.String name

The simple name of the source file.

Since:
1.0

isJava

public final boolean isJava

Whether the file is a Java source file.

Since:
1.0

isJavaCC

public final boolean isJavaCC

Whether the file is a JavaCC source file.

Since:
1.0

isJJTree

public final boolean isJJTree

Whether the file is a JJTree source file.

Since:
1.0

link

protected java.lang.String link

imports

public final java.util.List<JavaType> imports

Imported types in the file.

Since:
1.0
Constructor Detail

SourceFile

public SourceFile(java.lang.String source,
                  JavaPackage pckg,
                  java.lang.String name)

Constructs a SourceFile.

Parameters:
source - The absolute path name for the source file.
pckg - The package where the source file is located.
name - The simple name for the source file.
Since:
1.0
Method Detail

getFullName

public final JavaName getFullName()

Gets the fully qualified name of the file.

Returns:
The fully qualified name of the file.
Since:
1.0

getLinkName

public java.lang.String getLinkName()

Gets the target name of the file for hyper linking.

Returns:
The target name of the file.
Since:
1.0

getLink

public final java.lang.String getLink()

Gets the hyper link to the file from the root.

Returns:
The hyper link to the file from the root.
Since:
1.0

getTarget

public final java.lang.String getTarget()

Gets the target path name from the root to the file.

Returns:
The target path name from the root to the file.
Since:
1.0

findType

public final JavaType findType(JavaName name)

Finds a Java type in the scope of this file.

Parameters:
name - The name for the type being found.
Returns:
The matched Java type or null if it is not found.
Since:
1.0

JavaDoq 1.0 API

Copyright © 2008-2011 J.J.Liu (www.javadoq.com). All Rights Reserved.