kamg@4245: /* acorn@5786: * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. kamg@4245: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. kamg@4245: * kamg@4245: * This code is free software; you can redistribute it and/or modify it kamg@4245: * under the terms of the GNU General Public License version 2 only, as kamg@4245: * published by the Free Software Foundation. kamg@4245: * kamg@4245: * This code is distributed in the hope that it will be useful, but WITHOUT kamg@4245: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or kamg@4245: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License kamg@4245: * version 2 for more details (a copy is included in the LICENSE file that kamg@4245: * accompanied this code). kamg@4245: * kamg@4245: * You should have received a copy of the GNU General Public License version kamg@4245: * 2 along with this work; if not, write to the Free Software Foundation, kamg@4245: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. kamg@4245: * kamg@4245: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA kamg@4245: * or visit www.oracle.com if you need additional information or have any kamg@4245: * questions. kamg@4245: * kamg@4245: */ kamg@4245: kamg@4245: #ifndef SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP kamg@4245: #define SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP kamg@4245: kamg@4245: #include "runtime/handles.hpp" kamg@4245: #include "utilities/growableArray.hpp" kamg@4245: #include "utilities/exceptions.hpp" kamg@4245: kamg@4245: class InstanceKlass; kamg@4245: class Symbol; kamg@4245: class Method; kamg@4245: kamg@4245: class DefaultMethods : AllStatic { kamg@4245: public: kamg@4245: kamg@4245: // Analyzes class and determines which default methods are inherited kamg@4245: // from interfaces (and has no other implementation). For each method kamg@4245: // (and each different signature the method could have), create an kamg@4245: // "overpass" method that is an instance method that redirects to the kamg@4245: // default method. Overpass methods are added to the methods lists for kamg@4245: // the class. kamg@4245: static void generate_default_methods( kamg@4245: InstanceKlass* klass, GrowableArray* mirandas, TRAPS); kamg@4245: }; kamg@4245: #endif // SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP