Examples of defaultValue()


Examples of net.sourceforge.javautil.ui.command.annotation.Flag.defaultValue()

          if (fla != null) {
            if (type != boolean.class && type != Boolean.class)
              throw new IllegalArgumentException("Invalid flag definition, can only be used on boolean types");
           
            defs.add(fla.name());
            this.addFlag(fla.name(), fla.value(), fla.defaultValue());
          }
        } else {
          Option opt = options[offset];
          defs.add(opt.name());
          this.addOption(opt.name(), type, opt.desc(), opt.defaultDesc());
View Full Code Here

Examples of org.apache.avro.Schema.Field.defaultValue()

                // Recursively compare the nested field types
                compareTypes(oldField.schema(), newField.schema(), messages, name + "." + fieldName);

                // Check if the default value has been changed
                if(newField.defaultValue() == null) {
                    if(oldField.defaultValue() != null) {
                        messages.add(new Message(Level.WARN,
                                                 "Removed default value for existing field " + name
                                                         + "." + fieldName
                                                         + ". The old default was: "
                                                         + oldField.defaultValue()));
View Full Code Here

Examples of org.apache.camel.PropertyInject.defaultValue()

            do {
                Field[] fields = clazz.getDeclaredFields();
                for (Field field : fields) {
                    PropertyInject propertyInject = field.getAnnotation(PropertyInject.class);
                    if (propertyInject != null && matchContext(propertyInject.context())) {
                        injectFieldProperty(field, propertyInject.value(), propertyInject.defaultValue(), bean, beanName);
                    }

                    EndpointInject endpointInject = field.getAnnotation(EndpointInject.class);
                    if (endpointInject != null && matchContext(endpointInject.context())) {
                        injectField(field, endpointInject.uri(), endpointInject.ref(), endpointInject.property(), bean, beanName);
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

                    throw new IllegalArgumentException(ie.getMessage() + ", position: " + pos + ", line: " + line, ie);
                } catch (Exception e) {
                    throw new IllegalArgumentException("Parsing error detected for field defined at the position: " + pos + ", line: " + line, e);
                }
            } else {
                if (!dataField.defaultValue().isEmpty()) {
                    value = format.parse(dataField.defaultValue());
                } else {
                    value = getDefaultValueForPrimitive(field.getType());
                }
            }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

                } catch (Exception e) {
                    throw new IllegalArgumentException("Parsing error detected for field defined at the position: " + pos + ", line: " + line, e);
                }
            } else {
                if (!dataField.defaultValue().isEmpty()) {
                    value = format.parse(dataField.defaultValue());
                } else {
                    value = getDefaultValueForPrimitive(field.getType());
                }
            }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

        for (int i = 1; i <= dataFields.size(); i++) {
            Field field = annotatedFields.get(i);
            field.setAccessible(true);
            DataField dataField = dataFields.get(i);
            Object modelField = model.get(field.getDeclaringClass().getName());
            if (field.get(modelField) == null && !dataField.defaultValue().isEmpty()) {
                Format<?> format = FormatFactory.getFormat(field.getType(), getLocale(), dataField);
                Object value = format.parse(dataField.defaultValue());
                field.set(modelField, value);
            }
        }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

            field.setAccessible(true);
            DataField dataField = dataFields.get(i);
            Object modelField = model.get(field.getDeclaringClass().getName());
            if (field.get(modelField) == null && !dataField.defaultValue().isEmpty()) {
                Format<?> format = FormatFactory.getFormat(field.getType(), getLocale(), dataField);
                Object value = format.parse(dataField.defaultValue());
                field.set(modelField, value);
            }
        }
    }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

                    throw new IllegalArgumentException(ie.getMessage() + ", position: " + pos + ", line: " + line, ie);
                } catch (Exception e) {
                    throw new IllegalArgumentException("Parsing error detected for field defined at the position: " + pos + ", line: " + line, e);
                }
            } else {
                if (!dataField.defaultValue().isEmpty()) {
                    value = format.parse(dataField.defaultValue());
                } else {
                    value = getDefaultValueForPrimitive(field.getType());
                }
            }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

                } catch (Exception e) {
                    throw new IllegalArgumentException("Parsing error detected for field defined at the position: " + pos + ", line: " + line, e);
                }
            } else {
                if (!dataField.defaultValue().isEmpty()) {
                    value = format.parse(dataField.defaultValue());
                } else {
                    value = getDefaultValueForPrimitive(field.getType());
                }
            }
View Full Code Here

Examples of org.apache.camel.dataformat.bindy.annotation.DataField.defaultValue()

        for (int i = 1; i <= dataFields.size(); i++) {
            Field field = annotatedFields.get(i);
            field.setAccessible(true);
            DataField dataField = dataFields.get(i);
            Object modelField = model.get(field.getDeclaringClass().getName());
            if (field.get(modelField) == null && !dataField.defaultValue().isEmpty()) {
                Format<?> format = FormatFactory.getFormat(field.getType(), getLocale(), dataField);
                Object value = format.parse(dataField.defaultValue());
                field.set(modelField, value);
            }
        }
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.