Get property value.

@param shardingPropertiesConstant sharding properties constant
@param <T> class type of return value
@return property value
973024
@SuppressWarnings("unchecked")
    public <T> T getValue(final ShardingPropertiesConstant shardingPropertiesConstant) {
        if (cachedProperties.containsKey(shardingPropertiesConstant)) {
            return (T) cachedProperties.get(shardingPropertiesConstant);
        }
        String value = props.getProperty(shardingPropertiesConstant.getKey());
        if (Strings.isNullOrEmpty(value)) {
            Object obj = props.get(shardingPropertiesConstant.getKey());
            if (null == obj) {
                value = shardingPropertiesConstant.getDefaultValue();
            } else {
                value = obj.toString();
            }
        }
        Object result;
        if (boolean.class == shardingPropertiesConstant.getType()) {
            result = Boolean.valueOf(value);
        } else if (int.class == shardingPropertiesConstant.getType()) {
            result = Integer.valueOf(value);
        } else if (long.class == shardingPropertiesConstant.getType()) {
            result = Long.valueOf(value);
        } else {
            result = value;
        }
        cachedProperties.put(shardingPropertiesConstant, result);
        return (T) result;
    }
372437
public static synchronized String getProperty(String base, String property,
			boolean required) {
		return getProperty(base + JavaPropertyConstants.PROPERTY_DIVIDER
				+ property, required);
	}
742082
@SuppressWarnings({ "unchecked", "rawtypes" })
    public <T extends AbstractSchemaProperty> Set<T> get(final Class<T> clazz) {
        return (Set<T>) properties.get(clazz);
    }
707674
public <E extends Enum> E getEnum(HazelcastProperty property, Class<E> enumClazz) {
        String value = getString(property);

        for (E enumConstant : enumClazz.getEnumConstants()) {
            if (enumConstant.name().equalsIgnoreCase(value)) {
                return enumConstant;
            }
        }

        throw new IllegalArgumentException(format("value '%s' for property '%s' is not a valid %s value",
                value, property.getName(), enumClazz.getName()));
    }
914516
public static <T extends PropertyDispatcher> T getInstance(Class<T> cls)
    {
        return getInstance(cls, null);
    }
689516
public Object getProperty(String property) {
        if(ExpandoMetaClass.isValidExpandoProperty(property)) {
            if(property.equals(ExpandoMetaClass.STATIC_QUALIFIER) ||
               property.equals(ExpandoMetaClass.CONSTRUCTOR) ||
               myMetaClass.hasProperty(this, property) == null) {
                  return replaceDelegate().getProperty(property);
            }
        }
        return myMetaClass.getProperty(this, property);
    }
489844
public <T extends UserProperty> T getProperty(Class<T> clazz) {
        for (UserProperty p : properties) {
            if (clazz.isInstance(p))
                return clazz.cast(p);
        }
        return null;
    }
459212
public final Class<?> getPropertyType(String property) {
    MethodInfo info = propertyWriteMethods.get(property);
    if (null == info) return null;
    else return info.parameterTypes[0];
  }
33223
public <T extends AbstractSchemaProperty> T get(final Class<T> clazz, final String name) {
        Set<T> propertyCollection = get(clazz);
        for (T property : propertyCollection) {
            if (property.getName().equals(name)) {
                return property;
            }
        }
        return null;
    }
285162
public Object getPropertyValue(Property property) {
        Validate.argumentIsNotNull(property);
        Object val = properties.get(property.getName());
        if (val == null){
            return Defaults.defaultValue(property.getGenericType());
        }
        return val;
    }
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);
   }
452392
@Override
  public <T> T get(String name, Class<T> type) {
    return this.properties.get(name, type);
  }
1341710
public Object getProperty(Class sender, Object object, String name, boolean useSuper, boolean fromInsideClass) {
        if (hasOverrideGetProperty(name) && getJavaClass().isInstance(object)) {
            return getPropertyMethod.invoke(object, new Object[]{name});
        }

        if ("mixedIn".equals(name)) {
            return new MixedInAccessor(object, mixinClasses);
        }

        return super.getProperty(sender, object, name, useSuper, fromInsideClass);
    }
15922
public static <S> Class<? extends S> getSystemPropertyAsClass(Class<S> type, String name, String defaultValue) {
        final String value = getSystemProperty(name, null);
        if (value != null) {
            try {
                final Class<?> typeInstance = Class.forName(value);
                if (typeInstance != null) {
                    return typeInstance.asSubclass(type);
                }
            } catch (Throwable exception) {
                //
            }
        }
        if (defaultValue != null) {
            try {
                final Class<?> typeInstance = Class.forName(defaultValue);
                if (typeInstance != null) {
                    return typeInstance.asSubclass(type);
                }
            } catch (Throwable exception) {
                //
            }
        }
        return null;
    }
887278
public static Integer getPropertyInteger(Class<?> cls, String key)
	{
		return getSettings().getPropertyInteger(cls, key);

	}
751226
public static String getProperty(Class<?> aClass,String key,ResourceBundle resourceBundle)
	{
		return getSettings().getProperty(aClass, key, resourceBundle);
	}
92874
public <T extends Enum<T>> ThriftEnumMetadata<?> getThriftEnumMetadata(Class<?> enumClass)
    {
        ThriftEnumMetadata<?> enumMetadata = enums.get(enumClass);
        if (enumMetadata == null) {
            enumMetadata = new ThriftEnumMetadataBuilder<>((Class<T>) enumClass).build();

            ThriftEnumMetadata<?> current = enums.putIfAbsent(enumClass, enumMetadata);
            if (current != null) {
                enumMetadata = current;
            }
        }
        return enumMetadata;
    }