help.de.smartics.properties.core
Class PropertyTypeBuilder

Package class diagram package PropertyTypeBuilder
java.lang.Object
  extended by help.de.smartics.properties.core.PropertyTypeBuilder

public final class PropertyTypeBuilder
     
     
extends Object

Builds instances of PropertyTypes for tests.


Field Summary
static Class<?> DEFAULT_SCALAR_ELEMENT_TYPE
           
static Class<?> DEFAULT_SCALAR_TYPE
           
 
Method Summary
static PropertyTypeBuilder a()
          Creates a builder filled with default values.
 PropertyType build()
          Creates the instance.
 PropertyTypeBuilder but()
          Clones the builder.
static PropertyType defaultPropertyType()
          Creates a default instance filled with default values.
 PropertyTypeBuilder withElementType(Class<?> elementType)
          Sets the Java type of the elements of the property if the #getType()type is a collection type.
 PropertyTypeBuilder withType(Class<?> type)
          Sets the Java type of the property.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_SCALAR_TYPE

public static final Class<?> DEFAULT_SCALAR_TYPE

DEFAULT_SCALAR_ELEMENT_TYPE

public static final Class<?> DEFAULT_SCALAR_ELEMENT_TYPE
Method Detail

withType

public PropertyTypeBuilder withType(Class<?> type)
Sets the Java type of the property.

Parameters:
type - the Java type of the property.
Returns:
a reference to this builder.

withElementType

public PropertyTypeBuilder withElementType(Class<?> elementType)
Sets the Java type of the elements of the property if the #getType()type is a collection type. The value is derived from the value specified as PropertyElementType.

Parameters:
elementType - the Java type of the elements of the property if the #getType()type is a collection type.
Returns:
a reference to this builder.

defaultPropertyType

public static PropertyType defaultPropertyType()
Creates a default instance filled with default values.

Returns:
an instance filled with default values.
See Also:
DEFAULT_SCALAR_TYPE, DEFAULT_SCALAR_ELEMENT_TYPE

a

public static PropertyTypeBuilder a()
Creates a builder filled with default values.

Returns:
a builder filled with default values.
See Also:
DEFAULT_SCALAR_TYPE, DEFAULT_SCALAR_ELEMENT_TYPE

but

public PropertyTypeBuilder but()
Clones the builder.

Returns:
the cloned builder.

build

public PropertyType build()
Creates the instance.

Returns:
the instance.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.