| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
ClassLoader.defineClass for Java > 10
|
| |
|
|
|
|
|
|
|
|
|
| |
Runtime still throws warnings illegal actions even after all that, there's
just no logic to it. We can use Unsafe but don't touch setAccessible. O well
might as well enjoy Unsafe while we still can.
Wrapped the Unsafe and added method cache with varargs method for invoke calls.
Can still do a lot with it but it does what it needs to for now.
|
|
|
|
| |
Yes it is deprecated but seems the right thing to do
|
|
|
|
|
| |
Wont stop you from getting an instance but it makes it more trouble at least.
Also reduce the visibility of the enum method.
|
|
|
|
|
|
|
|
| |
The only thing remotely inforceable is caller class checking. You cannot
bypass an exception with setAccesible. Oracle went and removed
Reflection.getCallerClass() completely in favour of StackWalker. At least
we can share the SecurityManage ClassContext, SecurityActions seems the
appropriate venue for our stack trace peek to support the older versions
|
|
|
|
|
|
|
| |
Java 7 and 8 does support method handles so we can cater for them. When doing
repeated invokes to the same method, keeping a reference to the Method handle
is much faster than reflection. Also the API is cleaner not having to Object[]
args etc. Worth the effort...
|
|
|
|
| |
Remembered that 1.6 won't know about MethodHandles so must use reflection methods for them still.
|
|
|
|
| |
Also do it anonomously so as not to raise the alarms and upset the powers to be.
|
|
|
|
| |
Some whitespace got shunted around a bit too.
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main advantage is that we can do the privileged setAccessible during creation and
then freely invoke via the authorized method handle.
As per the javadocs:
Access checks are applied in the factory methods of Lookup, when a method handle is created.
his is a key difference from the Core Reflection API, since java.lang.reflect.Method.invoke
performs access checking against every caller, on every call.
The performance boost is just a bonus.
|
|
|
|
|
|
| |
Oracle (or maybe it was still Sun) warns that we should prevent from exposing access we gain to
privileged functionality like the unsafe etc. Before Oracle decides to restrict us even more lets
make an effort at least.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following were applied during multiple itterations through the source.
* Parameterize raw types.
* Mark unused members.
* Annotate override and deprecated methods.
* Convert loops to enhance for loop.
* Remove redundant else statements.
* Widening collection type references.
* Optimize code for improved readability.
* Squash compiler warnings.
* Identify smells.
|
| |
|
| |
|
|
|
|
| |
be attached after the JVM starts
|
| |
|
|
|
|
| |
Javassist uses java.lang.invoke.MethodHandles.Lookup to load a class.
|
|
|
|
| |
jigsaw
|
| |
|
|
|
|
| |
declared in an interface. https://github.com/jboss-javassist/javassist/issues/45
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@701 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@700 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@676 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@645 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@637 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@608 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@591 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@588 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@584 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@561 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@528 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@527 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@525 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@524 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@522 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
|
|
| |
their class loader -- fixes JASSIST-104
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@517 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@516 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@508 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|
|
|
|
| |
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@483 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
|