Package bear.session

Examples of bear.session.DynamicVariable$ChangeListener


    private static void throwFrozen(String varName) {
        throw new IllegalStateException("can't assign to " + varName + ": it is frozen");
    }

    public boolean isFrozen(String varName) {
        final DynamicVariable variable = variables.get(varName);
        return isFrozen(variable);
    }
View Full Code Here


        }
        return this;
    }

    public VariablesLayer putConst(String name, Object value) {
        DynamicVariable variable = variables.get(name);

        if(isFrozen(variable)){
            throwFrozen(name);
        }
View Full Code Here

    public <T> DynamicVariable<T> getVariable(Nameable<T> name) {
        return getVariable(name.name());
    }

    public <T> DynamicVariable<T> getVariable(String key) {
        DynamicVariable var = variables.get(key);

        if (var == null && fallbackVariablesLayer != null) {
            var = fallbackVariablesLayer.getVariable(key);
        }
View Full Code Here

            }else{
                stringKey = (String) key;
            }

            if (value instanceof DynamicVariable) {
                DynamicVariable variable = (DynamicVariable) value;


                DynamicVariable oldValue = variables.put(stringKey, variable);
                if(returnOldValues){
                    oldValues.put(stringKey, oldValue);
                }
            }else{
                Object oldValue;
View Full Code Here

                if (!DynamicVariable.class.isAssignableFrom(field.getType())) {
                    continue;
                }

                final DynamicVariable var = (DynamicVariable) field.get(obj);
                Preconditions.checkNotNull(var, field.getName() + " is null!");
                var.setName(shortName(aClass, className, field) + "." + field.getName());

                global.registerVariable(var, field);
            }
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
View Full Code Here

                if (!DynamicVariable.class.isAssignableFrom(field.getType())) {
                    continue;
                }

                final DynamicVariable var = (DynamicVariable) field.get(obj);
                Preconditions.checkNotNull(var, field.getName() + " is null!");
                var.setName(shortName(aClass, className, field) + "." + field.getName());

                global.registerVariable(var, field);
            }
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
View Full Code Here

    private static void throwFrozen(String varName) {
        throw new IllegalStateException("can't assign to " + varName + ": it is frozen");
    }

    public boolean isFrozen(String varName) {
        final DynamicVariable variable = variables.get(varName);
        return isFrozen(variable);
    }
View Full Code Here

        }
        return this;
    }

    public VariablesLayer putConst(String name, Object value) {
        DynamicVariable variable = variables.get(name);

        if(isFrozen(variable)){
            throwFrozen(name);
        }
View Full Code Here

    public <T> DynamicVariable<T> getVariable(Nameable<T> name) {
        return getVariable(name.name());
    }

    public <T> DynamicVariable<T> getVariable(String key) {
        DynamicVariable var = variables.get(key);

        if (var == null && fallbackVariablesLayer != null) {
            var = fallbackVariablesLayer.getVariable(key);
        }
View Full Code Here

            }else{
                stringKey = (String) key;
            }

            if (value instanceof DynamicVariable) {
                DynamicVariable variable = (DynamicVariable) value;


                DynamicVariable oldValue = variables.put(stringKey, variable);
                if(returnOldValues){
                    oldValues.put(stringKey, oldValue);
                }
            }else{
                Object oldValue;
View Full Code Here

TOP

Related Classes of bear.session.DynamicVariable$ChangeListener

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.