JavaDoq 1.0 API

com.javadoq
Class JavaPackage

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

public final class JavaPackage
extends java.lang.Object

Represents a Java package.

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

Field Summary
 java.util.Map<java.lang.String,SourceFile> files
          The source file map with the simple file names as the keys.
 boolean hasDescription
          Whether the package has a description file.
 boolean isDefault
          Whether the package is default.
 JavaDoq jdoq
          The JavaDoq environment of the package.
 JavaName name
          The fully qualified name of the package.
 java.util.Map<java.lang.String,JavaType> types
          The type map with the simple names as the keys.
 
Constructor Summary
JavaPackage(JavaDoq jdoq, JavaName name)
          Constructs a JavaPackage.
 
Method Summary
 JavaType findType(JavaName name)
          Finds a Java type in the scope of this package.
 java.lang.String getLink()
          Gets the hyper link to the target package file.
 java.lang.String getLink(JavaPackage p)
          Gets the hyper link to the specified package from the location of the current package.
 java.lang.String getLink(SourceFile f)
          Gets the hyper link to the specified source file from the location of the current package.
 java.lang.String getRoot()
          Gets the hyper link to the root of the source from the location of the current package.
 java.lang.String title()
          Gets the title for the JavaPackage.
 java.lang.String toString()
          Returns a string representation of this package.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

types

public final java.util.Map<java.lang.String,JavaType> types

The type map with the simple names as the keys.

Since:
1.0

files

public final java.util.Map<java.lang.String,SourceFile> files

The source file map with the simple file names as the keys.

Since:
1.0

jdoq

public final JavaDoq jdoq

The JavaDoq environment of the package.

Since:
1.0

name

public final JavaName name

The fully qualified name of the package.

Since:
1.0

isDefault

public final boolean isDefault

Whether the package is default.

Since:
1.0

hasDescription

public boolean hasDescription

Whether the package has a description file.

Since:
1.0
Constructor Detail

JavaPackage

public JavaPackage(JavaDoq jdoq,
                   JavaName name)

Constructs a JavaPackage.

Parameters:
jdoq - The JavaDoq environment for the package being constructed.
name - The fully qualified name for the package.
Since:
1.0
Method Detail

title

public final java.lang.String title()

Gets the title for the JavaPackage.

Returns:
The title for target documents.
Since:
1.0

getLink

public final java.lang.String getLink()

Gets the hyper link to the target package file.

Returns:
The hyper link to the target package file.
Since:
1.0

getRoot

public final java.lang.String getRoot()

Gets the hyper link to the root of the source from the location of the current package.

Returns:
The relative hyper link to the source root.
Since:
1.0

getLink

public final java.lang.String getLink(SourceFile f)

Gets the hyper link to the specified source file from the location of the current package.

Parameters:
f - A source file.
Returns:
The relative hyper link to the source file.
Since:
1.0

getLink

public final java.lang.String getLink(JavaPackage p)

Gets the hyper link to the specified package from the location of the current package.

Parameters:
p - A package.
Returns:
The relative hyper link to the specified package.
Since:
1.0

findType

public final JavaType findType(JavaName name)

Finds a Java type in the scope of this package.

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

toString

public java.lang.String toString()

Returns a string representation of this package.

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this package, that is, the fully qualified name of the package.
Since:
1.0

JavaDoq 1.0 API

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