Package rife.ioc
Class PropertyValueTemplate
java.lang.Object
rife.ioc.PropertyValueTemplate
- All Implemented Interfaces:
PropertyValue
Retrieves a property value as template instance of a particular type.
- Since:
- 1.0
-
Constructor Summary
ConstructorDescriptionPropertyValueTemplate
(String name) The constructor that stores the retrieval parameters.PropertyValueTemplate
(String type, String name) The constructor that stores the retrieval parameters. -
Method Summary
Modifier and TypeMethodDescriptiongetValue()
Retrieves a property value.Retrieves a string representation of the property value.boolean
Indicates whether the value provided by this instance is negligible in a textual context.boolean
isStatic()
Indicates whether the value is statically fixed and not dynamically retrieved at runtime.toString()
-
Constructor Details
-
PropertyValueTemplate
The constructor that stores the retrieval parameters. The template type will be set to "html"- Parameters:
name
- the template name- Since:
- 1.0
-
PropertyValueTemplate
The constructor that stores the retrieval parameters.- Parameters:
type
- the template factory type; if this argument isnull
the template type will be "html"name
- the template name- Since:
- 1.0
-
-
Method Details
-
getValue
Description copied from interface:PropertyValue
Retrieves a property value.- Specified by:
getValue
in interfacePropertyValue
- Returns:
- the requested property value; or
null
if the property value couldn't be found - Throws:
PropertyValueException
- When something went wrong during the retrieval of the property value.
-
getValueString
Description copied from interface:PropertyValue
Retrieves a string representation of the property value.- Specified by:
getValueString
in interfacePropertyValue
- Returns:
- the requested string representation of the property value; or
null
if the property value couldn't be found - Throws:
PropertyValueException
- When something went wrong during the retrieval of the property value.
-
toString
-
isNegligible
public boolean isNegligible()Description copied from interface:PropertyValue
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.- Specified by:
isNegligible
in interfacePropertyValue
- Returns:
true
if the value is negligible in a textual context; orfalse
otherwise
-
isStatic
public boolean isStatic()Description copied from interface:PropertyValue
Indicates whether the value is statically fixed and not dynamically retrieved at runtime.- Specified by:
isStatic
in interfacePropertyValue
- Returns:
true
if the value is static; orfalse
if the value is dynamically retrieved at runtime
-