jdepend.framework

Class JavaClass


public class JavaClass
extends java.lang.Object

The JavaClass class represents a Java class or interface.
Authors:
Mike Clark (mike@clarkware.com)
Clarkware Consulting, Inc.

Nested Class Summary

static class
JavaClass.ClassComparator
The ClassComparator class is a Comparator used to compare two JavaClass instances for order.

Constructor Summary

JavaClass(String name)
Constructs a JavaClass instance.

Method Summary

void
addImportedPackage(JavaPackage jPackage)
Adds the specified package to the collection of imported packages.
boolean
equals(Object other)
Indicates whether the specified class is equal to this class.
Collection
getImportedPackages()
Returns a collection of imported package names.
String
getName()
Returns the class name.
String
getPackageName()
Returns the package name.
String
getSourceFile()
Returns the source file name.
boolean
isAbstract()
Indicates whether this class is abstract.
void
isAbstract(boolean isAbstract)
Determines whether this class is abstract.
void
setName(String name)
Sets the class name.
void
setPackageName(String name)
Sets the package name.
void
setSourceFile(String name)
Sets the source file name.

Constructor Details

JavaClass

public JavaClass(String name)
Constructs a JavaClass instance.

Method Details

addImportedPackage

public void addImportedPackage(JavaPackage jPackage)
Adds the specified package to the collection of imported packages.
Parameters:
jPackage - Package to add.

equals

public boolean equals(Object other)
Indicates whether the specified class is equal to this class.
Parameters:
other - Other class.
Returns:
true if the classes are equal; false otherwise.

getImportedPackages

public Collection getImportedPackages()
Returns a collection of imported package names.
Returns:
Imported package names.

getName

public String getName()
Returns the class name.
Returns:
Class name.

getPackageName

public String getPackageName()
Returns the package name.
Returns:
Package name.

getSourceFile

public String getSourceFile()
Returns the source file name.
Returns:
Source file name.

isAbstract

public boolean isAbstract()
Indicates whether this class is abstract.
Returns:
true if this class is abstract; false otherwise.

isAbstract

public void isAbstract(boolean isAbstract)
Determines whether this class is abstract.
Parameters:
isAbstract - true if this class is abstract; false otherwise.

setName

public void setName(String name)
Sets the class name.
Parameters:
name - Class name.

setPackageName

public void setPackageName(String name)
Sets the package name.
Parameters:
name - Package name.

setSourceFile

public void setSourceFile(String name)
Sets the source file name.
Parameters:
name - Source file name.

Copyright B) 1999-2003 Clarkware Consulting, Inc.