public static JApiCmpException forClassLoading(Exception e, String name, JarArchiveComparator jarArchiveComparator) { String classPathAsString = "(CLASSPATH=" + jarArchiveComparator.getCommonClasspathAsString() + ")"; if (jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode() == JarArchiveComparatorOptions.ClassPathMode.TWO_SEPARATE_CLASSPATHS) { classPathAsString = "(OLD CLASSPATH=" + jarArchiveComparator.getOldClassPathAsString() + " / NEW CLASSPATH=" + jarArchiveComparator.getNewClassPathAsString() + ")"; } return new JApiCmpException(JApiCmpException.Reason.ClassLoading, "Could not load '" + name + "': " + e.getMessage() + ". Please make sure that all libraries have been added to the classpath " + classPathAsString + " or try the option '--ignore-missing-classes'.", e); }
public static JApiCmpException forClassLoading(Exception e, String name, JarArchiveComparator jarArchiveComparator) { String classPathAsString = "(CLASSPATH=" + jarArchiveComparator.getCommonClasspathAsString() + ")"; if (jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode() == JarArchiveComparatorOptions.ClassPathMode.TWO_SEPARATE_CLASSPATHS) { classPathAsString = "(OLD CLASSPATH=" + jarArchiveComparator.getOldClassPathAsString() + " / NEW CLASSPATH=" + jarArchiveComparator.getNewClassPathAsString() + ")"; } return new JApiCmpException(JApiCmpException.Reason.ClassLoading, "Could not load '" + name + "': " + e.getMessage() + ". Please make sure that all libraries have been added to the classpath " + classPathAsString + " or try the option '--ignore-missing-classes'.", e); }
public static JApiCmpException forClassLoading(String name, JarArchiveComparator jarArchiveComparator) { String classPathAsString = "(CLASSPATH=" + jarArchiveComparator.getCommonClasspathAsString() + ")"; if (jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode() == JarArchiveComparatorOptions.ClassPathMode.TWO_SEPARATE_CLASSPATHS) { classPathAsString = "(OLD CLASSPATH=" + jarArchiveComparator.getOldClassPathAsString() + " / NEW CLASSPATH=" + jarArchiveComparator.getNewClassPathAsString() + ")"; } return new JApiCmpException(JApiCmpException.Reason.ClassLoading, "Could not load '" + name + "'. Please make sure that all libraries have been added to the classpath " + classPathAsString + " or try the option '--ignore-missing-classes'."); } }
public static JApiCmpException forClassLoading(String name, JarArchiveComparator jarArchiveComparator) { String classPathAsString = "(CLASSPATH=" + jarArchiveComparator.getCommonClasspathAsString() + ")"; if (jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode() == JarArchiveComparatorOptions.ClassPathMode.TWO_SEPARATE_CLASSPATHS) { classPathAsString = "(OLD CLASSPATH=" + jarArchiveComparator.getOldClassPathAsString() + " / NEW CLASSPATH=" + jarArchiveComparator.getNewClassPathAsString() + ")"; } return new JApiCmpException(JApiCmpException.Reason.ClassLoading, "Could not load '" + name + "'. Please make sure that all libraries have been added to the classpath " + classPathAsString + " or try the option '--ignore-missing-classes'."); } }
public JApiBehavior(JApiClass jApiClass, String name, Optional<? extends CtBehavior> oldBehavior, Optional<? extends CtBehavior> newBehavior, JApiChangeStatus changeStatus, JarArchiveComparator jarArchiveComparator) { this.jApiClass = jApiClass; this.name = name; this.jarArchiveComparator = jarArchiveComparator; computeAnnotationChanges(annotations, oldBehavior, newBehavior, jarArchiveComparator.getJarArchiveComparatorOptions()); this.accessModifier = extractAccessModifier(oldBehavior, newBehavior); this.finalModifier = extractFinalModifier(oldBehavior, newBehavior); this.staticModifier = extractStaticModifier(oldBehavior, newBehavior); this.abstractModifier = extractAbstractModifier(oldBehavior, newBehavior); this.bridgeModifier = extractBridgeModifier(oldBehavior, newBehavior); this.syntheticModifier = extractSyntheticModifier(oldBehavior, newBehavior); this.syntheticAttribute = extractSyntheticAttribute(oldBehavior, newBehavior); this.exceptions = computeExceptionChanges(oldBehavior, newBehavior); this.changeStatus = evaluateChangeStatus(changeStatus); this.oldLineNumber = getLineNumber(oldBehavior); this.newLineNumber = getLineNumber(newBehavior); }
public JApiBehavior(JApiClass jApiClass, String name, Optional<? extends CtBehavior> oldBehavior, Optional<? extends CtBehavior> newBehavior, JApiChangeStatus changeStatus, JarArchiveComparator jarArchiveComparator) { this.jApiClass = jApiClass; this.name = name; this.jarArchiveComparator = jarArchiveComparator; computeAnnotationChanges(annotations, oldBehavior, newBehavior, jarArchiveComparator.getJarArchiveComparatorOptions()); this.accessModifier = extractAccessModifier(oldBehavior, newBehavior); this.finalModifier = extractFinalModifier(oldBehavior, newBehavior); this.staticModifier = extractStaticModifier(oldBehavior, newBehavior); this.abstractModifier = extractAbstractModifier(oldBehavior, newBehavior); this.bridgeModifier = extractBridgeModifier(oldBehavior, newBehavior); this.syntheticModifier = extractSyntheticModifier(oldBehavior, newBehavior); this.syntheticAttribute = extractSyntheticAttribute(oldBehavior, newBehavior); this.exceptions = computeExceptionChanges(oldBehavior, newBehavior); this.changeStatus = evaluateChangeStatus(changeStatus); this.oldLineNumber = getLineNumber(oldBehavior); this.newLineNumber = getLineNumber(newBehavior); }
Optional<CtClass> oldClassOptional = Optional.absent(); Optional<CtClass> newClassOptional = Optional.absent(); JarArchiveComparatorOptions.ClassPathMode classPathMode = this.jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode(); if (classPathMode == JarArchiveComparatorOptions.ClassPathMode.ONE_COMMON_CLASSPATH) { ClassPool classPool = this.jarArchiveComparator.getCommonClassPool(); if (!this.jarArchiveComparator.getJarArchiveComparatorOptions().getIgnoreMissingClasses().ignoreClass(newSuperclassName)) { throw JApiCmpException.forClassLoading(newSuperclassName, this.jarArchiveComparator);
Optional<CtClass> oldClassOptional = Optional.absent(); Optional<CtClass> newClassOptional = Optional.absent(); JarArchiveComparatorOptions.ClassPathMode classPathMode = this.jarArchiveComparator.getJarArchiveComparatorOptions().getClassPathMode(); if (classPathMode == JarArchiveComparatorOptions.ClassPathMode.ONE_COMMON_CLASSPATH) { ClassPool classPool = this.jarArchiveComparator.getCommonClassPool(); if (!this.jarArchiveComparator.getJarArchiveComparatorOptions().getIgnoreMissingClasses().ignoreClass(newSuperclassName)) { throw JApiCmpException.forClassLoading(newSuperclassName, this.jarArchiveComparator);
public JApiClass(JarArchiveComparator jarArchiveComparator, String fullyQualifiedName, Optional<CtClass> oldClass, Optional<CtClass> newClass, JApiChangeStatus changeStatus, JApiClassType classType) { this.jarArchiveComparator = jarArchiveComparator; this.options = this.jarArchiveComparator.getJarArchiveComparatorOptions(); this.fullyQualifiedName = fullyQualifiedName; this.newClass = newClass; this.oldClass = oldClass; this.classType = classType; this.superclass = extractSuperclass(oldClass, newClass); computeMethodChanges(this, oldClass, newClass); computeInterfaceChanges(this.interfaces, oldClass, newClass); computeFieldChanges(this.fields, oldClass, newClass); computeAnnotationChanges(this.annotations, oldClass, newClass); this.accessModifier = extractAccessModifier(oldClass, newClass); this.finalModifier = extractFinalModifier(oldClass, newClass); this.staticModifier = extractStaticModifier(oldClass, newClass); this.abstractModifier = extractAbstractModifier(oldClass, newClass); this.syntheticModifier = extractSyntheticModifier(oldClass, newClass); this.syntheticAttribute = extractSyntheticAttribute(oldClass, newClass); this.jApiSerialVersionUid = JavaObjectSerializationCompatibility.extractSerialVersionUid(options, jarArchiveComparator, oldClass, newClass); this.classFileFormatVersion = extractClassFileFormatVersion(oldClass, newClass); this.changeStatus = evaluateChangeStatus(changeStatus); }
public JApiClass(JarArchiveComparator jarArchiveComparator, String fullyQualifiedName, Optional<CtClass> oldClass, Optional<CtClass> newClass, JApiChangeStatus changeStatus, JApiClassType classType) { this.jarArchiveComparator = jarArchiveComparator; this.options = this.jarArchiveComparator.getJarArchiveComparatorOptions(); this.fullyQualifiedName = fullyQualifiedName; this.newClass = newClass; this.oldClass = oldClass; this.classType = classType; this.superclass = extractSuperclass(oldClass, newClass); computeMethodChanges(this, oldClass, newClass); computeInterfaceChanges(this.interfaces, oldClass, newClass); computeFieldChanges(this.fields, oldClass, newClass); computeAnnotationChanges(this.annotations, oldClass, newClass); this.accessModifier = extractAccessModifier(oldClass, newClass); this.finalModifier = extractFinalModifier(oldClass, newClass); this.staticModifier = extractStaticModifier(oldClass, newClass); this.abstractModifier = extractAbstractModifier(oldClass, newClass); this.syntheticModifier = extractSyntheticModifier(oldClass, newClass); this.syntheticAttribute = extractSyntheticAttribute(oldClass, newClass); this.jApiSerialVersionUid = JavaObjectSerializationCompatibility.extractSerialVersionUid(options, jarArchiveComparator, oldClass, newClass); this.classFileFormatVersion = extractClassFileFormatVersion(oldClass, newClass); this.changeStatus = evaluateChangeStatus(changeStatus); }