Package javassist.expr

Examples of javassist.expr.ExprEditor


            // patch caller side of defineClass0
            // pre-call
            // byte[] besee =
            // com.gnilux.besee.hook.impl.ClassPreProcessorHelper.defineClass0Pre(this, $$);
            // <call> c = defineClass0(name, besee, 0, besee.length, protectionDomain);
            ExprEditor defineClass0Pre = new ExprEditor() {
                public void edit(MethodCall m) throws CannotCompileException {
                    if ("defineClass0".equals(m.getMethodName())) {
                        int argsCount = 5;

                        // For SUN VM, argCount = 5: name, byte[], int, int, ProtectionDomain
View Full Code Here


            final CtClass ctClass = klass.getCtClass();
            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.CALL, null, classInfo), ctClass)) {
                continue;
            }
            ctClass.instrument(new ExprEditor() {
                public void edit(NewExpr newExpr) throws CannotCompileException {
                    try {
                        CtBehavior where = null;
                        try {
                            where = newExpr.where();
View Full Code Here

            final CtClass ctClass = klass.getCtClass();
            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.CALL, null, classInfo), ctClass)) {
                continue;
            }
            ctClass.instrument(new ExprEditor() {
                public void edit(MethodCall methodCall) throws CannotCompileException {
                    // AW-228, super.callSomething(..) is not a valid join point
                    if (methodCall.isSuper()) {
                        return;
                    }
View Full Code Here

            final ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(ctClass, new ExpressionContext(PointcutType.SET, classInfo, classInfo), definition)
                && classFilter(ctClass, new ExpressionContext(PointcutType.GET, classInfo, classInfo), definition)) {
                continue;
            }
            ctClass.instrument(new ExprEditor() {
                public void edit(FieldAccess fieldAccess) throws CannotCompileException {
                    try {
                        CtBehavior where = null;
                        try {
                            where = fieldAccess.where();
View Full Code Here

            final CtClass ctClass = klass.getCtClass();
            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.HANDLER, null, classInfo), ctClass)) {
                continue;
            }
            ctClass.instrument(new ExprEditor() {
                public void edit(Handler handlerExpr) throws CannotCompileException {
                    try {
                        CtClass exceptionClass = null;
                        try {
                            exceptionClass = handlerExpr.getType();
View Full Code Here

            // patch caller side of defineClass0
            // pre-call
            // byte[] besee = com.gnilux.besee.hook.impl.ClassPreProcessorHelper.defineClass0Pre(this, $$);
            // <call> c = defineClass0(name, besee, 0, besee.length, protectionDomain);
            ExprEditor defineClass0Pre = new ExprEditor() {
                public void edit(MethodCall m) throws CannotCompileException {
                    if ("defineClass0".equals(m.getMethodName())) {
                        int argsCount = 5;

                        // For SUN VM, argCount = 5: name, byte[], int, int, ProtectionDomain
View Full Code Here

            final CtClass ctClass = klass.getCtClass();
            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.CALL, null, classInfo), ctClass)) {
                return;
            }
            ctClass.instrument(new ExprEditor() {
                public void edit(MethodCall methodCall) throws CannotCompileException {
                    try {
                        CtBehavior where = null;
                        try {
                            where = methodCall.where();
View Full Code Here

            if (classFilter(ctClass, new ExpressionContext(PointcutType.SET, classInfo, null), definition)
                && classFilter(ctClass, new ExpressionContext(PointcutType.GET, classInfo, null), definition)) {
                continue;
            }
            ctClass.instrument(
                    new ExprEditor() {
                        public void edit(FieldAccess fieldAccess) throws CannotCompileException {
                            try {
                                CtBehavior where = null;
                                try {
                                    where = fieldAccess.where();
View Full Code Here

            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.CALL, classInfo, classInfo), ctClass)) {
                return;
            }
            ctClass.instrument(
                    new ExprEditor() {
                        public void edit(MethodCall methodCall) throws CannotCompileException {
                            try {
                                CtBehavior where = null;
                                try {
                                    where = methodCall.where();
View Full Code Here

            ClassInfo classInfo = JavassistClassInfo.getClassInfo(ctClass, context.getLoader());
            if (classFilter(definition, new ExpressionContext(PointcutType.HANDLER, classInfo, classInfo), ctClass)) {
                continue;
            }
            ctClass.instrument(
                    new ExprEditor() {
                        public void edit(Handler handlerExpr) throws CannotCompileException {
                            try {
                                CtClass exceptionClass = null;
                                try {
                                    exceptionClass = handlerExpr.getType();
View Full Code Here

TOP

Related Classes of javassist.expr.ExprEditor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.