|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.argval.packageinfo.impl.PackageInfoManagerImpl
public final class PackageInfoManagerImpl
Utility for visiting the added Package
instances.
First add the Package
instances. Then use a
PackageVisitor
instance to visit all the
PackageInfo
instances.
Usage:
PackageVisitor visitor = new SimplePackageVisitor(); PackageInfoManager manager = new PackageInfoManager(); manager.addPackage(Package.getPackages()); manager.accept(visitor); System.out.println(visitor);
Field Summary | |
---|---|
protected static org.slf4j.Logger |
logger
The logging instance. |
Constructor Summary | |
---|---|
PackageInfoManagerImpl()
Default constructor. |
Method Summary | |
---|---|
void |
accept(PackageInfoVisitor visitor)
Called through the client, which send the visitor along. |
void |
acceptRuntime(PackageInfoVisitor visitor)
Entry point for the visitor of this class. |
void |
addPackage(JarFile jarFile)
|
void |
addPackage(Package pckg)
Add a Package instance. |
void |
addPackage(Package[] packageArray)
Adds all the Package instances. |
void |
addPackageInfo(PackageInfo packageInfo)
|
void |
addPackageInfo(PackageInfo packageInfo,
String packageName)
|
PackageInfo |
getPackage(String title)
Returns a PackageInfo , or null when nothing is found. |
Set<String> |
getTitleSet()
Returns a Set instance containing all the titles of the added Package instances. |
String |
toString()
Returns a plain text showing all the added Package instances. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static org.slf4j.Logger logger
Constructor Detail |
---|
public PackageInfoManagerImpl()
Method Detail |
---|
public void addPackage(Package[] packageArray)
PackageInfoManager
Package
instances.
addPackage
in interface PackageInfoManager
packageArray
- Array containing Package
instances.public void addPackage(Package pckg)
PackageInfoManager
Package
instance.
addPackage
in interface PackageInfoManager
pckg
- The Package
instance.public void addPackage(JarFile jarFile)
addPackage
in interface PackageInfoManager
public void addPackageInfo(PackageInfo packageInfo)
addPackageInfo
in interface PackageInfoManager
public void addPackageInfo(PackageInfo packageInfo, String packageName)
addPackageInfo
in interface PackageInfoManager
public Set<String> getTitleSet()
PackageInfoManager
Package
instances.
getTitleSet
in interface PackageInfoManager
Package
instances.public PackageInfo getPackage(String title)
PackageInfoManager
PackageInfo
, or null
when nothing is found.
getPackage
in interface PackageInfoManager
title
- The title of the Package
which should be returned.
PackageInfo
instance, or null if nothing is found.public void acceptRuntime(PackageInfoVisitor visitor)
PackageInfo.accept(PackageInfoVisitor)
method.
visitor
- The visitor.public void accept(PackageInfoVisitor visitor)
PackageInfoVisitorAcceptor
accept
in interface PackageInfoVisitorAcceptor
visitor
- The visitor.acceptRuntime(PackageInfoVisitor)
public String toString()
Package
instances.
toString
in class Object
Package
instances added to
this PackageInfoManager.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |