blob: d064403561157873c38071fdad94b5dc4967147b [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>7.&nbsp;Detecting Manifest Requirements</title><link rel="stylesheet" href="css/stylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Bundlor User Guide"><link rel="up" href="index.html" title="Bundlor User Guide"><link rel="prev" href="ch06s02.html" title="6.2&nbsp;Using OSGi profiles with Bundlor"><link rel="next" href="ch07s02.html" title="7.2&nbsp;Spring Context Configuration Detection Criteria"><!--Begin Google Analytics code--><script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
var pageTracker = _gat._getTracker("UA-2728886-3");
pageTracker._setDomainName("none");
pageTracker._setAllowLinker(true);
pageTracker._trackPageview();
</script><!--End Google Analytics code--></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">7.&nbsp;Detecting Manifest Requirements</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="detecting"></a>7.&nbsp;Detecting Manifest Requirements</h2></div></div></div><p>
Bundlor's main function is to scan an existing JAR file and determine its runtime dependencies. With this
information it can then generate the OSGi-compliant manifest headers needed for proper runtime operation. This
analysis is comprised of looking for class references and class names in Java classes and certain well-known
file types.
</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="detecting.java"></a>7.1&nbsp;Java Detection Criteria</h2></div></div></div><p>
Bundlor scans any Java class it can find in the artifact created by the underlying build system. This means
that if a build process has custom behavior (i.e. weaving with AspectJ or <code class="literal">jarjar</code>ing),
Bundlor will be able to see and analyze the changes made by that process as long as the changes are in the
artifact created by the build system.
</p><p>
There are a number of places in a Java class that another Java type can be referenced from. Bundlor detects
these references and adds manifest requirements for them.
</p><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1246"></a>7.1.1&nbsp;Export Package</h3></div></div></div><p>
Bundlor exports any package that contains a class.
</p></div><div class="section" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="d0e1251"></a>7.1.2&nbsp;Import Package</h3></div></div></div><p>
The following is a list of the places that Bundlor will search for type names
</p><div class="itemizedlist"><ul type="disc"><li>Declared Type Superclass Types</li><li>Declared Type Implemented Interfaces Types</li><li>Declared Type Annotation Types</li><li>Declared Field Types</li><li>Declared Field Values Types</li><li>Declared Method Argument Types</li><li>Declared Method Return Types</li><li>Declared Method Exception Types</li><li>Declared Method Annotation Types</li><li>Reference To Field Owner Type</li><li>Reference To Field Type</li><li>Declared Local Variable Type</li><li>Reference to Method Declaring Type</li><li>Reference to Method Return Type</li><li>Reference to Method Argument Types</li><li>Allocation of Array Type</li><li>Declared Parameter Annotation Types</li><li>Caught Exception Type</li><li>Instantiated Type</li><li>Cast Target Type</li><li>Instanceof Type</li><li>Declared Constant Type</li></ul></div><p>
</p></div></div></div><!--Begin LoopFuse code--><script src="http://loopfuse.net/webrecorder/js/listen.js" type="text/javascript"></script><script type="text/javascript">
_lf_cid = "LF_48be82fa";
_lf_remora();
</script><!--End LoopFuse code--><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s02.html">Prev</a>&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="ch07s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.2&nbsp;Using OSGi profiles with Bundlor&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;7.2&nbsp;Spring Context Configuration Detection Criteria</td></tr></table></div></body></html>