ch.claudio.jars
Class ModelDB4O

java.lang.Object
  extended by ch.claudio.jars.ModelDB4O
All Implemented Interfaces:
Model

public class ModelDB4O
extends java.lang.Object
implements Model

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


Constructor Summary
ModelDB4O()
           
 
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.
static void main(java.lang.String[] args)
          Print license.
 ClassInfo[] search(java.lang.String name)
          Search database for a jar containing the searched class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelDB4O

public ModelDB4O()
Method Detail

addFromDirs

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

Specified by:
addFromDirs in interface Model
Parameters:
status - status object into which the current state is reported.
startDirs - List of directories to search
See Also:
Model.addFromDirs(Status, java.io.File...)

getClassCount

public int getClassCount()
Return the number of stored classes.

Specified by:
getClassCount in interface Model
Returns:
count

getJarCount

public int getJarCount()
Return the number of stored jars.

Specified by:
getJarCount in interface Model
Returns:
count

search

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

Specified by:
search in interface Model
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

public void close()
Description copied from interface: Model
Give the model a chance to close the database if this is needed.

Specified by:
close in interface Model
See Also:
Model.close()

main

public static void main(java.lang.String[] args)
Print license.

Parameters:
args - ignored