ch.claudio.jars
Interface Model

All Known Implementing Classes:
ModelDB, ModelDB4O, ModelDerbyDB, ModelH2DB, ModelHash, ModelHSQLDB, ModelJODB

public interface Model

Defines the interface between GUI and data.

Version:
$Id:$
Author:
Claudio Nieder

Copyright (C) 2008 Claudio Nieder <private@claudio.ch>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Method Summary
 void addFromDirs(Status status, java.io.File... startDirs)
          Search a list of directories recursively to find jar files and store the information found in the database.
 void close()
          Give the model a chance to close the database if this is needed.
 int getClassCount()
          Return the number of stored classes.
 int getJarCount()
          Return the number of stored jars.
 ClassInfo[] search(java.lang.String name)
          Search database for a jar containing the searched class.
 

Method Detail

addFromDirs

void addFromDirs(Status status,
                 java.io.File... startDirs)
Search a list of directories recursively to find jar files and store the information found in the database.

Parameters:
status - status object into which the current state is reported.
startDirs - List of directories to search

getClassCount

int getClassCount()
Return the number of stored classes.

Returns:
count

getJarCount

int getJarCount()
Return the number of stored jars.

Returns:
count

search

ClassInfo[] search(java.lang.String name)
Search database for a jar containing the searched class.

Parameters:
name - Either a plain class name or a qualified name. If the class is not qualified by a package name several classes might be returned.
Returns:
list of found classes

close

void close()
Give the model a chance to close the database if this is needed.