bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift/*
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift *
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * This code is free software; you can redistribute it and/or modify it
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * under the terms of the GNU General Public License version 2 only, as
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * published by the Free Software Foundation.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift *
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * This code is distributed in the hope that it will be useful, but WITHOUT
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * version 2 for more details (a copy is included in the LICENSE file that
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * accompanied this code).
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift *
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * You should have received a copy of the GNU General Public License version
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * 2 along with this work; if not, write to the Free Software Foundation,
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift *
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * or visit www.oracle.com if you need additional information or have any
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * questions.
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift */
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift/*
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @test
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @bug 6639645
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @summary Modeling type implementing missing interfaces
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @library ../../../../lib
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @build JavacTestingAbstractProcessor Generator
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @compile -XprintRounds -processor Generator TestMissingInterface.java
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift * @run main TestMissingInterface
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift */
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swiftimport java.util.*;
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swiftpublic class TestMissingInterface implements MissingInterface {
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift public static void main(String... args) {
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift new TestMissingInterface().run();
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift }
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift @Override
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift public void run() {
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift Class<?> c = getClass();
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift System.out.println("class: " + c);
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift System.out.println("superclass: " + c.getSuperclass());
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift System.out.println("generic superclass: " +c.getGenericSuperclass());
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift System.out.println("interfaces: " + Arrays.asList(c.getInterfaces()));
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift System.out.println("generic interfaces: " + Arrays.asList(c.getGenericInterfaces()));
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift }
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift}
bb8874d71cdd8e5288297b9727703437c6dfcfedmatthew_swift