Thu, 24 Mar 2016 21:38:15 -0700
8150752: Share Class Data
Reviewed-by: acorn, hseigel, mschoene
kamg@4245 | 1 | /* |
acorn@5786 | 2 | * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
kamg@4245 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
kamg@4245 | 4 | * |
kamg@4245 | 5 | * This code is free software; you can redistribute it and/or modify it |
kamg@4245 | 6 | * under the terms of the GNU General Public License version 2 only, as |
kamg@4245 | 7 | * published by the Free Software Foundation. |
kamg@4245 | 8 | * |
kamg@4245 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
kamg@4245 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
kamg@4245 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
kamg@4245 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
kamg@4245 | 13 | * accompanied this code). |
kamg@4245 | 14 | * |
kamg@4245 | 15 | * You should have received a copy of the GNU General Public License version |
kamg@4245 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
kamg@4245 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
kamg@4245 | 18 | * |
kamg@4245 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
kamg@4245 | 20 | * or visit www.oracle.com if you need additional information or have any |
kamg@4245 | 21 | * questions. |
kamg@4245 | 22 | * |
kamg@4245 | 23 | */ |
kamg@4245 | 24 | |
kamg@4245 | 25 | #ifndef SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP |
kamg@4245 | 26 | #define SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP |
kamg@4245 | 27 | |
kamg@4245 | 28 | #include "runtime/handles.hpp" |
kamg@4245 | 29 | #include "utilities/growableArray.hpp" |
kamg@4245 | 30 | #include "utilities/exceptions.hpp" |
kamg@4245 | 31 | |
kamg@4245 | 32 | class InstanceKlass; |
kamg@4245 | 33 | class Symbol; |
kamg@4245 | 34 | class Method; |
kamg@4245 | 35 | |
kamg@4245 | 36 | class DefaultMethods : AllStatic { |
kamg@4245 | 37 | public: |
kamg@4245 | 38 | |
kamg@4245 | 39 | // Analyzes class and determines which default methods are inherited |
kamg@4245 | 40 | // from interfaces (and has no other implementation). For each method |
kamg@4245 | 41 | // (and each different signature the method could have), create an |
kamg@4245 | 42 | // "overpass" method that is an instance method that redirects to the |
kamg@4245 | 43 | // default method. Overpass methods are added to the methods lists for |
kamg@4245 | 44 | // the class. |
kamg@4245 | 45 | static void generate_default_methods( |
kamg@4245 | 46 | InstanceKlass* klass, GrowableArray<Method*>* mirandas, TRAPS); |
kamg@4245 | 47 | }; |
kamg@4245 | 48 | #endif // SHARE_VM_CLASSFILE_DEFAULTMETHODS_HPP |