Top Description Methods
org.osgi.util.converter

public Interface Specifying<T extends Specifying<T>>

Known Direct Subinterfaces
org.osgi.util.converter.Converting, org.osgi.util.converter.Functioning
Known Direct Implementers
org.osgi.util.converter.AbstractSpecifying
Annotations
@ProviderType
Type Parameters
<T>
Either Converting or Specifying.
Imports
org.osgi.annotation.versioning.ProviderType

This is the base interface for the Converting and Functioning interfaces and defines the common modifiers that can be applied to these.
Author
$Id: 008eab43b33e817eea7e140bbea81b169ee3f5cc $

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

The current Converting object so that additional calls can be chained.
defaultValue
(Object
The default value.
defVal
)

The default value to use when the object cannot be converted or in case of conversion from a null value.

public T

Returns:

The current Converting object so that additional calls can be chained.
keysIgnoreCase
()

When converting between map-like types use case-insensitive mapping of keys.

public T

Returns:

The current Converting object so that additional calls can be chained.
sourceAs
(Class<?>
The class to treat the object as.
cls
)

Treat the source object as the specified class.

public T

Returns:

The current Converting object so that additional calls can be chained.
sourceAsBean
()

Treat the source object as a JavaBean.

public T

Returns:

The current Converting object so that additional calls can be chained.
sourceAsDTO
()

Treat the source object as a DTO even if the source object has methods or is otherwise not recognized as a DTO.

public T

Returns:

The current Converting object so that additional calls can be chained.
targetAs
(Class<?>
The class to treat the object as.
cls
)

Treat the target object as the specified class.

public T

Returns:

The current Converting object so that additional calls can be chained.
targetAsBean
()

Treat the target object as a JavaBean.

public T

Returns:

The current Converting object so that additional calls can be chained.
targetAsDTO
()

Treat the target object as a DTO even if it has methods or is otherwise not recognized as a DTO.

public T

Returns:

The current Converting object so that additional calls can be chained.
view
()

Return a live view over the backing object that reflects any changes to the original object.

Method Detail

defaultValueback to summary
public T defaultValue(Object defVal)

The default value to use when the object cannot be converted or in case of conversion from a null value.

Parameters
defVal:Object

The default value.

Returns:T

The current Converting object so that additional calls can be chained.

keysIgnoreCaseback to summary
public T keysIgnoreCase()

When converting between map-like types use case-insensitive mapping of keys.

Returns:T

The current Converting object so that additional calls can be chained.

sourceAsback to summary
public T sourceAs(Class<?> cls)

Treat the source object as the specified class. This can be used to disambiguate a type if it implements multiple interfaces or extends multiple classes.

Parameters
cls:Class<?>

The class to treat the object as.

Returns:T

The current Converting object so that additional calls can be chained.

sourceAsBeanback to summary
public T sourceAsBean()

Treat the source object as a JavaBean. By default objects will not be treated as JavaBeans, this has to be specified using this method.

Returns:T

The current Converting object so that additional calls can be chained.

sourceAsDTOback to summary
public T sourceAsDTO()

Treat the source object as a DTO even if the source object has methods or is otherwise not recognized as a DTO.

Returns:T

The current Converting object so that additional calls can be chained.

targetAsback to summary
public T targetAs(Class<?> cls)

Treat the target object as the specified class. This can be used to disambiguate a type if it implements multiple interfaces or extends multiple classes.

Parameters
cls:Class<?>

The class to treat the object as.

Returns:T

The current Converting object so that additional calls can be chained.

targetAsBeanback to summary
public T targetAsBean()

Treat the target object as a JavaBean. By default objects will not be treated as JavaBeans, this has to be specified using this method.

Returns:T

The current Converting object so that additional calls can be chained.

targetAsDTOback to summary
public T targetAsDTO()

Treat the target object as a DTO even if it has methods or is otherwise not recognized as a DTO.

Returns:T

The current Converting object so that additional calls can be chained.

viewback to summary
public T view()

Return a live view over the backing object that reflects any changes to the original object. This is only possible with conversions to java.util.Map, java.util.Collection, java.util.List and java.util.Set. The live view object will cease to be live as soon as modifications are made to it. Note that conversions to an interface or annotation will always produce a live view that cannot be modified. This modifier has no effect with conversions to other types.

Returns:T

The current Converting object so that additional calls can be chained.