Lines Matching defs:property

45          * - property names: [._$a-zA-Z0-9]
144 /* A property name must be a valid fully-qualified class + package name.
177 // Read the property name.
180 throw new ParseException(st, "property name");
184 throw new ParseException(st, "valid property name");
207 // the same property is defined with a different type.
210 "(property previously declared as a different type)");
313 // This property is a float; make sure the value fits.
322 // This property is a double; no need to truncate.
355 * <type> <property-name> = <value> ;
357 * unset ( <property-name> ) ;
366 * the property name.
371 * <property-name> is a valid fully-qualified class name
388 * Passing a property-name to {@code unset()} will unset the property,
419 TypeException(String property, Object value, String requestedType) {
420 super(property + " has type " + value.getClass().getName() +
426 * Returns the value of a boolean property, or the default if the property
429 * @param property The name of the property to return
430 * @param def The default value to return if the property is not set
431 * @return the value of the property
432 * @throws TypeException if the property is set and is not a boolean
434 public boolean getBoolean(String property, boolean def) {
435 Object value = super.get(property);
442 throw new TypeException(property, value, "boolean");
446 * Returns the value of a byte property, or the default if the property
449 * @param property The name of the property to return
450 * @param def The default value to return if the property is not set
451 * @return the value of the property
452 * @throws TypeException if the property is set and is not a byte
454 public byte getByte(String property, byte def) {
455 Object value = super.get(property);
462 throw new TypeException(property, value, "byte");
466 * Returns the value of a short property, or the default if the property
469 * @param property The name of the property to return
470 * @param def The default value to return if the property is not set
471 * @return the value of the property
472 * @throws TypeException if the property is set and is not a short
474 public short getShort(String property, short def) {
475 Object value = super.get(property);
482 throw new TypeException(property, value, "short");
486 * Returns the value of an integer property, or the default if the property
489 * @param property The name of the property to return
490 * @param def The default value to return if the property is not set
491 * @return the value of the property
492 * @throws TypeException if the property is set and is not an integer
494 public int getInt(String property, int def) {
495 Object value = super.get(property);
502 throw new TypeException(property, value, "int");
506 * Returns the value of a long property, or the default if the property
509 * @param property The name of the property to return
510 * @param def The default value to return if the property is not set
511 * @return the value of the property
512 * @throws TypeException if the property is set and is not a long
514 public long getLong(String property, long def) {
515 Object value = super.get(property);
522 throw new TypeException(property, value, "long");
526 * Returns the value of a float property, or the default if the property
529 * @param property The name of the property to return
530 * @param def The default value to return if the property is not set
531 * @return the value of the property
532 * @throws TypeException if the property is set and is not a float
534 public float getFloat(String property, float def) {
535 Object value = super.get(property);
542 throw new TypeException(property, value, "float");
546 * Returns the value of a double property, or the default if the property
549 * @param property The name of the property to return
550 * @param def The default value to return if the property is not set
551 * @return the value of the property
552 * @throws TypeException if the property is set and is not a double
554 public double getDouble(String property, double def) {
555 Object value = super.get(property);
562 throw new TypeException(property, value, "double");
566 * Returns the value of a string property, or the default if the property
569 * @param property The name of the property to return
570 * @param def The default value to return if the property is not set
571 * @return the value of the property
572 * @throws TypeException if the property is set and is not a string
574 public String getString(String property, String def) {
575 Object value = super.get(property);
584 throw new TypeException(property, value, "string");
592 * Returns the value of a boolean property, or false
593 * if the property has not been defined.
595 * @param property The name of the property to return
596 * @return the value of the property
597 * @throws TypeException if the property is set and is not a boolean
599 public boolean getBoolean(String property) {
600 return getBoolean(property, false);
604 * Returns the value of a byte property, or 0
605 * if the property has not been defined.
607 * @param property The name of the property to return
608 * @return the value of the property
609 * @throws TypeException if the property is set and is not a byte
611 public byte getByte(String property) {
612 return getByte(property, (byte)0);
616 * Returns the value of a short property, or 0
617 * if the property has not been defined.
619 * @param property The name of the property to return
620 * @return the value of the property
621 * @throws TypeException if the property is set and is not a short
623 public short getShort(String property) {
624 return getShort(property, (short)0);
628 * Returns the value of an integer property, or 0
629 * if the property has not been defined.
631 * @param property The name of the property to return
632 * @return the value of the property
633 * @throws TypeException if the property is set and is not an integer
635 public int getInt(String property) {
636 return getInt(property, 0);
640 * Returns the value of a long property, or 0
641 * if the property has not been defined.
643 * @param property The name of the property to return
644 * @return the value of the property
645 * @throws TypeException if the property is set and is not a long
647 public long getLong(String property) {
648 return getLong(property, 0L);
652 * Returns the value of a float property, or 0.0
653 * if the property has not been defined.
655 * @param property The name of the property to return
656 * @return the value of the property
657 * @throws TypeException if the property is set and is not a float
659 public float getFloat(String property) {
660 return getFloat(property, 0.0f);
664 * Returns the value of a double property, or 0.0
665 * if the property has not been defined.
667 * @param property The name of the property to return
668 * @return the value of the property
669 * @throws TypeException if the property is set and is not a double
671 public double getDouble(String property) {
672 return getDouble(property, 0.0);
676 * Returns the value of a String property, or ""
677 * if the property has not been defined.
679 * @param property The name of the property to return
680 * @return the value of the property
681 * @throws TypeException if the property is set and is not a string
683 public String getString(String property) {
684 return getString(property, "");
694 * Provides string type information about a property.
696 * @param property the property to check
697 * @return STRING_SET if the property is a string and is non-null.
698 * STRING_NULL if the property is a string and is null.
699 * STRING_NOT_SET if the property is not set (no type or value).
700 * STRING_TYPE_MISMATCH if the property is set but is not a string.
702 public int getStringInfo(String property) {
703 Object value = super.get(property);