1e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray/* 2e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * Copyright (C) 2015 The Android Open Source Project 3e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * 4e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * Licensed under the Apache License, Version 2.0 (the "License"); 5e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * you may not use this file except in compliance with the License. 6e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * You may obtain a copy of the License at 7e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * 8e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * http://www.apache.org/licenses/LICENSE-2.0 9e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * 10e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * Unless required by applicable law or agreed to in writing, software 11e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * distributed under the License is distributed on an "AS IS" BASIS, 12e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * See the License for the specific language governing permissions and 14e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray * limitations under the License. 15e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray */ 16e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 17e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffrayimport java.lang.reflect.Method; 18e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 19e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffraypublic class Main { 20e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 21e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray // Workaround for b/18051191. 22e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray class InnerClass {} 23e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 24e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray public static void main(String[] args) throws Exception { 25031768a340634e2dbdec1aebb2bb3fe509b2f1f6Mathieu Chartier System.loadLibrary(args[0]); 26031768a340634e2dbdec1aebb2bb3fe509b2f1f6Mathieu Chartier 27e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray Class<?> c = Class.forName("PhiLiveness"); 28e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray Method m = c.getMethod("mergeOk", boolean.class, byte.class); 29e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m.invoke(null, new Boolean(true), new Byte((byte)2)); 30e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 31e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m = c.getMethod("mergeNotOk", boolean.class, float.class); 32e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m.invoke(null, new Boolean(true), new Float(4.0f)); 33e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 34e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m = c.getMethod("mergeReferences", Main.class); 35e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m.invoke(null, new Main()); 36e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 37e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m = c.getMethod("phiEquivalent"); 38e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m.invoke(null); 39e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray 40e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m = c.getMethod("phiAllEquivalents", Main.class); 41e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray m.invoke(null, new Main()); 42e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray } 43e0fe7ae36180863e45cbb9d1e6e9c30b1b1a949cNicolas Geoffray} 44