Package org.jruby.anno

Examples of org.jruby.anno.TypePopulator$DefaultTypePopulator


        }
    }
   
    public void defineAnnotatedMethodsIndividually(Class clazz) {
        String x = clazz.getSimpleName();
        TypePopulator populator = null;
       
        if (RubyInstanceConfig.FULL_TRACE_ENABLED) {
            // we need full traces, use default (slow) populator
            if (DEBUG) System.out.println("trace mode, using default populator");
            populator = TypePopulator.DEFAULT;
        } else {
            try {
                String qualifiedName = "org.jruby.gen." + clazz.getCanonicalName().replace('.', '$');

                if (DEBUG) System.out.println("looking for " + qualifiedName + "$Populator");

                Class populatorClass = Class.forName(qualifiedName + "$Populator");
                populator = (TypePopulator)populatorClass.newInstance();
            } catch (Throwable t) {
                if (DEBUG) System.out.println("Could not find it, using default populator");
                populator = TypePopulator.DEFAULT;
            }
        }
       
        populator.populate(this, clazz);
    }
View Full Code Here


            return staticAnnotatedMethods1_9;
        }
    }
   
    public void defineAnnotatedMethodsIndividually(Class clazz) {
        TypePopulator populator;
       
        if (RubyInstanceConfig.FULL_TRACE_ENABLED || RubyInstanceConfig.REFLECTED_HANDLES) {
            // we want reflected invokers or need full traces, use default (slow) populator
            if (DEBUG) System.out.println("trace mode, using default populator");
            populator = TypePopulator.DEFAULT;
        } else {
            try {
                String qualifiedName = "org.jruby.gen." + clazz.getCanonicalName().replace('.', '$');

                if (DEBUG) System.out.println("looking for " + qualifiedName + "$Populator");

                Class populatorClass = Class.forName(qualifiedName + "$Populator");
                populator = (TypePopulator)populatorClass.newInstance();
            } catch (Throwable t) {
                if (DEBUG) System.out.println("Could not find it, using default populator");
                populator = TypePopulator.DEFAULT;
            }
        }
       
        populator.populate(this, clazz);
    }
View Full Code Here

            return staticAnnotatedMethods2_0;
        }
    }
   
    public void defineAnnotatedMethodsIndividually(Class clazz) {
        TypePopulator populator;
       
        if (RubyInstanceConfig.FULL_TRACE_ENABLED || RubyInstanceConfig.REFLECTED_HANDLES) {
            // we want reflected invokers or need full traces, use default (slow) populator
            if (DEBUG) LOG.debug("trace mode, using default populator");
            populator = TypePopulator.DEFAULT;
        } else {
            try {
                String qualifiedName = "org.jruby.gen." + clazz.getCanonicalName().replace('.', '$');

                if (DEBUG) LOG.debug("looking for " + qualifiedName + AnnotationBinder.POPULATOR_SUFFIX);

                Class populatorClass = Class.forName(qualifiedName + AnnotationBinder.POPULATOR_SUFFIX);
                populator = (TypePopulator)populatorClass.newInstance();
            } catch (Throwable t) {
                if (DEBUG) LOG.debug("Could not find it, using default populator");
                populator = TypePopulator.DEFAULT;
            }
        }
       
        populator.populate(this, clazz);
    }
View Full Code Here

            return staticAnnotatedMethods;
        }
    }
   
    public void defineAnnotatedMethodsIndividually(Class clazz) {
        TypePopulator populator;
       
        if (RubyInstanceConfig.FULL_TRACE_ENABLED || RubyInstanceConfig.REFLECTED_HANDLES) {
            // we want reflected invokers or need full traces, use default (slow) populator
            if (DEBUG) LOG.info("trace mode, using default populator");
            populator = TypePopulator.DEFAULT;
        } else {
            try {
                String qualifiedName = "org.jruby.gen." + clazz.getCanonicalName().replace('.', '$');

                if (DEBUG) LOG.info("looking for " + qualifiedName + AnnotationBinder.POPULATOR_SUFFIX);

                Class populatorClass = Class.forName(qualifiedName + AnnotationBinder.POPULATOR_SUFFIX);
                populator = (TypePopulator)populatorClass.newInstance();
            } catch (Throwable t) {
                if (DEBUG) LOG.info("Could not find it, using default populator");
                populator = TypePopulator.DEFAULT;
            }
        }
       
        populator.populate(this, clazz);
    }
View Full Code Here

TOP

Related Classes of org.jruby.anno.TypePopulator$DefaultTypePopulator

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.