org.acm.seguin.summary
Class FileSummary

java.lang.Object
  extended by org.acm.seguin.summary.Summary
      extended by org.acm.seguin.summary.FileSummary
All Implemented Interfaces:
java.io.Serializable, net.sourceforge.jrefactory.ast.ModifierHolder

public class FileSummary
extends Summary

Stores a summary of a java file

Since:
2.6.31
Version:
$Id: FileSummary.java,v 1.7 2004/05/04 15:46:54 mikeatkinson Exp $
Author:
Chris Seguin, Mike Atkinson
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.acm.seguin.summary.Summary
modifiers
 
Fields inherited from interface net.sourceforge.jrefactory.ast.ModifierHolder
ABSTRACT, EXPLICIT, FINAL, INTERFACE, names, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICTFP, SYNCHRONIZED, TRANSIENT, VOLATILE
 
Constructor Summary
protected FileSummary(Summary parentSummary, java.io.File initFile)
          Creates a file map
 
Method Summary
 java.lang.Object accept(SummaryVisitor visitor, java.lang.Object data)
          Provide method to visit a node
protected  void add(ImportSummary importSummary)
          Add an import summary
protected  void add(TypeSummary typeSummary)
          Add an type summary
 java.io.File getFile()
          Return the file
static FileSummary getFileSummary(java.io.File file)
          Get the file summary for a particular file
static FileSummary getFileSummary(java.lang.String buffer)
          Get the file summary for a particular file
 java.util.Iterator getImports()
          Return the list of imports
protected static java.lang.String getKey(java.io.File file)
          Get the key that is used to index the files
 java.lang.String getName()
          Return the name of the file
 int getTypeCount()
          Counts the types stored in the file
 java.util.Iterator getTypes()
          Get the list of types stored in this file
 boolean isDeleted()
          Has this file been deleted
 boolean isMoving()
          Is this file moving to a new package
static FileSummary reloadFromBuffer(java.io.File file, java.io.Reader input)
          This method allows JBuilder to load a file summary from the buffer
static void removeAll()
          Removes all the files from the system
static void removeDeletedSummaries()
          Remove any file summaries that have been deleted
static void removeFileSummary(java.io.File file)
          Remove the file summary for a particular file
 void setDeleted(boolean way)
          Mark whether this file should be deleted
 void setMoving(boolean way)
          Change whether this file is moving or not
 java.lang.String toString()
          Description of the Method
 
Methods inherited from class org.acm.seguin.summary.Summary
addModifier, copyModifiers, getDeclarationLine, getEndLine, getModifiers, getModifiersString, getParent, getStartLine, isAbstract, isExplicit, isFinal, isInterface, isNative, isPackage, isPrivate, isProtected, isPublic, isStatic, isStrictFP, isSynchronized, isTransient, isVolatile, setAbstract, setAbstract, setCode, setEndLine, setFinal, setModifiers, setPrivate, setPrivate, setProtected, setProtected, setPublic, setPublic, setStartLine, setStatic, setStatic, setStrict, setSynchronized, setSynchronized, toStandardOrderString, toStringAlphabetical
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileSummary

protected FileSummary(Summary parentSummary,
                      java.io.File initFile)
Creates a file map

Parameters:
parentSummary - the parent summary
initFile - the file
Since:
2.6.31
Method Detail

setDeleted

public void setDeleted(boolean way)
Mark whether this file should be deleted

Parameters:
way - the way that this parameter is changing
Since:
2.6.31

setMoving

public void setMoving(boolean way)
Change whether this file is moving or not

Parameters:
way - the way that this parameter is changing
Since:
2.6.31

getFile

public java.io.File getFile()
Return the file

Returns:
the file object
Since:
2.6.31

getFileSummary

public static FileSummary getFileSummary(java.io.File file)
Get the file summary for a particular file

Parameters:
file - the file we are looking up
Returns:
the file summary
Since:
2.6.31

getFileSummary

public static FileSummary getFileSummary(java.lang.String buffer)
Get the file summary for a particular file

Parameters:
buffer - the buffer that is used to load the summary
Returns:
the file summary
Since:
2.6.31

getImports

public java.util.Iterator getImports()
Return the list of imports

Returns:
an iterator containing the imports
Since:
2.6.31

getKey

protected static java.lang.String getKey(java.io.File file)
Get the key that is used to index the files

Parameters:
file - the file we are using to find the key
Returns:
the key
Since:
2.6.31

getName

public java.lang.String getName()
Return the name of the file

Specified by:
getName in class Summary
Returns:
a string containing the name
Since:
2.6.31

getTypeCount

public int getTypeCount()
Counts the types stored in the file

Returns:
the number of types in this file
Since:
2.6.31

getTypes

public java.util.Iterator getTypes()
Get the list of types stored in this file

Returns:
an iterator over the types
Since:
2.6.31

isDeleted

public boolean isDeleted()
Has this file been deleted

Returns:
true if the file is deleted
Since:
2.6.31

isMoving

public boolean isMoving()
Is this file moving to a new package

Returns:
true if the file is moving
Since:
2.6.31

accept

public java.lang.Object accept(SummaryVisitor visitor,
                               java.lang.Object data)
Provide method to visit a node

Overrides:
accept in class Summary
Parameters:
visitor - the visitor
data - the data for the visit
Returns:
some new data
Since:
2.6.31

add

protected void add(ImportSummary importSummary)
Add an import summary

Parameters:
importSummary - the summary of what was imported
Since:
2.6.31

add

protected void add(TypeSummary typeSummary)
Add an type summary

Parameters:
typeSummary - the summary of the type
Since:
2.6.31

reloadFromBuffer

public static FileSummary reloadFromBuffer(java.io.File file,
                                           java.io.Reader input)
This method allows JBuilder to load a file summary from the buffer

Parameters:
file - the file
input - the input stream
Returns:
the file summary loaded
Since:
2.6.31

removeAll

public static void removeAll()
Removes all the files from the system

Since:
2.6.31

removeDeletedSummaries

public static void removeDeletedSummaries()
Remove any file summaries that have been deleted

Since:
2.6.31

removeFileSummary

public static void removeFileSummary(java.io.File file)
Remove the file summary for a particular file

Parameters:
file - the file we are looking up
Since:
2.6.31

toString

public java.lang.String toString()
Description of the Method

Overrides:
toString in class java.lang.Object
Returns:
Description of the Returned Value
Since:
2.6.31