Package rife.ioc
Interface PropertyValue
- All Known Implementing Classes:
PropertyValueObject,PropertyValueTemplate
public interface PropertyValue
This interface defines the methods that need to be implemented by classes
that are able to provide values to properties.
These classes should make all value retrieval as lazy as possible and store only the parameters that are required to obtain the actual data dynamically at runtime.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiongetValue()Retrieves a property value.Retrieves a string representation of the property value.booleanIndicates whether the value provided by this instance is negligible in a textual context.booleanisStatic()Indicates whether the value is statically fixed and not dynamically retrieved at runtime.
-
Method Details
-
getValue
Retrieves a property value.- Returns:
- the requested property value; or
nullif the property value couldn't be found - Throws:
PropertyValueException- When something went wrong during the retrieval of the property value.- Since:
- 1.0
-
getValueString
Retrieves a string representation of the property value.- Returns:
- the requested string representation of the property value; or
nullif the property value couldn't be found - Throws:
PropertyValueException- When something went wrong during the retrieval of the property value.- Since:
- 1.0
-
isNegligible
boolean isNegligible()Indicates whether the value provided by this instance is negligible in a textual context. This is for instance applicable to pure whitespace values that when trimmed, have zero length. The property construction logic will check this state to determine if it has to concatenate several property values together as one text result of only use one and discard all other negligible ones.- Returns:
trueif the value is negligible in a textual context; orfalseotherwise- Since:
- 1.0
-
isStatic
boolean isStatic()Indicates whether the value is statically fixed and not dynamically retrieved at runtime.- Returns:
trueif the value is static; orfalseif the value is dynamically retrieved at runtime- Since:
- 1.0
-