public final class ApiDifference
extends java.lang.Object
Constructor and Description |
---|
ApiDifference(Message message,
Severity binarySeverity,
Severity sourceSeverity,
java.lang.String clazz,
java.lang.String method,
java.lang.String field,
java.lang.String[] args)
Create a new API difference representation.
|
ApiDifference(Message message,
Severity severity,
java.lang.String clazz,
java.lang.String method,
java.lang.String field,
java.lang.String[] args)
Invokes the two-severity-level version of this constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAffectedClass()
The fully qualified class name of the class that has changed.
|
java.lang.String |
getAffectedField()
Field name of the field that has changed, if any.
|
java.lang.String |
getAffectedMethod()
Method signature of the method that has changed, if any.
|
Severity |
getBinaryCompatibilitySeverity()
The Severity of the API difference in terms of binary compatibility.
|
Severity |
getMaximumSeverity()
Return the maximum of the binary and source compatibility severities.
|
Message |
getMessage()
Return the message object (if any) associated with this difference.
|
java.lang.String |
getReport(MessageTranslator translator)
Human readable api change description.
|
Severity |
getSourceCompatibilitySeverity()
The Severity of the API difference in terms of source compatibility.
|
java.lang.String |
toString() |
java.lang.String |
toString(MessageTranslator translator)
Get a human-readable description of this object.
|
public ApiDifference(Message message, Severity severity, java.lang.String clazz, java.lang.String method, java.lang.String field, java.lang.String[] args)
public ApiDifference(Message message, Severity binarySeverity, Severity sourceSeverity, java.lang.String clazz, java.lang.String method, java.lang.String field, java.lang.String[] args)
message
- is the key of a human readable string describing the
change that was made.binarySeverity
- the severity in terms of binary compatibility,
must be non-null.sourceSeverity
- the severity in terms of source code compatibility,
must be non-null.clazz
- is the fully-qualified name of the class in which the
change occurred, must be non-null.method
- the method signature of the method that changed,
null
if no method was affected.field
- the field name where the change occured, null
if no field was affected.args
- is a set of additional change-specific strings which are
made available for the message description string to reference via
the standard {n} syntax.public Message getMessage()
Checks which support the "new" message API will provide ApiDifference objects with non-null message objects.
public Severity getBinaryCompatibilitySeverity()
public Severity getSourceCompatibilitySeverity()
binary compatibility severity
, for example adding a checked exception
to a method signature is binary compatible but not source compatible.
ERROR means that clients will definitely break, WARNING means that
clients may break, depending on how they use the library.
See the eclipse paper for further explanation.public Severity getMaximumSeverity()
public java.lang.String getReport(MessageTranslator translator)
public java.lang.String getAffectedClass()
public java.lang.String getAffectedMethod()
null
if no method is affected.public java.lang.String getAffectedField()
null
if no field is affected.public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(MessageTranslator translator)
Copyright © 2003-2012 Lars K??hne. All Rights Reserved.