Interface IAutoValueService<ValueType>
-
public interface IAutoValueService<ValueType>
Auto values service, which handles value ofValueType
type. Implementation of this contract helps to handle both context-specific (get(IAutoValueContext, Object)
) and non context-specific ({get(IAutoValueContext, Version)
}) auto-values.- See Also:
IAutoValueServiceRegistry
,IAutoValueStaticRegistry
- Restriction:
- Restriction:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ValueType
get(IAutoValueContext context, Version version)
Returns value for given context.ValueType
get(IAutoValueContext context, ValueType autoValue)
Returns value for given context.
-
-
-
Method Detail
-
get
ValueType get(IAutoValueContext context, ValueType autoValue)
Returns value for given context. This method allows handle context-specific "Auto" values ofValueType
type.- Parameters:
context
- the context (notnull
)autoValue
- the value representing "Auto" value (notnull
)- Returns:
- the value for given context or
autoValue
if value not specified (null
means "Auto"))
-
get
ValueType get(IAutoValueContext context, Version version)
Returns value for given context. Not all Auto-values are context-specific. For this purposespecial registry
exists, which has static declarations of Auto values.- Parameters:
context
- the context object (notnull
)version
- the runtime version (notnull
)- Returns:
- the value for given context or
null
if value is not specified - See Also:
IAutoValueServiceRegistry
,IAutoValueStaticRegistry
-
-