Codota Logo
JarArchiveComparator
Code IndexAdd Codota to your IDE (free)

How to use
JarArchiveComparator
in
japicmp.cmp

Best Java code snippets using japicmp.cmp.JarArchiveComparator (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: siom79/japicmp

/**
 * Compares the two given archives.
 *
 * @param oldArchive the old version of the archive
 * @param newArchive the new version of the archive
 * @return a list which contains one instance of {@link japicmp.model.JApiClass} for each class found in one of the two archives
 * @throws JApiCmpException if the comparison fails
 */
public List<JApiClass> compare(JApiCmpArchive oldArchive, JApiCmpArchive newArchive) {
  return compare(Collections.singletonList(oldArchive), Collections.singletonList(newArchive));
}
origin: com.github.siom79.japicmp/japicmp

private String setupClasspath(ClassPool classPool, List<String> classPathEntries) {
  String classPathAsString = appendUserDefinedClassPathEntries(classPool, classPathEntries);
  return appendSystemClassPath(classPool, classPathAsString);
}
origin: siom79/japicmp

@Override
public void execute() {
  if (oldJar == null) {
    throw new BuildException("Path to old jar must be specified using the oldjar attribute.");
  }
  if (newJar == null) {
    throw new BuildException("Path to new jar must be specified using the newjar attribute.");
  }
  Options options = createOptionsFromAntAttrs();
  JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(JarArchiveComparatorOptions.of(options));
  List<JApiClass> jApiClasses = jarArchiveComparator.compare(options.getOldArchives(), options.getNewArchives());
  generateOutput(options, jApiClasses, jarArchiveComparator);
}
origin: melix/japicmp-gradle-plugin

@Override
public void run() {
  JarArchiveComparatorOptions comparatorOptions = createOptions();
  JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(comparatorOptions);
  generateOutput(jarArchiveComparator);
}
origin: siom79/japicmp

/**
 * Compares the two lists with CtClass objects using the provided options instance.
 *
 * @param options    the options to use
 * @param oldClasses a list of CtClasses that represent the old version
 * @param newClasses a list of CtClasses that represent the new version
 * @return a list of {@link japicmp.model.JApiClass} that represent the changes
 */
List<JApiClass> compareClassLists(JarArchiveComparatorOptions options, List<CtClass> oldClasses, List<CtClass> newClasses) {
  List<CtClass> oldClassesFiltered = applyFilter(options, oldClasses);
  List<CtClass> newClassesFiltered = applyFilter(options, newClasses);
  ClassesComparator classesComparator = new ClassesComparator(this, options);
  classesComparator.compare(oldClassesFiltered, newClassesFiltered);
  List<JApiClass> classList = classesComparator.getClasses();
  if (LOGGER.isLoggable(Level.FINE)) {
    for (JApiClass jApiClass : classList) {
      LOGGER.fine(jApiClass.toString());
    }
  }
  checkBinaryCompatibility(classList);
  checkJavaObjectSerializationCompatibility(classList);
  OutputFilter.sortClassesAndMethods(classList);
  return classList;
}
origin: siom79/japicmp

public void run(String[] args) {
  CliParser cliParser = new CliParser();
  Options options = cliParser.parse(args);
  if (options.isHelpRequested()) {
    CliParser.printHelp();
    return;
  }
  JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(JarArchiveComparatorOptions.of(options));
  List<JApiClass> jApiClasses = jarArchiveComparator.compare(options.getOldArchives(), options.getNewArchives());
  generateOutput(options, jApiClasses, jarArchiveComparator);
}
origin: com.github.siom79.japicmp/japicmp

/**
 * Compares the two lists with CtClass objects using the provided options instance.
 *
 * @param options    the options to use
 * @param oldClasses a list of CtClasses that represent the old version
 * @param newClasses a list of CtClasses that represent the new version
 * @return a list of {@link japicmp.model.JApiClass} that represent the changes
 */
List<JApiClass> compareClassLists(JarArchiveComparatorOptions options, List<CtClass> oldClasses, List<CtClass> newClasses) {
  List<CtClass> oldClassesFiltered = applyFilter(options, oldClasses);
  List<CtClass> newClassesFiltered = applyFilter(options, newClasses);
  ClassesComparator classesComparator = new ClassesComparator(this, options);
  classesComparator.compare(oldClassesFiltered, newClassesFiltered);
  List<JApiClass> classList = classesComparator.getClasses();
  if (LOGGER.isLoggable(Level.FINE)) {
    for (JApiClass jApiClass : classList) {
      LOGGER.fine(jApiClass.toString());
    }
  }
  checkBinaryCompatibility(classList);
  checkJavaObjectSerializationCompatibility(classList);
  OutputFilter.sortClassesAndMethods(classList);
  return classList;
}
origin: com.github.siom79.japicmp/japicmp

public void run(String[] args) {
  CliParser cliParser = new CliParser();
  Options options = cliParser.parse(args);
  if (options.isHelpRequested()) {
    CliParser.printHelp();
    return;
  }
  JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(JarArchiveComparatorOptions.of(options));
  List<JApiClass> jApiClasses = jarArchiveComparator.compare(options.getOldArchives(), options.getNewArchives());
  generateOutput(options, jApiClasses, jarArchiveComparator);
}
origin: com.github.siom79.japicmp/japicmp

/**
 * Compares the two given archives.
 *
 * @param oldArchive the old version of the archive
 * @param newArchive the new version of the archive
 * @return a list which contains one instance of {@link japicmp.model.JApiClass} for each class found in one of the two archives
 * @throws JApiCmpException if the comparison fails
 */
public List<JApiClass> compare(JApiCmpArchive oldArchive, JApiCmpArchive newArchive) {
  return compare(Collections.singletonList(oldArchive), Collections.singletonList(newArchive));
}
origin: siom79/japicmp

private String setupClasspath(ClassPool classPool, List<String> classPathEntries) {
  String classPathAsString = appendUserDefinedClassPathEntries(classPool, classPathEntries);
  return appendSystemClassPath(classPool, classPathAsString);
}
origin: siom79/japicmp

setUpClassPath(comparatorOptions, pluginParameters, mavenParameters);
setUpOverrideCompatibilityChanges(comparatorOptions, pluginParameters);
JarArchiveComparator jarArchiveComparator = new JarArchiveComparator(comparatorOptions);
if (options.getNewArchives().isEmpty()) {
  getLog().warn("Skipping execution because no new version could be resolved/found.");
  return Optional.absent();
List<JApiClass> jApiClasses = jarArchiveComparator.compare(options.getOldArchives(), options.getNewArchives());
try {
  jApiClasses = applyPostAnalysisScript(pluginParameters.getParameterParam(), jApiClasses);
origin: melix/japicmp-gradle-plugin

final List<JApiCmpArchive> baseline = toJapiCmpArchives(oldArchives);
final List<JApiCmpArchive> current = toJapiCmpArchives(newArchives);
List<JApiClass> jApiClasses = jarArchiveComparator.compare(baseline, current);
options.setOutputOnlyModifications(onlyModified);
options.setOutputOnlyBinaryIncompatibleModifications(onlyBinaryIncompatibleModified);
japicmp.cmpJarArchiveComparator

Javadoc

This class provides the basic methods to compare the classes within to jar archives.

Most used methods

  • <init>
    Constructs an instance of this class and performs a setup of the classpath
  • compare
    Compares the two given lists of archives.
  • appendSystemClassPath
  • appendUserDefinedClassPathEntries
  • applyFilter
  • checkBinaryCompatibility
  • checkJavaObjectSerializationCompatibility
  • compareClassLists
    Compares the two lists with CtClass objects using the provided options instance.
  • createAndCompareClassLists
  • createListOfCtClasses
  • getCommonClassPool
    Returns the javassist ClassPool instance that is used by this instance. This can be used in unit tes
  • getCommonClasspathAsString
    Returns the common classpath used by japicmp.cmp.JarArchiveComparator
  • getCommonClassPool,
  • getCommonClasspathAsString,
  • getJarArchiveComparatorOptions,
  • getNewClassPathAsString,
  • getNewClassPool,
  • getOldClassPathAsString,
  • getOldClassPool,
  • loadClass,
  • setupClasspath,
  • setupClasspaths

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • InputStreamReader (java.io)
    An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and decodes
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • ConcurrentHashMap (java.util.concurrent)
    A hash table supporting full concurrency of retrievals and adjustable expected concurrency for updat
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now