Examples of BCELClassMetaData


Examples of org.jpox.enhancer.bcel.metadata.BCELClassMetaData

                    throw new NullPointerException(message);
                }

                ClassGen cg = BCELUtils.getClassByFieldByName(field.getName(constantPoolGen), fieldJavaClass);
                BCELFieldPropertyMetaData fieldConfig = null;
                BCELClassMetaData jdoConfigClass = ((BCELClassMetaData) cmd);

                // the accessing class is not this
                if (!cg.getClassName().equals(newClass.getClassName()))
                {
                    jdoConfigClass = (BCELClassMetaData) cmd.getPackageMetaData().getFileMetaData().getMetaDataManager().getMetaDataForClass(
                        cg.getClassName(), clr);
                }
                if( jdoConfigClass != null )
                {
                    AbstractMemberMetaData apmd = jdoConfigClass.findField(f);

                    if (apmd == null)
                    {
                        //check if a property(getter,setter) exists with this field name
                        if( jdoConfigClass.findProperty(f)==null )
                        {
                            //no fields netiher properties in the class, so something is wrong
                            String message = LOCALISER.msg("Enhancer.FieldConfigIsNullError", className + "." + f.getName());
                            JPOXLogger.ENHANCER.fatal(message);
                            throw new RuntimeException(message);
View Full Code Here

Examples of org.jpox.enhancer.bcel.metadata.BCELClassMetaData

        // define the generated class in the classloader so we populate the metadata
        EnhancerClassLoader loader = new EnhancerClassLoader();
        loader.defineClass(fullClassName, getBytes(), clr);

        // Create MetaData for the implementation
        ClassMetaData implementationCmd = new BCELClassMetaData((InterfaceMetaData)inputCmd, className, javaClass);
        ClassLoaderResolver genclr = new JDOClassLoaderResolver(loader);
        implementationCmd.populate(genclr, null);
        implementationCmd.initialise();

        //enhance the class
        ClassEnhancer gen = new BCELClassEnhancer(implementationCmd, genclr);
        gen.enhance();
        bytes = gen.getBytes();
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.