|
Knopflerfish OSGi 2.4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knopflerfish.ant.taskdefs.bundle.BundlePackagesInfo
Class that holds the results of the Java package analysis of all classes in a bundle.
Class and package names should use either '/' or '.' as separator
between package levels during build up phase. When all classes
packages have been added, make a call to toJavaNames()
to
convert all class / packages names using the internal Java
representation with '/' as separator to their non-internal
representation with '.' as separator.
Mixing of separator kinds is not supported!
When all classes ahve been added, before using the package using
map a call to postProcessUsingMap(Set,Set)
should be done.
Constructor Summary | |
BundlePackagesInfo()
|
Method Summary | |
void |
addProvidedActivatorClass(java.lang.String className)
Adds a named class to the set of classes that implements the interface org.osgi.BundleActivator . |
java.lang.String |
addProvidedClass(java.lang.String className)
Adds a named class to the set of classes provided by this bundle. |
void |
addProvidedPackage(java.lang.String packageName)
Adds a named package to the set of packages provided by this bundle. |
void |
addReferencedClass(java.lang.String referencingPackage,
java.lang.String referencedClass)
Add a reference to a named class from some class in the referencing Java package. |
int |
countProvidedActivatorClasses()
Gets the cardinality of the set of provided bundle activator classes. |
int |
countProvidedPackages()
Gets the cardinality of the set of provided Java packages. |
boolean |
equals(java.lang.Object other)
|
java.lang.String |
getActivatorClass()
Get the bundle activator from the set of provided bundle activator classes. |
java.util.SortedSet |
getPackagesReferencedFromPackage(java.lang.String packageName)
Get a the set of Java packages that are referenced by the given Java package. |
java.util.SortedSet |
getProvidedPackages()
Get a copy of the set of provided Java packages. |
java.util.SortedSet |
getReferencedClasses()
Get a copy of the set of referenced Java classes. |
java.util.SortedSet |
getReferencedPackages()
Get a copy of the set of Java packages that are referenced by this bundle. |
java.util.SortedSet |
getUnprovidedReferencedPackages()
Get a the set of Java packages that are referenced by this bundle but not provided by it. |
static java.lang.String |
packageName(java.lang.String className)
Get package name of class string representation. |
void |
postProcessUsingMap(java.util.Set removeFromReferencedSets,
java.util.Set retainInReferencedSets)
Post process the package to referenced packages map. |
java.lang.String |
providedActivatorClassesAsString()
Return the set of provided activator classes as string suitable for use in messages. |
boolean |
providesActivatorClass(java.lang.String className)
Checks if a named class is in the set of provided activator classes. |
boolean |
providesClass(java.lang.String className)
Checks if a named class is provided by this bundle. |
boolean |
providesPackage(java.lang.String packageName)
Checks if a named Java package is provided by this bundle. |
void |
toJavaNames()
Replaces all '/' in class and package names with '.' in all the collections that this class is holding. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BundlePackagesInfo()
Method Detail |
public static java.lang.String packageName(java.lang.String className)
className
- A fully qualified class name.
public java.lang.String addProvidedClass(java.lang.String className)
className
- the name of the class to add.
public boolean providesClass(java.lang.String className)
className
- the name of the class to check for.
true
if the given class is in the set of
classes provided by this bundle, false
otherwise.public void addProvidedActivatorClass(java.lang.String className)
org.osgi.BundleActivator
.
className
- the name of the activator class to add.public int countProvidedActivatorClasses()
public boolean providesActivatorClass(java.lang.String className)
className
- the name of the activator class to check for.
true
if the given class is in the set of
provided activator classes, false
otherwise.public java.lang.String providedActivatorClassesAsString()
public java.lang.String getActivatorClass()
null
.public void addProvidedPackage(java.lang.String packageName)
packageName
- the name of the Java package to add.public boolean providesPackage(java.lang.String packageName)
packageName
- the name of the package to check for.
true
if the given package is in the set of
packages provided by this bundle, false
otherwise.public java.util.SortedSet getProvidedPackages()
public int countProvidedPackages()
public java.util.SortedSet getReferencedClasses()
public java.util.SortedSet getUnprovidedReferencedPackages()
public java.util.SortedSet getReferencedPackages()
public void addReferencedClass(java.lang.String referencingPackage, java.lang.String referencedClass)
referencingPackage
- The Java package of the class having a
reference to className.referencedClass
- Fully qualified name of the referenced
class.public void postProcessUsingMap(java.util.Set removeFromReferencedSets, java.util.Set retainInReferencedSets)
removeFromReferencedSets
- Packages to removeretainInReferencedSets
- Packages to retain.public java.util.SortedSet getPackagesReferencedFromPackage(java.lang.String packageName)
packageName
- The name of the Java package to get
referenced Java packages for.
public void toJavaNames()
public boolean equals(java.lang.Object other)
public java.lang.String toString()
|
Knopflerfish OSGi 2.4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |