com.borland.jbuilder.node
Class ClassFileNode

java.lang.Object
  |
  +--com.borland.primetime.node.Node
        |
        +--com.borland.primetime.node.UrlNode
              |
              +--com.borland.primetime.node.FileNode
                    |
                    +--com.borland.jbuilder.node.ClassFileNode
All Implemented Interfaces:
java.lang.Comparable, WebViewable, WebViewable.MaybeServlet

public class ClassFileNode
extends FileNode
implements WebViewable, WebViewable.MaybeServlet

ClassFileNode instances represent Java class files. While the node's buffer mirrors the binary class file format the method getStubSource provides a minimalist decompilation of the class file into readable form.


Inner classes inherited from class com.borland.jbuilder.node.WebViewable
WebViewable.MaybeServlet
 
Field Summary
static java.lang.String EXTENSION
          The file extension identifying a class file.
static javax.swing.Icon ICON
          This icon is used for class files.
 
Fields inherited from class com.borland.primetime.node.Node
EMPTY_ARRAY, nodeListeners
 
Constructor Summary
ClassFileNode(Project project, Node parent, Url url)
          All FileNode subtypes must expose this constructor signature.
 
Method Summary
 javax.swing.Icon getDisplayIcon()
          Return the icon used for this type of file.
 int getDisplaySequence()
          Return the display priority of this class, which is used to group items in the project pane.
 java.lang.String getStubSource()
          Get a decompilation of the class file in readable format.
static void initOpenTool(byte majorVersion, byte minorVersion)
          OpenTool initialization.
 boolean isHttpServlet()
          Can this node act as a servlet?
 boolean isWebViewable()
          Is this node viewable in a web browser? By default, this node is not web viewable.
 void setWebViewable(boolean isWebViewable)
          Call with true if this node should be viewable in a web browser.
 
Methods inherited from class com.borland.primetime.node.FileNode
check, findBuffer, findFileNodeClass, findFileNodeClass, findFileNodeClass, getBuffer, getDisplayName, getInputStream, getLongDisplayName, getOutputStream, getTimestamp, getUrl, isModified, isNew, isPersistant, isReadOnly, registerFileNodeClass, rename, revert, save, saveAs, setUrl
 
Methods inherited from class com.borland.primetime.node.UrlNode
getSuggestedUrl
 
Methods inherited from class com.borland.primetime.node.Node
addNodeListener, compareTo, dumpNodes, dumpNodes, dumpNodes, equals, fireNodeRenamed, getChildren, getDisplayChildren, getNodeID, getParent, getProject, getProperties, getProperty, getProperty, getProperty, hasChildren, hasDisplayChildren, hashCode, makePersistant, removeNodeListener, setParent, setProperty, setProperty, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

EXTENSION

public static final java.lang.String EXTENSION
The file extension identifying a class file.

ICON

public static final javax.swing.Icon ICON
This icon is used for class files.
Constructor Detail

ClassFileNode

public ClassFileNode(Project project,
                     Node parent,
                     Url url)
              throws DuplicateNodeException
All FileNode subtypes must expose this constructor signature.
Parameters:
project - Project (cannot be null) to which this node will be associated.
parent - Immediate parent (may be null) of this node and must be of same Project.
url - The storage available to this node.
Throws:
DuplicateNodeException - if node already registered.
See Also:
Project.getNode(com.borland.primetime.vfs.Url)
Method Detail

initOpenTool

public static void initOpenTool(byte majorVersion,
                                byte minorVersion)
OpenTool initialization.
Parameters:
majorVersion - Major release number for which OpenTool is being initialized.
minorVersion - Minor release number for which OpenTool is being initialized.

getStubSource

public java.lang.String getStubSource()
Get a decompilation of the class file in readable format.
Returns:
A string describing the layout and members of the class.

getDisplayIcon

public javax.swing.Icon getDisplayIcon()
Return the icon used for this type of file.
Overrides:
getDisplayIcon in class FileNode
Returns:
The icon for this file type.

getDisplaySequence

public int getDisplaySequence()
Return the display priority of this class, which is used to group items in the project pane.
Overrides:
getDisplaySequence in class FileNode
Returns:
The display priority of this class.

setWebViewable

public void setWebViewable(boolean isWebViewable)
Call with true if this node should be viewable in a web browser. By default, this node is not web viewable.
Specified by:
setWebViewable in interface WebViewable
Parameters:
isWebViewable - If true, this node will be viewable in a web browser.

isWebViewable

public boolean isWebViewable()
Is this node viewable in a web browser? By default, this node is not web viewable.
Specified by:
isWebViewable in interface WebViewable
Returns:
true if this node is viewable in a web browser, false otherwise.

isHttpServlet

public boolean isHttpServlet()
Can this node act as a servlet?
Specified by:
isHttpServlet in interface WebViewable.MaybeServlet
Returns:
true if this node can act like a servlet. By default this node can not act like a servlet.