1 package android.signature.cts; 2 3 /** 4 * Define the type of the signature check failures. 5 */ 6 public enum FailureType { 7 MISSING_ANNOTATION, 8 MISSING_CLASS, 9 MISSING_INTERFACE, 10 MISSING_CONSTRUCTOR, 11 MISSING_METHOD, 12 MISSING_FIELD, 13 MISMATCH_CLASS, 14 MISMATCH_INTERFACE, 15 MISMATCH_INTERFACE_METHOD, 16 MISMATCH_METHOD, 17 MISMATCH_FIELD, 18 UNEXPECTED_CLASS, 19 EXTRA_CLASS, 20 EXTRA_INTERFACE, 21 EXTRA_METHOD, 22 EXTRA_FIELD, 23 CAUGHT_EXCEPTION; 24 mismatch(JDiffClassDescription description)25 static FailureType mismatch(JDiffClassDescription description) { 26 return JDiffClassDescription.JDiffType.INTERFACE.equals(description.getClassType()) 27 ? FailureType.MISMATCH_INTERFACE : FailureType.MISMATCH_CLASS; 28 } 29 missing(JDiffClassDescription description)30 static FailureType missing(JDiffClassDescription description) { 31 return JDiffClassDescription.JDiffType.INTERFACE.equals(description.getClassType()) 32 ? FailureType.MISSING_INTERFACE : FailureType.MISSING_CLASS; 33 } 34 35 } 36