public final class PropertiesPropertySource extends AbstractPropertySource implements com.google.inject.Module
Properties object.
PropertiesPropertySource is also a Guice module and can be installed to provide a
self binding to PropertySource.class.| Constructor and Description |
|---|
PropertiesPropertySource() |
PropertiesPropertySource(java.util.Properties props) |
| Modifier and Type | Method and Description |
|---|---|
void |
configure(com.google.inject.Binder binder) |
boolean |
equals(java.lang.Object obj) |
static PropertiesPropertySource |
from(java.util.Properties props) |
java.lang.String |
get(java.lang.String key)
Get the value of a property or null if not found
|
java.lang.String |
get(java.lang.String key,
java.lang.String defaultValue)
Get the value of a property or default if not found
|
int |
hashCode() |
boolean |
hasProperty(java.lang.String key)
Determine if the PropertySource contains the specified property key
|
PropertiesPropertySource |
setProperty(java.lang.String key,
java.lang.String value) |
java.lang.String |
toString() |
get, getpublic PropertiesPropertySource(java.util.Properties props)
public PropertiesPropertySource()
public static PropertiesPropertySource from(java.util.Properties props)
public PropertiesPropertySource setProperty(java.lang.String key, java.lang.String value)
public boolean hasProperty(java.lang.String key)
PropertySourcehasProperty in interface PropertySourcepublic java.lang.String get(java.lang.String key)
PropertySourceget in interface PropertySourcekey - Name of property to fetchpublic java.lang.String get(java.lang.String key,
java.lang.String defaultValue)
PropertySourceget in interface PropertySourcekey - Name of property to fetchpublic void configure(com.google.inject.Binder binder)
configure in interface com.google.inject.Modulepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object