зеркало из https://github.com/mozilla/pjs.git
Родитель
8ca2e911ed
Коммит
8b203fc2d3
|
@ -1,39 +0,0 @@
|
|||
#
|
||||
# The contents of this file are subject to the Mozilla Public
|
||||
# License Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License. You may obtain a copy of
|
||||
# the License at http://www.mozilla.org/MPL/
|
||||
#
|
||||
# Software distributed under the License is distributed on an "AS
|
||||
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
|
||||
# implied. See the License for the specific language governing
|
||||
# rights and limitations under the License.
|
||||
#
|
||||
# The Original Code is mozilla.org code.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Sun Microsystems,
|
||||
# Inc. Portions created by Sun are
|
||||
# Copyright (C) 1999 Sun Microsystems, Inc. All
|
||||
# Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Igor Kushnirskiy <idk@eng.sun.com>
|
||||
#
|
||||
|
||||
IGNORE_MANIFEST=1
|
||||
DEPTH = ..\..\..\..
|
||||
|
||||
JAVA_OR_NSJVM=1
|
||||
NO_CAFE=1
|
||||
|
||||
include <$(DEPTH)\config\config.mak>
|
||||
|
||||
JAR_PLUGLET_CLASSES = \
|
||||
org\mozilla\xpcom \
|
||||
$(NULL)
|
||||
|
||||
JDIRS = $(JAR_PLUGLET_CLASSES)
|
||||
JAVAC_PROG=$(JDKHOME)\bin\javac
|
||||
JAVAC_FLAGS=-classpath "$(CLASSPATH);$(JAVA_DESTPATH)" -d "$(JAVA_DESTPATH)"
|
||||
|
||||
include <$(DEPTH)\config\rules.mak>
|
|
@ -71,24 +71,22 @@ public class InterfaceRegistry {
|
|||
String[] methodNames = Utilities.getInterfaceMethodNames((String)iidStr);
|
||||
if (methodNames != null) {
|
||||
Method[] rmethods = new Method[methodNames.length];
|
||||
int i = methodNames.length - 1;
|
||||
Class[] ifaces = new Class[]{cl};
|
||||
// recursively get all parent interface methods
|
||||
Hashtable mhash = new Hashtable(methodNames.length);
|
||||
// recursively get all parent interface methods
|
||||
do {
|
||||
Method[] methods = ifaces[0].getDeclaredMethods();
|
||||
int j = methods.length - 1;
|
||||
while (i >= 0 && j >=0) {
|
||||
if (methodNames[i].equals(methods[j].getName())) {
|
||||
rmethods[i--] = methods[j--];
|
||||
} else {
|
||||
// put null for notxpcom & noscript methods
|
||||
rmethods[i--] = null;
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < methods.length; i++) {
|
||||
mhash.put(methods[i].getName(), methods[i]);
|
||||
}
|
||||
ifaces = ifaces[0].getInterfaces();
|
||||
// check for single inheritance (xpcom)
|
||||
} while (ifaces.length == 1);
|
||||
|
||||
for (int j = methodNames.length - 1; j >= 0; j--) {
|
||||
rmethods[j] = (Method)mhash.get(methodNames[j]);
|
||||
}
|
||||
|
||||
interfaces.put(iid, cl);
|
||||
iMethods.put(iid, new MethodArray(rmethods));
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче