Top Description Constructors Methods
org.springframework.core.env

public Class PropertiesPropertySource

extends MapPropertySource
Class Inheritance
Known Direct Subclasses
org.springframework.core.io.support.ResourcePropertySource
Imports
java.util.Map, .Properties

PropertySource implementation that extracts properties from a java.util.Properties object.

Note that because a Properties object is technically an <Object, Object> Hashtable, one may contain non-String keys or values. This implementation, however is restricted to accessing only String-based keys and values, in the same fashion as Properties#getProperty and Properties#setProperty.

Authors
Chris Beams, Juergen Hoeller
Since
3.1

Constructor Summary

AccessConstructor and Description
public
protected

Method Summary

Modifier and TypeMethod and Description
public String[]
getPropertyNames()

Overrides org.springframework.core.env.MapPropertySource.getPropertyNames.

Return the names of all properties contained by the source object (never null).
Inherited from org.springframework.core.env.MapPropertySource:
containsPropertygetProperty

Constructor Detail

PropertiesPropertySourceback to summary
public PropertiesPropertySource(String name, Properties source)
Annotations
@SuppressWarnings:rawtypes, unchecked
PropertiesPropertySourceback to summary
protected PropertiesPropertySource(String name, Map<String, Object> source)

Method Detail

getPropertyNamesback to summary
public String[] getPropertyNames()

Overrides org.springframework.core.env.MapPropertySource.getPropertyNames.

Doc from org.springframework.core.env.EnumerablePropertySource.getPropertyNames.

Return the names of all properties contained by the source object (never null).

Annotations
@Override