118e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray/* 218e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * Copyright (C) 2015 The Android Open Source Project 318e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * 418e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * Licensed under the Apache License, Version 2.0 (the "License"); 518e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * you may not use this file except in compliance with the License. 618e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * You may obtain a copy of the License at 718e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * 818e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * http://www.apache.org/licenses/LICENSE-2.0 918e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * 1018e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * Unless required by applicable law or agreed to in writing, software 1118e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * distributed under the License is distributed on an "AS IS" BASIS, 1218e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1318e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * See the License for the specific language governing permissions and 1418e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray * limitations under the License. 1518e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray */ 1618e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray 1718e6873c469b48aaed22148451523479eece98e3Nicolas Geoffrayimport java.lang.reflect.Method; 1818e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray 1918e6873c469b48aaed22148451523479eece98e3Nicolas Geoffraypublic class Main { 2018e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray public static void main(String[] args) throws Exception { 2118e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray // Workaround for b/18051191. 2218e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray System.out.println("Enter"); 2318e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray Class<?> c = Class.forName("DCE"); 2418e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray Method m = c.getMethod("method", int[].class); 2518e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray int[] array = new int[7]; 2618e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray Object[] arguments = { array }; 2718e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray Object result = m.invoke(null, arguments); 2818e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray if (result != null) { 2918e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray throw new Error("Expected null, got " + result); 3018e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray } 3118e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray } 3218e6873c469b48aaed22148451523479eece98e3Nicolas Geoffray} 33