public class ObjectiveProperties extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected boolean |
_checkImplicitOverride
Does it check the implicit override property?
|
protected List<String> |
_extendsResourcePathList
The list of resource path of extends properties loaded by class loader.
|
protected JavaPropertiesResult |
_javaPropertiesResult
The result of java properties reading.
|
protected String |
_resourcePath
The resource path of (base-point) properties loaded by class loader.
|
protected String |
_streamEncoding
The encoding for stream to the properties file.
|
| コンストラクタと説明 |
|---|
ObjectiveProperties(String resourcePath) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
ObjectiveProperties |
checkImplicitOverride()
Enable implicit override check.
|
protected JavaPropertiesReader |
createJavaPropertiesReader(String title) |
protected JavaPropertiesStreamProvider |
createJavaPropertiesStreamProvider() |
ObjectiveProperties |
encodeAsUTF8()
Encode the stream to the properties file as UTF-8.
|
boolean |
equals(Object obj) |
ObjectiveProperties |
extendsProperties(String... extendsResourcePaths)
Set the properties paths to extends them.
|
String |
get(String propertyKey)
Get the value of property as
String. |
Date |
getAsDate(String propertyKey)
Get the value of property as
Date. |
BigDecimal |
getAsDecimal(String propertyKey)
Get the value of property as
BigDecimal. |
Integer |
getAsInteger(String propertyKey)
Get the value of property as
Integer. |
Long |
getAsLong(String propertyKey)
Get the value of property as
Long. |
List<String> |
getExtendsResourcePathList()
Get the list of resource path of extends properties loaded by class loader.
|
JavaPropertiesResult |
getJavaPropertiesResult()
Get the result of java properties reading.
|
String |
getResourcePath()
Get the resource path of (base-point) properties loaded by class loader.
|
int |
hashCode() |
boolean |
is(String propertyKey)
Is the property true?
|
boolean |
isCheckImplicitOverride()
Does it check the implicit override property?
|
ObjectiveProperties |
load()
Load properties.
|
protected void |
prepareExtendsProperties(JavaPropertiesReader reader) |
protected InputStream |
toStream(String resourcePath) |
String |
toString() |
protected String |
toTitle(String path) |
protected final String _resourcePath
protected List<String> _extendsResourcePathList
protected boolean _checkImplicitOverride
protected String _streamEncoding
protected JavaPropertiesResult _javaPropertiesResult
public ObjectiveProperties(String resourcePath)
resourcePath - The path of the property as resource for this class loader. (NotNull)public ObjectiveProperties extendsProperties(String... extendsResourcePaths)
extendsResourcePaths - The varying array of path for resources to extends. (NotNull)public ObjectiveProperties checkImplicitOverride()
# @Override here is comment area, you can write about the property foo.bar = quxAnd if the property with override annotation but no existence in super-properties, an exception is thrown (you can detect the wrong situation).
public ObjectiveProperties encodeAsUTF8()
public ObjectiveProperties load()
protected JavaPropertiesReader createJavaPropertiesReader(String title)
protected JavaPropertiesStreamProvider createJavaPropertiesStreamProvider()
protected void prepareExtendsProperties(JavaPropertiesReader reader)
protected InputStream toStream(String resourcePath)
public String get(String propertyKey)
String.propertyKey - The key of the property. (NotNull)public Integer getAsInteger(String propertyKey)
Integer.propertyKey - The key of the property. (NotNull)NumberFormatException - When the property is not integer.public Long getAsLong(String propertyKey)
Long.propertyKey - The key of the property. (NotNull)NumberFormatException - When the property is not long.public BigDecimal getAsDecimal(String propertyKey)
BigDecimal.propertyKey - The key of the property. (NotNull)NumberFormatException - When the property is not decimal.public Date getAsDate(String propertyKey)
Date.propertyKey - The key of the property. (NotNull)DfTypeUtil.ParseDateException - When it failed to parse the string to date.DfTypeUtil.ParseDateNumberFormatException - When it failed to format the elements as number.DfTypeUtil.ParseDateOutOfCalendarException - When the date was out of calendar. (if BC, not thrown)public boolean is(String propertyKey)
propertyKey - The key of the property which is boolean type. (NotNull)public String getResourcePath()
public List<String> getExtendsResourcePathList()
public boolean isCheckImplicitOverride()
public JavaPropertiesResult getJavaPropertiesResult()
Copyright © 2014–2015 The DBFlute Project. All rights reserved.