Record Class ApiDiff
java.lang.Object
java.lang.Record
com.google.errorprone.bugpatterns.apidiff.ApiDiff
- Record Components:
unsupportedClasses- Binary names of classes only present in the new API.unsupportedMembersByClass- Members only present in the new API, grouped by binary name of their declaring class.
public record ApiDiff(com.google.common.collect.ImmutableSet<String> unsupportedClasses, com.google.common.collect.ImmutableSetMultimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass)
extends Record
The difference between two APIs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA per class unique identifier for a field or method. -
Constructor Summary
ConstructorsConstructorDescriptionApiDiff(com.google.common.collect.ImmutableSet<String> unsupportedClasses, com.google.common.collect.ImmutableSetMultimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass) Creates an instance of aApiDiffrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ApiDifffromMembers(Set<String> unsupportedClasses, com.google.common.collect.Multimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass) static ApiDifffromProto(ApiDiffProto.Diff diff) Converts aApiDiffProto.Diffto aApiDiff.final inthashCode()Returns a hash code value for this object.toProto()Converts aApiDiffto aApiDiffProto.Diff.final StringtoString()Returns a string representation of this record class.com.google.common.collect.ImmutableSet<String> Returns the value of theunsupportedClassesrecord component.com.google.common.collect.ImmutableSetMultimap<String, ApiDiff.ClassMemberKey> Returns the value of theunsupportedMembersByClassrecord component.
-
Constructor Details
-
ApiDiff
public ApiDiff(com.google.common.collect.ImmutableSet<String> unsupportedClasses, com.google.common.collect.ImmutableSetMultimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass) Creates an instance of aApiDiffrecord class.- Parameters:
unsupportedClasses- the value for theunsupportedClassesrecord componentunsupportedMembersByClass- the value for theunsupportedMembersByClassrecord component
-
-
Method Details
-
fromMembers
public static ApiDiff fromMembers(Set<String> unsupportedClasses, com.google.common.collect.Multimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass) -
fromProto
Converts aApiDiffProto.Diffto aApiDiff. -
toProto
Converts aApiDiffto aApiDiffProto.Diff. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
unsupportedClasses
Returns the value of theunsupportedClassesrecord component.- Returns:
- the value of the
unsupportedClassesrecord component
-
unsupportedMembersByClass
public com.google.common.collect.ImmutableSetMultimap<String, ApiDiff.ClassMemberKey> unsupportedMembersByClass()Returns the value of theunsupportedMembersByClassrecord component.- Returns:
- the value of the
unsupportedMembersByClassrecord component
-