Source:
public void testApi1 ( ) throws java.lang.Exception { assertEquals ( ( "src/foo/bar/ApiCallTest.java:18: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMLocator [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " public void method(Chronometer chronometer, DOMLocator locator) {\n" + " ~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:20: Error: Call requires API level 11 (current min is 1): android.app.Activity#getActionBar [NewApi]\n" ) + " getActionBar(); // API 11\n" ) + " ~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:23: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMError [NewApi]\n" ) + " DOMError error = null; // API 8\n" ) + " ~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:24: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMErrorHandler [NewApi]\n" ) + " Class<?> clz = DOMErrorHandler.class; // API 8\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:27: Error: Call requires API level 3 (current min is 1): android.widget.Chronometer#getOnChronometerTickListener [NewApi]\n" ) + " chronometer.getOnChronometerTickListener(); // API 3 \n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:30: Error: Call requires API level 11 (current min is 1): android.widget.Chronometer#setTextIsSelectable [NewApi]\n" ) + " chronometer.setTextIsSelectable(true); // API 11\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:33: Error: Field requires API level 11 (current min is 1): dalvik.bytecode.OpcodeInfo#MAXIMUM_VALUE [NewApi]\n" ) + " int field = OpcodeInfo.MAXIMUM_VALUE; // API 11\n" ) + " ~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:38: Error: Class requires API level 14 (current min is 1): android.app.ApplicationErrorReport.BatteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:38: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:41: Error: Field requires API level 11 (current min is 1): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " Mode mode = PorterDuff.Mode.OVERLAY; // API 11\n" ) + " ~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:45: Error: Class requires API level 14 (current min is 1): android.widget.GridLayout [NewApi]\n" ) + " GridLayout getGridLayout() { // API 14\n" ) + " ~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:49: Error: Class requires API level 14 (current min is 1): android.app.ApplicationErrorReport [NewApi]\n" ) + " private ApplicationErrorReport getReport() {\n" ) + " ~~~~~~~~~\n" ) + "12 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/ApiCallTest.java.txt=>src/foo/bar/ApiCallTest.java" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ) ; }

Target:
public void testApi1 ( ) throws java.lang.Exception { assertEquals ( ( "src/foo/bar/ApiCallTest.java:20: Error: Call requires API level 11 (current min is 1): android.app.Activity#getActionBar [NewApi]\n" + ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( " getActionBar(); // API 11\n" + " ~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:24: Error: Class requires API level 8 (current min is 1): org.w3c.dom.DOMErrorHandler [NewApi]\n" ) + " Class<?> clz = DOMErrorHandler.class; // API 8\n" ) + " ~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:27: Error: Call requires API level 3 (current min is 1): android.widget.Chronometer#getOnChronometerTickListener [NewApi]\n" ) + " chronometer.getOnChronometerTickListener(); // API 3 \n" ) + " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:30: Error: Call requires API level 11 (current min is 1): android.widget.Chronometer#setTextIsSelectable [NewApi]\n" ) + " chronometer.setTextIsSelectable(true); // API 11\n" ) + " ~~~~~~~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:33: Error: Field requires API level 11 (current min is 1): dalvik.bytecode.OpcodeInfo#MAXIMUM_VALUE [NewApi]\n" ) + " int field = OpcodeInfo.MAXIMUM_VALUE; // API 11\n" ) + " ~~~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:38: Error: Field requires API level 14 (current min is 1): android.app.ApplicationErrorReport#batteryInfo [NewApi]\n" ) + " BatteryInfo batteryInfo = getReport().batteryInfo;\n" ) + " ~~~~~~~~~~~\n" ) + "src/foo/bar/ApiCallTest.java:41: Error: Field requires API level 11 (current min is 1): android.graphics.PorterDuff.Mode#OVERLAY [NewApi]\n" ) + " Mode mode = PorterDuff.Mode.OVERLAY; // API 11\n" ) + " ~~~~~~~\n" ) + "7 errors, 0 warnings\n" ) ) , lintProject ( "apicheck/classpath=>.classpath" , "apicheck/minsdk1.xml=>AndroidManifest.xml" , "apicheck/ApiCallTest.java.txt=>src/foo/bar/ApiCallTest.java" , "apicheck/ApiCallTest.class.data=>bin/classes/foo/bar/ApiCallTest.class" ) ) ; }