Top Fields Constructors Methods
org.osgi.util.converter

pack-priv abstract Class AbstractSpecifying<T extends Specifying<T>>

extends Object
implements Specifying<T extends Specifying<T>>
Class Inheritance
All Implemented Interfaces
org.osgi.util.converter.Specifying
Known Direct Subclasses
org.osgi.util.converter.ConvertingImpl, org.osgi.util.converter.FunctioningImpl

Author
$Id: 7d2d62548b7eba757b3a938619bc9cf489d43c09 $

Field Summary

Modifier and TypeField and Description
protected volatile Object
protected volatile boolean
protected volatile boolean
protected volatile boolean
protected volatile Class<?>
protected volatile boolean
protected volatile boolean
protected volatile Class<?>
protected volatile boolean
protected volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private T
public T
defaultValue(Object
The default value.
defVal
)

Implements org.osgi.util.converter.Specifying.defaultValue.

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

public T
keysIgnoreCase()

Implements org.osgi.util.converter.Specifying.keysIgnoreCase.

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

public T
sourceAs(Class<?>
The class to treat the object as.
cls
)

Implements org.osgi.util.converter.Specifying.sourceAs.

Treat the source object as the specified class.

public T
sourceAsBean()

Implements org.osgi.util.converter.Specifying.sourceAsBean.

Treat the source object as a JavaBean.

public T
sourceAsDTO()

Implements org.osgi.util.converter.Specifying.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
targetAs(Class<?>
The class to treat the object as.
cls
)

Implements org.osgi.util.converter.Specifying.targetAs.

Treat the target object as the specified class.

public T
targetAsBean()

Implements org.osgi.util.converter.Specifying.targetAsBean.

Treat the target object as a JavaBean.

public T
targetAsDTO()

Implements org.osgi.util.converter.Specifying.targetAsDTO.

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

public T
view()

Implements org.osgi.util.converter.Specifying.view.

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

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

defaultValueback to summary
protected volatile Object defaultValue
hasDefaultback to summary
protected volatile boolean hasDefault
keysIgnoreCaseback to summary
protected volatile boolean keysIgnoreCase
liveViewback to summary
protected volatile boolean liveView
sourceAsClassback to summary
protected volatile Class<?> sourceAsClass
sourceAsDTOback to summary
protected volatile boolean sourceAsDTO
sourceAsJavaBeanback to summary
protected volatile boolean sourceAsJavaBean
targetAsClassback to summary
protected volatile Class<?> targetAsClass
targetAsDTOback to summary
protected volatile boolean targetAsDTO
targetAsJavaBeanback to summary
protected volatile boolean targetAsJavaBean

Constructor Detail

AbstractSpecifyingback to summary
pack-priv AbstractSpecifying()

Method Detail

castThisback to summary
private T castThis()
Annotations
@SuppressWarnings:unchecked
defaultValueback to summary
public T defaultValue(Object defVal)

Implements org.osgi.util.converter.Specifying.defaultValue.

Doc from org.osgi.util.converter.Specifying.defaultValue.

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.

Annotations
@Override
keysIgnoreCaseback to summary
public T keysIgnoreCase()

Implements org.osgi.util.converter.Specifying.keysIgnoreCase.

Doc from org.osgi.util.converter.Specifying.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.

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

Implements org.osgi.util.converter.Specifying.sourceAs.

Doc from org.osgi.util.converter.Specifying.sourceAs.

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.

Annotations
@Override
sourceAsBeanback to summary
public T sourceAsBean()

Implements org.osgi.util.converter.Specifying.sourceAsBean.

Doc from org.osgi.util.converter.Specifying.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.

Annotations
@Override
sourceAsDTOback to summary
public T sourceAsDTO()

Implements org.osgi.util.converter.Specifying.sourceAsDTO.

Doc from org.osgi.util.converter.Specifying.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.

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

Implements org.osgi.util.converter.Specifying.targetAs.

Doc from org.osgi.util.converter.Specifying.targetAs.

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.

Annotations
@Override
targetAsBeanback to summary
public T targetAsBean()

Implements org.osgi.util.converter.Specifying.targetAsBean.

Doc from org.osgi.util.converter.Specifying.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.

Annotations
@Override
targetAsDTOback to summary
public T targetAsDTO()

Implements org.osgi.util.converter.Specifying.targetAsDTO.

Doc from org.osgi.util.converter.Specifying.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.

Annotations
@Override
viewback to summary
public T view()

Implements org.osgi.util.converter.Specifying.view.

Doc from org.osgi.util.converter.Specifying.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.

Annotations
@Override