Constructs a setting of {@link Integer} type, which is represented by a {@link TextField}.

@param description the title of this setting
@param property    to be bound, saved / loaded and used for undo / redo
@return the constructed setting
558293
public static Setting of(String description, IntegerProperty property) {
    return new Setting<>(
        description,
        Field.ofIntegerType(property)
            .label(description)
            .render(new SimpleIntegerControl()),
        property);
  }
259619
private static void addDescription(int type, String description) {
        if (description.startsWith("<") && description.endsWith(">")) {
            DESCRIPTIONS.put(type, description);
        } else {
            DESCRIPTIONS.put(type, '"' + description + '"');
        }
    }
492856
def __FieldDescriptorFromProperties(self, name, index, attrs):
        """"""
        field = descriptor.FieldDescriptor()
        field.name = self.__names.CleanName(name)
        field.number = index
        field.label = self.__ComputeLabel(attrs)
        new_type_name_hint = self.__names.ClassName(
            '%sValue' % self.__names.ClassName(name))
        type_info = self.__GetTypeInfo(attrs, new_type_name_hint)
        field.type_name = type_info.type_name
        field.variant = type_info.variant
        if 'default' in attrs:
            # TODO(craigcitro): Correctly handle non-primitive default values.
            default = attrs['default']
            if not (field.type_name == 'string' or
                    field.variant == messages.Variant.ENUM):
                default = str(json.loads(default))
            if field.variant == messages.Variant.ENUM:
                default = self.__names.NormalizeEnumName(default)
            field.default_value = default
        extended_field = extended_descriptor.ExtendedFieldDescriptor()
        extended_field.name = field.name
        extended_field.description = util.CleanDescription(
            attrs.get('description', 'A %s attribute.' % field.type_name))
        extended_field.field_descriptor = field
        return extended_field
834541
public static <T> Property<T, Integer> createIntProperty(final IntProp<T> impl) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
            return new IntProperty<T>(impl.name) {
                @Override
                public Integer get(T object) {
                    return impl.get(object);
                }

                @Override
                public void setValue(T object, int value) {
                    impl.set(object, value);
                }
            };
        } else {
            return new Property<T, Integer>(Integer.class, impl.name) {
                @Override
                public Integer get(T object) {
                    return impl.get(object);
                }

                @Override
                public void set(T object, Integer value) {
                    impl.set(object, value);
                }
            };
        }
    }
195717
public <T> void set(ElementDescriptor<T> property, T value)
	{
		if (mSet == null)
		{
			mSet = new HashMap<ElementDescriptor<?>, Object>(16);
		}
		mSet.put(property, value);

		if (mRemove != null)
		{
			mRemove.remove(property);
		}
	}
675677
public
  void setProperty(PropertyDescriptor prop, String name, String value)
    throws PropertySetterException {
    Method setter = prop.getWriteMethod();
    if (setter == null) {
      throw new PropertySetterException("No setter for property ["+name+"].");
    }
    Class[] paramTypes = setter.getParameterTypes();
    if (paramTypes.length != 1) {
      throw new PropertySetterException("#params for setter != 1");
    }

    Object arg;
    try {
      arg = convertArg(value, paramTypes[0]);
    } catch (Throwable t) {
      throw new PropertySetterException("Conversion to type ["+paramTypes[0]+
					"] failed. Reason: "+t);
    }
    if (arg == null) {
      throw new PropertySetterException(
          "Conversion to type ["+paramTypes[0]+"] failed.");
    }
    LogLog.debug("Setting property [" + name + "] to [" +arg+"].");
    try {
      setter.invoke(obj, new Object[]  { arg });
    } catch (IllegalAccessException ex) {
      throw new PropertySetterException(ex);
    } catch (InvocationTargetException ex) {
        if (ex.getTargetException() instanceof InterruptedException
                || ex.getTargetException() instanceof InterruptedIOException) {
            Thread.currentThread().interrupt();
        }
        throw new PropertySetterException(ex);
    } catch (RuntimeException ex) {
      throw new PropertySetterException(ex);
    }
  }
