Package org.jppf.utils.configuration
Interface JPPFProperty<T>
- Type Parameters:
T- the type of the value of this property.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AbstractJPPFProperty,BooleanProperty,CharProperty,DoubleProperty,FileProperty,FloatProperty,IntArrayProperty,IntProperty,LongProperty,NumberProperty,StringArrayProperty,StringProperty
Interface for predefined JPPF properties expected to handle a specific value type.
- Since:
- 5.2
- Author:
- Laurent Cohen
-
Method Summary
Modifier and TypeMethodDescriptionString[]Get the aliases for this property, that is, other names it may be known as such as legacy names from prior versions.Get the default value of this property.Get a string explaining why a property was deprecated and/or what to use instead.getDeprecatedDoc(Locale locale) Get a string explaining why a property was deprecated and/or what to use instead.Get a description of this property.getDocumentation(Locale locale) Get a description of this property.getName()Get the name of this property.getParameterDoc(String param) Get the documeentation for the specified parmaeter, if it exists.String[]Get the parmaeters specified in the name of property, if any.Get a short label for this property.getShortLabel(Locale locale) Get a short label for this property.getTags()Get the set of tags that apply to this property.booleanDetermine whether this property is deprecated.resolveName(String... params) Resolve the name of the property by substituting the parameters names with actual values.resolveName(String alias, String... params) Resolve the specified alias for the property's name by substituting the parameters names with actual values.setDeprecated(boolean deprecated) Specify whether this property is deprecated.Convert the specified value to a string.Convert the specified value into the type of values handled by this property.Return the class object for the type of values of this property.
-
Method Details
-
getName
String getName()Get the name of this property.- Returns:
- the property's name.
-
getDefaultValue
T getDefaultValue()Get the default value of this property.- Returns:
- the default value;
-
getAliases
String[] getAliases()Get the aliases for this property, that is, other names it may be known as such as legacy names from prior versions.- Returns:
- an array of the aliases for this property, possibly empty.
-
valueOf
Convert the specified value into the type of values handled by this property.- Parameters:
value- the property value to convert.- Returns:
- the value converted to the type of this property.
-
toString
Convert the specified value to a string.- Parameters:
value- the property value to convert.- Returns:
- a String representation of the value.
-
valueType
Return the class object for the type of values of this property.- Returns:
- a
Classinstance.
-
getShortLabel
String getShortLabel()Get a short label for this property.- Returns:
- the label as a string.
-
getShortLabel
Get a short label for this property.- Parameters:
locale- the locale in which the short label of this property should be returned.- Returns:
- the label as a string.
-
getDocumentation
Get a description of this property.- Parameters:
locale- the locale in which the documentation of this property should be returned.- Returns:
- the description as a string.
-
getDocumentation
String getDocumentation()Get a description of this property.- Returns:
- the description as a string.
-
getTags
Get the set of tags that apply to this property.- Returns:
- a set of tags as strings.
-
getParameters
String[] getParameters()Get the parmaeters specified in the name of property, if any. Parameters are specified as in this example:my.<param1>.property.<param2>.name = some value.- Returns:
- an array of the parameter names, empty if there is no parameter.
- Since:
- 6.0
-
getParameterDoc
Get the documeentation for the specified parmaeter, if it exists.- Parameters:
param- the name of the parameter for which to find a description.- Returns:
- a string describing the parameter.
- Since:
- 6.0
-
getDeprecatedDoc
String getDeprecatedDoc()Get a string explaining why a property was deprecated and/or what to use instead.- Returns:
- a text documentation about this property's deprecation.
-
getDeprecatedDoc
Get a string explaining why a property was deprecated and/or what to use instead.- Parameters:
locale- the locale in which the text should be returned.- Returns:
- a text documentation about this property's deprecation.
-
resolveName
Resolve the name of the property by substituting the parameters names with actual values.- Parameters:
params- the values of the parameters.- Returns:
- the new resolve name.
- Since:
- 6.0
-
resolveName
Resolve the specified alias for the property's name by substituting the parameters names with actual values.- Parameters:
alias- the alias to resolve.params- the values of the parameters.- Returns:
- the new resolve name.
- Since:
- 6.0
-
isDeprecated
boolean isDeprecated()Determine whether this property is deprecated.- Returns:
trueif the property is deprecated,falseotherwise.
-
setDeprecated
Specify whether this property is deprecated.- Parameters:
deprecated-trueif the property is deprecated,falseotherwise.- Returns:
- this property, for method call chaining.
-