org.gjt.jclasslib.browser.config.classpath
Class ClasspathEntry

java.lang.Object
  extended by org.gjt.jclasslib.browser.config.classpath.ClasspathEntry
All Implemented Interfaces:
ClasspathComponent
Direct Known Subclasses:
ClasspathArchiveEntry

public abstract class ClasspathEntry
extends java.lang.Object
implements ClasspathComponent

Base class for classpath entries.

Version:
$Revision: 1.1 $ $Date: 2003/08/18 08:10:15 $
Author:
Ingo Kegel

Field Summary
protected static java.lang.String CLASSFILE_SUFFIX
          Suffix for class files.
 
Constructor Summary
ClasspathEntry()
           
 
Method Summary
 void addClasspathChangeListener(ClasspathChangeListener listener)
          Add a ClasspathChangeListener.
protected  ClassTreeNode addOrFindNode(java.lang.String newNodeName, ClassTreeNode parentNode, boolean packageNode, javax.swing.tree.DefaultTreeModel model, boolean reset)
          Convenience method to get a node or add a new class of package node to a parent node.
 boolean equals(java.lang.Object other)
           
protected  java.io.File getFile()
          Get the file for the classpath entry.
 java.lang.String getFileName()
          Get the name of the classpath entry.
 int hashCode()
           
 void removeClasspathChangeListener(ClasspathChangeListener listener)
          Remove a ClasspathChangeListener.
 void setFileName(java.lang.String fileName)
          Set the name of the classpath entry.
protected  java.lang.String stripClassSuffix(java.lang.String name)
          Strip the class suffix from the supplied file name.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.gjt.jclasslib.browser.config.classpath.ClasspathComponent
findClass, mergeClassesIntoTree
 

Field Detail

CLASSFILE_SUFFIX

protected static final java.lang.String CLASSFILE_SUFFIX
Suffix for class files.

See Also:
Constant Field Values
Constructor Detail

ClasspathEntry

public ClasspathEntry()
Method Detail

getFileName

public java.lang.String getFileName()
Get the name of the classpath entry.

Returns:
the name

setFileName

public void setFileName(java.lang.String fileName)
Set the name of the classpath entry.

Parameters:
fileName - the name.

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

addClasspathChangeListener

public void addClasspathChangeListener(ClasspathChangeListener listener)
Description copied from interface: ClasspathComponent
Add a ClasspathChangeListener.

Specified by:
addClasspathChangeListener in interface ClasspathComponent
Parameters:
listener - the listener

removeClasspathChangeListener

public void removeClasspathChangeListener(ClasspathChangeListener listener)
Description copied from interface: ClasspathComponent
Remove a ClasspathChangeListener.

Specified by:
removeClasspathChangeListener in interface ClasspathComponent
Parameters:
listener - the listener

getFile

protected java.io.File getFile()
Get the file for the classpath entry. May be null if the entry is invalid.

Returns:
the file.

addOrFindNode

protected ClassTreeNode addOrFindNode(java.lang.String newNodeName,
                                      ClassTreeNode parentNode,
                                      boolean packageNode,
                                      javax.swing.tree.DefaultTreeModel model,
                                      boolean reset)
Convenience method to get a node or add a new class of package node to a parent node. New nodes will be added in correct sort order, packages first.

Parameters:
newNodeName - the name of the new node.
parentNode - the parent node.
packageNode - whether the new node is a package node or not.
model - the tree model.
reset - whether a reset operation is in progress.
Returns:
the fould or created node.

stripClassSuffix

protected java.lang.String stripClassSuffix(java.lang.String name)
Strip the class suffix from the supplied file name.

Parameters:
name - the file name.
Returns:
the stripped name.


Copyright 2006 Dream Programs Inc.. All Rights Reserved.