Package aQute.bnd.differ
Class DiffPluginImpl
- java.lang.Object
-
- aQute.bnd.differ.DiffPluginImpl
-
- All Implemented Interfaces:
Differ
public class DiffPluginImpl extends java.lang.Object implements Differ
This Diff Plugin Implementation will compare JARs for their API (based on the Bundle Class Path and exported packages), the Manifest, and the resources. The differences are represented in aDiff
tree.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Set<java.lang.String>
IGNORE_HEADERS
Headers that are considered not major enough to be considered(package private) Instructions
localIgnore
(package private) static java.util.Set<java.lang.String>
MAJOR_HEADERS
Headers that are considered major enough to parse according to spec and compare their constituentsprivate static java.util.regex.Pattern
META_INF_P
Create an element representing all resources in the JAR(package private) static java.util.Set<java.lang.String>
ORDERED_HEADERS
Headers that have values that should be sorted
-
Constructor Summary
Constructors Constructor Description DiffPluginImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Element
bundleElement(Analyzer analyzer)
Create an element representing a bundle from the Jar.Tree
deserialize(Tree.Data data)
private boolean
hasSource(Analyzer analyzer, java.lang.String path)
private Element
manifestElement(java.util.jar.Manifest manifest)
Create an element for each manifest header.private Element
resourcesElement(Analyzer analyzer)
void
setIgnore(Parameters diffignore)
void
setIgnore(java.lang.String diffignore)
Tree
tree(Analyzer newer)
Tree
tree(Jar newer)
Tree
tree(java.io.File newer)
-
-
-
Field Detail
-
MAJOR_HEADERS
static final java.util.Set<java.lang.String> MAJOR_HEADERS
Headers that are considered major enough to parse according to spec and compare their constituents
-
IGNORE_HEADERS
static final java.util.Set<java.lang.String> IGNORE_HEADERS
Headers that are considered not major enough to be considered
-
ORDERED_HEADERS
static final java.util.Set<java.lang.String> ORDERED_HEADERS
Headers that have values that should be sorted
-
localIgnore
Instructions localIgnore
-
META_INF_P
private static final java.util.regex.Pattern META_INF_P
Create an element representing all resources in the JAR
-
-
Method Detail
-
tree
public Tree tree(java.io.File newer) throws java.lang.Exception
- Throws:
java.lang.Exception
- See Also:
Differ.tree(aQute.bnd.osgi.Jar)
-
tree
public Tree tree(Jar newer) throws java.lang.Exception
- Specified by:
tree
in interfaceDiffer
- Throws:
java.lang.Exception
- See Also:
Differ.tree(aQute.bnd.osgi.Jar)
-
bundleElement
private Element bundleElement(Analyzer analyzer) throws java.lang.Exception
Create an element representing a bundle from the Jar.- Throws:
java.lang.Exception
-
resourcesElement
private Element resourcesElement(Analyzer analyzer) throws java.lang.Exception
- Throws:
java.lang.Exception
-
hasSource
private boolean hasSource(Analyzer analyzer, java.lang.String path) throws java.lang.Exception
- Throws:
java.lang.Exception
-
manifestElement
private Element manifestElement(java.util.jar.Manifest manifest)
Create an element for each manifest header. There areIGNORE_HEADERS
andMAJOR_HEADERS
that will be treated differently.- Parameters:
manifest
-- Returns:
- the created
Element
-
deserialize
public Tree deserialize(Tree.Data data) throws java.lang.Exception
- Specified by:
deserialize
in interfaceDiffer
- Throws:
java.lang.Exception
-
setIgnore
public void setIgnore(java.lang.String diffignore)
-
setIgnore
public void setIgnore(Parameters diffignore)
-
-