com.tagtraum.sixbs
Class AdapterFinder

java.lang.Object
  extended bycom.tagtraum.sixbs.AdapterFinder

public class AdapterFinder
extends java.lang.Object

Searches for Adapater classes. First the same package as the class's is checked. Then the package searchpath is searched.

Version:
$Id: AdapterFinder.java,v 1.3 2001/08/06 16:46:42 Hendrik Exp $
Author:
Hendrik Schreiber
See Also:
Adapter

Field Summary
static java.lang.String vcid
          Source-Version
 
Constructor Summary
AdapterFinder()
          Instantiates AdapterFinder with DefaultPackages (e.g.
 
Method Summary
protected  void addDefaultPackages()
          Is called by the constructor and adds com.tagtraum.sixbs.adapters.util.
 void addPackage(java.lang.Package pakkage)
          Adds a package to the searchpath.
 void addPackage(java.lang.String pakkage)
          Adds a package to the searchpath.
 java.lang.Class find(java.lang.Object object)
          Returns an Adapter class for the given object or null if none is found.
static AdapterFinder getDefaultAdapterFinder()
          Returns default AdapterFinder.
 java.util.Enumeration packages()
          Enumeration of all package in the searchpath.
 void removePackage(java.lang.Package pakkage)
          Removes a package from the searchpath.
 void removePackage(java.lang.String pakkage)
          Removes a package from the searchpath.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vcid

public static java.lang.String vcid
Source-Version

Constructor Detail

AdapterFinder

public AdapterFinder()
Instantiates AdapterFinder with DefaultPackages (e.g. com.tagtraum.sixbs.adapters.util).

Method Detail

addDefaultPackages

protected void addDefaultPackages()
Is called by the constructor and adds com.tagtraum.sixbs.adapters.util.


addPackage

public void addPackage(java.lang.Package pakkage)
Adds a package to the searchpath. Type-safe adding of packages to the searchpath. Note that package objects are not necessarily available.

See Also:
Package.getPackage(String), addPackage(String)

removePackage

public void removePackage(java.lang.Package pakkage)
Removes a package from the searchpath. Type-safe removing of packages to the searchpath. Note that package objects are not necessarily available.

See Also:
Package.getPackage(String), removePackage(String)

addPackage

public void addPackage(java.lang.String pakkage)
Adds a package to the searchpath.


removePackage

public void removePackage(java.lang.String pakkage)
Removes a package from the searchpath.


packages

public java.util.Enumeration packages()
Enumeration of all package in the searchpath.


getDefaultAdapterFinder

public static AdapterFinder getDefaultAdapterFinder()
Returns default AdapterFinder.


find

public java.lang.Class find(java.lang.Object object)
Returns an Adapter class for the given object or null if none is found.