mirror of
https://github.com/corda/corda.git
synced 2025-03-15 16:46:12 +00:00
Merge pull request #2 from ReadyTalk/master
Update personal avian to current readytalk/avian
This commit is contained in:
commit
bdcec728f7
63
README.md
63
README.md
@ -59,7 +59,7 @@ Avian can currently target the following platforms:
|
||||
|
||||
* Linux (i386, x86_64, ARM, and 32-bit PowerPC)
|
||||
* Windows (i386 and x86_64)
|
||||
* Mac OS X (i386, x86_64 and 32-bit PowerPC)
|
||||
* Mac OS X (i386 and x86_64)
|
||||
* Apple iOS (i386 and ARM)
|
||||
* FreeBSD (i386, x86_64)
|
||||
|
||||
@ -357,36 +357,74 @@ the following, starting from the Avian directory:
|
||||
cd ..
|
||||
mkdir -p android/system android/external
|
||||
cd android
|
||||
|
||||
git clone https://android.googlesource.com/platform/bionic
|
||||
(cd bionic && \
|
||||
git checkout 84983592ade3ec7d72d082262fb6646849979bfc)
|
||||
|
||||
git clone https://android.googlesource.com/platform/system/core \
|
||||
system/core
|
||||
git clone https://android.googlesource.com/platform/external/expat \
|
||||
external/expat
|
||||
(cd system/core && \
|
||||
git checkout fafcabd0dd4432de3c7f5956edec23f6ed241b56)
|
||||
|
||||
git clone https://android.googlesource.com/platform/external/fdlibm \
|
||||
external/fdlibm
|
||||
(cd external/fdlibm && \
|
||||
git checkout 0da5f683c9ddc9442af3b389b4220e91ccffb320)
|
||||
|
||||
git clone https://android.googlesource.com/platform/external/icu4c \
|
||||
external/icu4c
|
||||
(cd external/icu4c && \
|
||||
git checkout 8fd45e08f1054d80a356ef8aa05659a2ba84707c)
|
||||
|
||||
git clone https://android.googlesource.com/platform/libnativehelper
|
||||
(cd libnativehelper && \
|
||||
git checkout cf5ac0ec696fce7fac6b324ec7d4d6da217e501c)
|
||||
|
||||
git clone https://android.googlesource.com/platform/external/openssl \
|
||||
external/openssl
|
||||
(cd external/openssl && \
|
||||
git checkout 7b972f1aa23172c4430ada7f3236fa1fd9b31756)
|
||||
|
||||
git clone https://android.googlesource.com/platform/external/zlib \
|
||||
external/zlib
|
||||
(cd external/zlib && \
|
||||
git checkout 15b6223aa57a347ce113729253802cb2fdeb4ad0)
|
||||
|
||||
git clone git://git.openssl.org/openssl.git openssl-upstream
|
||||
(cd openssl-upstream && \
|
||||
git checkout OpenSSL_1_0_1e)
|
||||
|
||||
git clone https://github.com/dicej/android-libcore64 libcore
|
||||
|
||||
curl -Of http://readytalk.github.io/avian/expat-2.1.0.tar.gz
|
||||
(cd external && tar xzf ../expat-2.1.0.tar.gz && mv expat-2.1.0 expat)
|
||||
|
||||
(cd external/expat && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure \
|
||||
--enable-static && make)
|
||||
|
||||
(cd external/fdlibm && (mv makefile.in Makefile.in || true) \
|
||||
&& CFLAGS=-fPIC bash configure && make)
|
||||
|
||||
(cd external/icu4c && CFLAGS=-fPIC CXXFLAGS=-fPIC ./configure \
|
||||
--enable-static && make)
|
||||
|
||||
NB: use 'CC="gcc -fPIC" ./Configure darwin64-x86_64-cc' when building
|
||||
for x86_64 OS X instead of 'CC="gcc -fPIC" ./config':
|
||||
|
||||
(cd openssl-upstream && git checkout OpenSSL_1_0_1e \
|
||||
&& (for x in ../external/openssl/patches/*.patch; \
|
||||
do patch -p1 < $x; done) \
|
||||
(cd openssl-upstream \
|
||||
&& (for x in \
|
||||
progs \
|
||||
handshake_cutthrough \
|
||||
jsse \
|
||||
channelid \
|
||||
eng_dyn_dirs \
|
||||
fix_clang_build \
|
||||
tls12_digests \
|
||||
alpn; \
|
||||
do patch -p1 < ../external/openssl/patches/$x.patch; done) \
|
||||
&& CC="gcc -fPIC" ./config && make)
|
||||
|
||||
cd ../avian
|
||||
make android=$(pwd)/../android test
|
||||
|
||||
@ -403,6 +441,10 @@ against OpenSSL 1.0.1e, so that's the tag we check out, but this may
|
||||
change in the future when the Android fork rebases against a new
|
||||
OpenSSL version.
|
||||
|
||||
Finally, we specify specific commit hashes for each repository which
|
||||
are known to work. Later versions may also work, but have not been
|
||||
tested.
|
||||
|
||||
|
||||
Installing
|
||||
----------
|
||||
@ -468,7 +510,8 @@ setting the boot classpath to "[bootJar]".
|
||||
|
||||
$ cat >embedded-jar-main.cpp <<EOF
|
||||
#include "stdint.h"
|
||||
#include "jni.h"
|
||||
#include "jni.h"
|
||||
#include "stdlib.h"
|
||||
|
||||
#if (defined __MINGW32__) || (defined _MSC_VER)
|
||||
# define EXPORT __declspec(dllexport)
|
||||
@ -496,6 +539,8 @@ setting the boot classpath to "[bootJar]".
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
extern "C" void __cxa_pure_virtual(void) { abort(); }
|
||||
|
||||
int
|
||||
main(int ac, const char** av)
|
||||
@ -557,7 +602,7 @@ __on Mac OS X:__
|
||||
|
||||
__on Windows:__
|
||||
|
||||
$ g++ -I$JAVA_HOME/include -I$JAVA_HOME/include/win32 \
|
||||
$ g++ -fno-exceptions -fno-rtti -I"$JAVA_HOME/include" -I"$JAVA_HOME/include/win32" \
|
||||
-D_JNI_IMPLEMENTATION_ -c embedded-jar-main.cpp -o main.o
|
||||
|
||||
__5.__ Link the objects produced above to produce the final
|
||||
@ -577,7 +622,7 @@ __on Windows:__
|
||||
|
||||
$ dlltool -z hello.def *.o
|
||||
$ dlltool -d hello.def -e hello.exp
|
||||
$ g++ hello.exp *.o -L../../win32/lib -lmingwthrd -lm -lz -lws2_32 \
|
||||
$ gcc hello.exp *.o -L../../win32/lib -lmingwthrd -lm -lz -lws2_32 \
|
||||
-mwindows -mconsole -o hello.exe
|
||||
$ strip --strip-all hello.exe
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
@ -406,6 +406,41 @@ public class Classes {
|
||||
return -1;
|
||||
}
|
||||
|
||||
public static int countMethods(VMClass vmClass, boolean publicOnly) {
|
||||
int count = 0;
|
||||
if (vmClass.methodTable != null) {
|
||||
for (int i = 0; i < vmClass.methodTable.length; ++i) {
|
||||
if (((! publicOnly)
|
||||
|| ((vmClass.methodTable[i].flags & Modifier.PUBLIC))
|
||||
!= 0)
|
||||
&& (! toString(vmClass.methodTable[i].name).startsWith("<")))
|
||||
{
|
||||
++ count;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public static Method[] getMethods(VMClass vmClass, boolean publicOnly) {
|
||||
Method[] array = new Method[countMethods(vmClass, publicOnly)];
|
||||
if (vmClass.methodTable != null) {
|
||||
Classes.link(vmClass);
|
||||
|
||||
int ai = 0;
|
||||
for (int i = 0; i < vmClass.methodTable.length; ++i) {
|
||||
if ((((vmClass.methodTable[i].flags & Modifier.PUBLIC) != 0)
|
||||
|| (! publicOnly))
|
||||
&& ! toString(vmClass.methodTable[i].name).startsWith("<"))
|
||||
{
|
||||
array[ai++] = makeMethod(SystemClassLoader.getClass(vmClass), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array;
|
||||
}
|
||||
|
||||
public static Annotation getAnnotation(ClassLoader loader, Object[] a) {
|
||||
if (a[0] == null) {
|
||||
a[0] = Proxy.newProxyInstance
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
@ -13,4 +13,5 @@ package avian;
|
||||
public class MethodAddendum extends Addendum {
|
||||
public Object exceptionTable;
|
||||
public Object annotationDefault;
|
||||
public Object parameterAnnotationTable;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
@ -20,6 +20,8 @@
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
# define UNICODE
|
||||
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
# include <direct.h>
|
||||
@ -126,8 +128,12 @@ OPEN(string_t path, int mask, int mode)
|
||||
inline bool
|
||||
exists(string_t path)
|
||||
{
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
return GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES;
|
||||
#else
|
||||
STRUCT_STAT s;
|
||||
return STAT(path, &s) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
inline int
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
@ -952,6 +952,12 @@ Java_java_lang_Math_ceil(JNIEnv*, jclass, jdouble val)
|
||||
return ceil(val);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jdouble JNICALL
|
||||
Java_java_lang_Math_exp(JNIEnv*, jclass, jdouble exp)
|
||||
{
|
||||
return pow(M_E, exp);
|
||||
}
|
||||
|
||||
extern "C" JNIEXPORT jint JNICALL
|
||||
Java_java_lang_Double_fillBufferWithDouble(JNIEnv* e, jclass, jdouble val,
|
||||
jbyteArray buffer, jint bufferSize) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2010, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
@ -366,54 +366,12 @@ public final class Class <T> implements Type, AnnotatedElement {
|
||||
return fields.toArray(new Field[fields.size()]);
|
||||
}
|
||||
|
||||
private int countMethods(boolean publicOnly) {
|
||||
int count = 0;
|
||||
if (vmClass.methodTable != null) {
|
||||
for (int i = 0; i < vmClass.methodTable.length; ++i) {
|
||||
if (((! publicOnly)
|
||||
|| ((vmClass.methodTable[i].flags & Modifier.PUBLIC))
|
||||
!= 0)
|
||||
&& (! Method.getName(vmClass.methodTable[i]).startsWith("<")))
|
||||
{
|
||||
++ count;
|
||||
}
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
public Method[] getDeclaredMethods() {
|
||||
Method[] array = new Method[countMethods(false)];
|
||||
if (vmClass.methodTable != null) {
|
||||
Classes.link(vmClass);
|
||||
|
||||
int ai = 0;
|
||||
for (int i = 0; i < vmClass.methodTable.length; ++i) {
|
||||
if (! Method.getName(vmClass.methodTable[i]).startsWith("<")) {
|
||||
array[ai++] = new Method(vmClass.methodTable[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array;
|
||||
return Classes.getMethods(vmClass, false);
|
||||
}
|
||||
|
||||
public Method[] getMethods() {
|
||||
Method[] array = new Method[countMethods(true)];
|
||||
if (vmClass.methodTable != null) {
|
||||
Classes.link(vmClass);
|
||||
|
||||
int index = 0;
|
||||
for (int i = 0; i < vmClass.methodTable.length; ++i) {
|
||||
if (((vmClass.methodTable[i].flags & Modifier.PUBLIC) != 0)
|
||||
&& (! Method.getName(vmClass.methodTable[i]).startsWith("<")))
|
||||
{
|
||||
array[index++] = new Method(vmClass.methodTable[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return array;
|
||||
return Classes.getMethods(vmClass, true);
|
||||
}
|
||||
|
||||
public Class[] getInterfaces() {
|
||||
@ -591,7 +549,7 @@ public final class Class <T> implements Type, AnnotatedElement {
|
||||
}
|
||||
|
||||
public Annotation[] getAnnotations() {
|
||||
Annotation[] array = new Annotation[countMethods(true)];
|
||||
Annotation[] array = new Annotation[countAnnotations()];
|
||||
int i = 0;
|
||||
for (VMClass c = vmClass; c != null; c = c.super_) {
|
||||
if (c.addendum != null && c.addendum.annotationTable != null) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2012, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2009, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2008-2011, Avian Contributors
|
||||
/* Copyright (c) 2008-2013, Avian Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted, provided
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user