645044
public static Setting of(String description, BooleanProperty property) {
    return new Setting<>(
        description,
        Field.ofBooleanType(property)
            .label(description)
            .render(new ToggleControl()),
        property
    );
  }
1186307
public final boolean defineSynthesizedProperty(String propertyName,
      JSType type, Node propertyNode) {
    return defineProperty(propertyName, type, false, propertyNode);
  }
1210521
@Programmatic
    public ApplicationSettingJdo newLong(
            final String key,
            final String description,
            final Long value) {
        return newSetting(key, description, SettingType.LONG, value.toString());
    }
252386
@Override
    public BeanBuilder<T> set(String propertyName, Object value) {
        return set(bean.metaBean().metaProperty(propertyName), value);
    }
431885
public void setDescription(java.util.Collection<StringFilter> description) {
        if (description == null) {
            this.description = null;
            return;
        }

        this.description = new java.util.ArrayList<StringFilter>(description);
    }
1358674
public TypeDescription getType() {
        if (mType == null) {
            mType = getTeaToolsUtils().createTypeDescription(
                       getPropertyDescriptor().getPropertyType());
        }

        return mType;
    }
1165982
public DescriptionBuilder stringProperty(final String name,
                                             final String defaultValue,
                                             final boolean required,
                                             final String propTitle, final String propDescription) {
        properties.add(PropertyUtil.string(name, propTitle, propDescription, required, defaultValue));
        return this;
    }
253150
public static HashSet<String> createSetFromProperty(String property)
	{
		HashSet<String> properties = new HashSet<String>();

		if (property != null && !property.equals("null")) {
			// "([\\w]*)=([\\w]*);"
			Pattern params = Pattern.compile("([\\w]+)[;]*");
			Matcher matcher = params.matcher(property.trim());
			while (matcher.find()) {
				properties.add(matcher.group(1));
			}

		}

		return properties;
	}
1347495
public static ValueType fromConfig(String property) {
      //If the property is valid and we cannot find a "property.type" then the value of the property represents its simple type.
      if (Config.hasProperty(property) && !Config.hasProperty(property, TYPE_PROPERTY)) {
         return new SimpleValueType(Config.get(property).asClass());
      }

      if( Config.isBean(property) ){
         Object o = Config.get(property);
         return new SimpleValueType(o.getClass());
      }

      //Read in the value type parameters from the configuration using the property as the prefix
      Map<String, Class> typeInfo = Config.getMap(property, String.class, Class.class);
      //Set the type class to the type property defaulting to String if not found
      Class<?> typeClass = typeInfo.getOrDefault(TYPE_PROPERTY, String.class);


      //Check for a collection
      if (Collection.class.isAssignableFrom(typeClass)) {
         return new CollectionValueType(typeClass,
                                        typeInfo.getOrDefault(ELEMENT_TYPE_PROPERTY, String.class)
         );
      }

      //Check for a Map
      if (Map.class.isAssignableFrom(typeClass)) {
         return new MapValueType(typeClass,
                                 typeInfo.getOrDefault(KEY_TYPE_PROPERTY, String.class),
                                 typeInfo.getOrDefault(VALUE_TYPE_PROPERTY, String.class)
         );
      }

      return new SimpleValueType(typeClass);
   }
785729
public static ExecutableElement findSetterMethod(
      String propertyName, TypeMirror type, TypeElement declaringClass, boolean isStatic) {
    ExecutableElement setter = ElementUtil.findMethod(
        declaringClass,
        "set" + NameTable.capitalize(propertyName),
        TypeUtil.getQualifiedName(type));
    return setter != null && isStatic == isStatic(setter) ? setter : null;
  }
1373073
public static String generateFlyweightPropertyJavadoc(
        final String indent, final Token propertyToken, final String typeName)
    {
        final String description = propertyToken.description();
        if (null == description || description.isEmpty())
        {
            return "";
        }

        return
            indent + "/**\n" +
            indent + " * " + description + '\n' +
            indent + " *\n" +
            indent + " * @return " + typeName + " : " + description + "\n" +
            indent + " */\n";
    }