Examples of withValue()


Examples of com.google.gxp.compiler.reparent.Attribute.withValue()

            if (!parameter.regexMatches(oc)) {
              alertSink.add(new InvalidParameterFailedRegexError(
                                calleeName, name, parameter.getRegex(), oc));
            }
            attr = parameter.hasConstructor()
                ? attr.withValue(new ConstructedConstant(oc, oc.getValue(), callee, parameter))
                : attr.withValue(parameter.getType().parseObjectConstant(name, oc, alertSink));
          }

          attr = attr.withValue(prepareExpressionAsParameterValue(parameter, attr.getValue()));
View Full Code Here

Examples of com.google.gxp.compiler.reparent.Attribute.withValue()

              alertSink.add(new InvalidParameterFailedRegexError(
                                calleeName, name, parameter.getRegex(), oc));
            }
            attr = parameter.hasConstructor()
                ? attr.withValue(new ConstructedConstant(oc, oc.getValue(), callee, parameter))
                : attr.withValue(parameter.getType().parseObjectConstant(name, oc, alertSink));
          }

          attr = attr.withValue(prepareExpressionAsParameterValue(parameter, attr.getValue()));

          final Attribute updatedAttr = visitAttribute(attr);
View Full Code Here

Examples of com.google.gxp.compiler.reparent.Attribute.withValue()

            attr = parameter.hasConstructor()
                ? attr.withValue(new ConstructedConstant(oc, oc.getValue(), callee, parameter))
                : attr.withValue(parameter.getType().parseObjectConstant(name, oc, alertSink));
          }

          attr = attr.withValue(prepareExpressionAsParameterValue(parameter, attr.getValue()));

          final Attribute updatedAttr = visitAttribute(attr);

          parameter.getType().acceptTypeVisitor(new DefaultingTypeVisitor<Void>() {
            protected Void defaultVisitType(Type type) {
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                            Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                            // do not merge objects between global defaults and user defaults (incl. alias defaults)
                            ConfigObject mergedDefaults = aliasDefaults;
                            for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                if (!mergedDefaults.containsKey(pair.getKey())) {
                                    mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                }
                            }
                            ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
                            return objectShell;
                        } catch (InstantiationException | IllegalAccessException | RuntimeException ex) {
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                            throw new ConfigException.WrongType(onlyKeyValue.origin(), onlyKey,
                                                                "OBJECT", onlyKeyValue.valueType().toString());
                        }
                    }
                    ConfigObject fieldValues = (ConfigObject) onlyKeyValue;
                    return fieldValues.withValue(classField, ConfigValueFactory.fromAnyRef(
                            onlyKey, "single key to type from " + root.origin().description()))
                                      .withFallback(aliasDefaults);
                } catch (ClassNotFoundException ignored) {
                }
            }
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                ConfigValue inlinedValue = root.get(matched);
                String primaryField = (String) aliasDefaults.get("_primary").unwrapped();
                ConfigObject fieldValues =  root.toConfig().withValue(primaryField, inlinedValue).root()
                                                        .withoutKey(matched)
                                                        .withFallback(aliasDefaults);
                return fieldValues.withValue(classField, ConfigValueFactory.fromAnyRef(
                        matched, "inlined key to type from " + root.origin().description()));
            }

            // default type
            ConfigValue defaultObject = pluginMap.config().root().get("_default");
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                                Config fieldDefaults = singleKeyInfo.getFieldDefaults();
                                // do not merge objects between global defaults and user defaults (incl. alias defaults)
                                ConfigObject mergedDefaults = aliasDefaults;
                                for (Map.Entry<String, ConfigValue> pair : fieldDefaults.entrySet()) {
                                    if (!mergedDefaults.containsKey(pair.getKey())) {
                                        mergedDefaults = mergedDefaults.withValue(pair.getKey(), pair.getValue());
                                    }
                                }
                                ((ValueCodable) objectShell).fromConfigValue(configValue, mergedDefaults);
                                return objectShell;
                            } catch (InstantiationException | IllegalAccessException | RuntimeException ex) {
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                            throw new ConfigException.WrongType(onlyKeyValue.origin(), onlyKey,
                                                                "OBJECT", onlyKeyValue.valueType().toString());
                        }
                    }
                    ConfigObject fieldValues = (ConfigObject) onlyKeyValue;
                    return fieldValues.withValue(classField, ConfigValueFactory.fromAnyRef(
                            onlyKey, "single key to type from " + root.origin().description()))
                                      .withFallback(aliasDefaults);
                } catch (ClassNotFoundException ignored) {
                }
            }
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                ConfigValue inlinedValue = root.get(matched);
                String primaryField = (String) aliasDefaults.get("_primary").unwrapped();
                ConfigObject fieldValues =  root.toConfig().withValue(primaryField, inlinedValue).root()
                                                        .withoutKey(matched)
                                                        .withFallback(aliasDefaults);
                return fieldValues.withValue(classField, ConfigValueFactory.fromAnyRef(
                        matched, "inlined key to type from " + root.origin().description()));
            }

            // default type
            ConfigValue defaultObject = pluginMap.config().root().get("_default");
View Full Code Here

Examples of com.typesafe.config.ConfigObject.withValue()

                            throw new ConfigException.WrongType(onlyKeyValue.origin(), onlyKey,
                                                                "OBJECT", onlyKeyValue.valueType().toString());
                        }
                    }
                    ConfigObject fieldValues = (ConfigObject) onlyKeyValue;
                    return fieldValues.withValue(classField, ConfigValueFactory.fromAnyRef(
                            onlyKey, "single key to type from " + root.origin().description()))
                                      .withFallback(aliasDefaults);
                } catch (ClassNotFoundException ignored) {
                }
            }
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.