Examples of BaseClassData


Examples of org.fakereplace.data.BaseClassData

            }
            file.addMethod(virtMethod);
        } catch (DuplicateMemberException e) {
            e.printStackTrace();
        }
        BaseClassData data = builder.getBaseData();

        Set<MethodData> methods = new HashSet<MethodData>();

        methods.addAll(data.getMethods());

        ListIterator<?> it = file.getMethods().listIterator();

        // now we iterator through all methods and constructors and compare new
        // and old. in the process we modify the new class so that is's signature
View Full Code Here

Examples of org.fakereplace.data.BaseClassData

        return new ReplacementResult(ret, classesToReload);

    }

    public static void modifyReloadedClass(ClassFile file, ClassLoader loader, Class<?> oldClass, Set<Class<?>> classToReload) {
        BaseClassData b = ClassDataStore.instance().getBaseClassData(loader, Descriptor.toJvmName(file.getName()));
        if (b == null) {
            throw new RuntimeException("Could not find BaseClassData for " + file.getName());
        }

        if (!file.getSuperclass().equals(b.getSuperClassName())) {
            System.out.println("Superclass changed from " + b.getSuperClassName() + " to " + file.getSuperclass() + " in class " + file.getName());
        }

        ClassDataBuilder builder = new ClassDataBuilder(b);
        AnnotationReplacer.processAnnotations(file, oldClass);
        FieldReplacer.handleFieldReplacement(file, loader, oldClass, builder);
View Full Code Here

Examples of org.fakereplace.data.BaseClassData

public class FieldReplacer {

    public static void handleFieldReplacement(ClassFile file, ClassLoader loader, Class<?> oldClass, ClassDataBuilder builder) {

        BaseClassData data = builder.getBaseData();

        Set<FieldData> fields = new HashSet<FieldData>();
        fields.addAll(data.getFields());

        ListIterator<?> it = file.getFields().listIterator();

        int noAddedFields = 0;
        List<AddedFieldData> addedFields = new ArrayList<AddedFieldData>();
View Full Code Here

Examples of org.fakereplace.data.BaseClassData

                        addConstructorForInstrumentation(file);
                        addStaticConstructorForInstrumentation(file);
                    }
                }

                BaseClassData baseData = new BaseClassData(file, loader, replaceable);
                ClassDataStore.instance().saveClassData(loader, baseData.getInternalName(), baseData);
            }
            // SerialVersionUIDChecker.testReflectionInfo(loader, file.getName(),
            // file.getSuperclass(), classfileBuffer);
            return modified;
        } finally {
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.