|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectaQute.lib.osgi.WriteResource
aQute.bnd.make.calltree.CalltreeResource
public class CalltreeResource
Create an XML call tree of a set of classes. The structure of the XML is:
calltree ::= <using> <usedby> using ::= <method> * usedby ::= <method> * method ::= <ref>The
using
element contains methods in the set of classes and
their references. The usedby
element contains the used methods
and their references to the set of classes. The ref
element
contains the class, the method name, the descriptor, and a pretty print
version of the method.
The XML does not contain an XML processor instruction to make it easier to
include in other XML. The encoding is always UTF-8.
This class can be used as a resource, just add it to a JAR and the data is
generated when the resource is written (saving time when the JAR is up to
date and does not have to be generated). However, the actual write method is
a static method and can be called as well:
writeCalltree(PrintWriter, Collection)
.
Constructor Summary | |
---|---|
CalltreeResource(Collection<Clazz> values)
Create a resource for inclusion that will print a call tree. |
Method Summary | |
---|---|
long |
lastModified()
We set the last modified to 0 so this resource does not force a new JAR if all other resources are up to date. |
void |
write(OutputStream out)
The write method is called to write the resource. |
static void |
writeCalltree(PrintWriter out,
Collection<Clazz> classes)
Print the call tree in XML. |
Methods inherited from class aQute.lib.osgi.WriteResource |
---|
getExtra, openInputStream, setExtra |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CalltreeResource(Collection<Clazz> values)
values
- the classes for which the call tree is generated.Method Detail |
---|
public long lastModified()
lastModified
in interface Resource
lastModified
in class WriteResource
public void write(OutputStream out) throws Exception
write
in interface Resource
write
in class WriteResource
Exception
public static void writeCalltree(PrintWriter out, Collection<Clazz> classes) throws Exception
out
- The output writerclasses
- The set of classes
IOException
- Any errors
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |