Package org.jruby.java.invokers

Examples of org.jruby.java.invokers.StaticFieldGetter


        StaticFieldGetterInstaller(String name, Field field) {
            super(name,STATIC_FIELD,field);
        }
        void install(RubyModule proxy) {
            if (Modifier.isPublic(field.getModifiers())) {
                proxy.getSingletonClass().addMethod(name, new StaticFieldGetter(name, proxy, field));
            }
        }
View Full Code Here


        StaticFieldGetterInstaller(String name, Field field) {
            super(name,STATIC_FIELD,field);
        }
        void install(RubyModule proxy) {
            if (Modifier.isPublic(field.getModifiers())) {
                proxy.getSingletonClass().addMethod(name, new StaticFieldGetter(name, proxy, field));
            }
        }
View Full Code Here

                }
               
                String asName = entry.getValue();

                if (Modifier.isStatic(field.getModifiers())) {
                    if (asReader) module.getSingletonClass().addMethod(asName, new StaticFieldGetter(key, module, field));
                    if (asWriter) {
                        if (isFinal) throw context.getRuntime().newSecurityError("Cannot change final field '" + field.getName() + "'");
                        module.getSingletonClass().addMethod(asName + "=", new StaticFieldSetter(key, module, field));
                    }
                } else {
View Full Code Here

        StaticFieldGetterInstaller(String name, Field field) {
            super(name,STATIC_FIELD,field);
        }
        void install(RubyModule proxy) {
            if (Modifier.isPublic(field.getModifiers())) {
                proxy.getSingletonClass().addMethod(name, new StaticFieldGetter(name, proxy, field));
            }
        }
View Full Code Here

                }
               
                String asName = entry.getValue();

                if (Modifier.isStatic(field.getModifiers())) {
                    if (asReader) module.getSingletonClass().addMethod(asName, new StaticFieldGetter(key, module, field));
                    if (asWriter) {
                        if (isFinal) {
                            throw context.runtime.newSecurityError("Cannot change final field '" + field.getName() + "'");
                        }
                        module.getSingletonClass().addMethod(asName + "=", new StaticFieldSetter(key, module, field));
View Full Code Here

        StaticFieldGetterInstaller(String name, Field field) {
            super(name,STATIC_FIELD,field);
        }
        void install(RubyModule proxy) {
            if (Modifier.isPublic(field.getModifiers())) {
                proxy.getSingletonClass().addMethod(name, new StaticFieldGetter(name, proxy, field));
            }
        }
View Full Code Here

                }
               
                String asName = entry.getValue();

                if (Modifier.isStatic(field.getModifiers())) {
                    if (asReader) module.getSingletonClass().addMethod(asName, new StaticFieldGetter(key, module, field));
                    if (asWriter) {
                        if (isFinal) {
                            throw context.runtime.newSecurityError("Cannot change final field '" + field.getName() + "'");
                        }
                        module.getSingletonClass().addMethod(asName + "=", new StaticFieldSetter(key, module, field));
View Full Code Here

TOP

Related Classes of org.jruby.java.invokers.StaticFieldGetter

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.