Examples of JiapiField


Examples of alt.jiapi.reflect.JiapiField

        InstructionFactory factory =
            il.getDeclaringMethod().getInstructionFactory();

        JiapiClass jc = getCurrentClass();

        JiapiField field = null;
        try {
            field = jc.getDeclaredField(fieldName);
        }
        catch (NoSuchFieldException e) {
            throw new JiapiRuntimeException("No such field: " + e.getMessage());
        }

        // Get the initialized value from Runtime.
        il.add(factory.pushConstant(fieldName));
        il.add(factory.invoke(getFieldValue));
       
        // Cast the field.
        il.add(factory.cast(field.getTypeName()));

        // Set the field.
        il.add(factory.setField(field));

        forward(il);
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

        InstructionList il = jm.getInstructionList();
        InstructionFactory factory = il.getInstructionFactory();
        JiapiClass fep = getEventProducer();
        JiapiMethod fieldGet = null;
        JiapiMethod fieldSet = null;
        JiapiField jiapiField = getEventProducerField();

        try {
            fieldGet =
                fep.getDeclaredMethod("fieldGet",
                                      new String[] { "java.lang.Object",
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

        InstructionList il = jm.getInstructionList();
        InstructionFactory factory = il.getInstructionFactory();
        JiapiClass mep = getEventProducer();
        JiapiMethod methodEntered = null;
        JiapiMethod methodExited = null;
        JiapiField jiapiField = getEventProducerField();

        // a flag, that tells whether or not InstructionList being
        // processed is in a static method.
        boolean isStatic = Modifier.isStatic(il.getDeclaringMethod().getModifiers());
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

        if (isDynamic) {
            log.debug("Hook is dynamic");
            // Obtain a field, that holds a reference to the method
            // to be called.
            JiapiField field = null;
            try {
                field = clazz.getDeclaredField(jiapiFieldName);
            }
            catch (NoSuchFieldException nsfe) {
                throw new JiapiRuntimeException("No such field: " + nsfe.getMessage());
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

            if (ins.getOpcode() != Opcodes.INVOKESTATIC &&
                ins.getOpcode() != Opcodes.INVOKEVIRTUAL) {
                continue;
            }

            JiapiField interceptor = getEventProducerField();
       
//              InstructionList nList = il.createEmptyList();
            InstructionList nList = new InstructionList();

View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

        }
    }

    public void instrument(JiapiMethod jm) {
        JiapiClass clazz = jm.getDeclaringClass();
        JiapiField interceptor = getEventProducerField();
        InstructionList il = jm.getInstructionList();
        InstructionFactory factory = il.getInstructionFactory();

        HotSpotLocator hsl =
            new HotSpotLocator(il, new byte[]{Opcodes.GETSTATIC,
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField


    private boolean isPublicField(FieldAccess fa) {
        try {
            JiapiClass jc = new Loader().loadClass(fa.getClassName());
            JiapiField jf = jc.getField(fa.getName());

            return Modifier.isPublic(jf.getModifiers());
        }
        catch(Exception e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField

            e.printStackTrace();
        }
    }

    public void instrument(JiapiMethod jm) {
        JiapiField interceptor = getEventProducerField();
        InstructionList il = jm.getInstructionList();
        InstructionFactory factory = il.getInstructionFactory();

        HotSpotLocator hsl =
            new HotSpotLocator(il,
View Full Code Here

Examples of alt.jiapi.reflect.JiapiField


    private boolean isPublicField(FieldAccess fa) {
        try {
            JiapiClass jc = new Loader().loadClass(fa.getClassName());
            JiapiField jf = jc.getField(fa.getName());

            return Modifier.isPublic(jf.getModifiers());
        }
        catch(Exception e) {
            e.printStackTrace();
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.