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 aDifftree.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.util.Set<java.lang.String>IGNORE_HEADERSHeaders that are considered not major enough to be considered(package private) InstructionslocalIgnore(package private) static java.util.Set<java.lang.String>MAJOR_HEADERSHeaders that are considered major enough to parse according to spec and compare their constituentsprivate static java.util.regex.PatternMETA_INF_PCreate an element representing all resources in the JAR(package private) static java.util.Set<java.lang.String>ORDERED_HEADERSHeaders 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 ElementbundleElement(Analyzer analyzer)Create an element representing a bundle from the Jar.Treedeserialize(Tree.Data data)private booleanhasSource(Analyzer analyzer, java.lang.String path)private ElementmanifestElement(java.util.jar.Manifest manifest)Create an element for each manifest header.private ElementresourcesElement(Analyzer analyzer)voidsetIgnore(Parameters diffignore)voidsetIgnore(java.lang.String diffignore)Treetree(Analyzer newer)Treetree(Jar newer)Treetree(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:
treein 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_HEADERSandMAJOR_HEADERSthat will be treated differently.- Parameters:
manifest-- Returns:
- the created
Element
-
deserialize
public Tree deserialize(Tree.Data data) throws java.lang.Exception
- Specified by:
deserializein interfaceDiffer- Throws:
java.lang.Exception
-
setIgnore
public void setIgnore(java.lang.String diffignore)
-
setIgnore
public void setIgnore(Parameters diffignore)
-
-