org.org.usurper.setup
Class ImmutableUsurperGeneratorSetup

java.lang.Object
  extended by org.org.usurper.setup.ImmutableUsurperGeneratorSetup
All Implemented Interfaces:
IUsurperGeneratorSetup

public class ImmutableUsurperGeneratorSetup
extends java.lang.Object
implements IUsurperGeneratorSetup

This is the immutable version of the class setting up the behaviour of the UsurperGenerator.

Author:
pagregoire

Constructor Summary
ImmutableUsurperGeneratorSetup(java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> propertyTypeHandlersMap, java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> specificPropertyHandlersMap, ArrayHandler arrayHandler, EnumHandler enumHandler, OnMissingHandlers onMissingHandlers, PropertyWritingMechanism propertyWritingMechanism, ICountCallback countCallback)
          Instantiates a new immutable usurper generator setup.
 
Method Summary
 java.util.Map<ITargetDefinition,IHandler> getAllHandlers()
          Gets all handlers.
 ArrayHandler getArrayHandler()
          Gets the array handler.
 ICountCallback getCountCallback()
          Gets the count callback.
 EnumHandler getEnumHandler()
          Gets the enum handler.
 OnMissingHandlers getOnMissingHandlers()
          Gets the on missing handlers behavior.
 AbstractPropertyTypeHandler getPropertyTypeHandler(PropertyTypeDefinition propertyTypeDefinition)
          This method retrieves the Handler for Properties of a given java type.
 java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> getPropertyTypeHandlersMap()
          Gets the property type handlers map.
 PropertyWritingMechanism getPropertyWritingMechanism()
          Gets the property writing mechanism behavior.
 AbstractSpecificPropertyHandler getSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
          This method retrieves the Handler for a given Property of a given Class.
 java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> getSpecificPropertyHandlersMap()
          Gets the specific property handlers map.
 boolean hasPropertyTypeHandler(PropertyTypeDefinition propertyTypeDefinition)
          This method tests if a handler is registered for a given Java Type.
 boolean hasSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
          This method tests if a handler is registered for a given Property of a given Class.
 java.lang.String toString()
           
 java.lang.String toStringRepresentation()
          The implementation of this method must return a String representation of the setup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ImmutableUsurperGeneratorSetup

public ImmutableUsurperGeneratorSetup(java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> propertyTypeHandlersMap,
                                      java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> specificPropertyHandlersMap,
                                      ArrayHandler arrayHandler,
                                      EnumHandler enumHandler,
                                      OnMissingHandlers onMissingHandlers,
                                      PropertyWritingMechanism propertyWritingMechanism,
                                      ICountCallback countCallback)
Instantiates a new immutable usurper generator setup.

Parameters:
propertyTypeHandlersMap - the property type handlers map
specificPropertyHandlersMap - the specific property handlers map
arrayHandler - the array handler
enumHandler - the enum handler
onMissingHandlers - the on missing handlers
propertyWritingMechanism - the property writing mechanism
countCallback - the count callback
Method Detail

getPropertyTypeHandlersMap

public java.util.Map<PropertyTypeDefinition,AbstractPropertyTypeHandler> getPropertyTypeHandlersMap()
Description copied from interface: IUsurperGeneratorSetup
Gets the property type handlers map.

Specified by:
getPropertyTypeHandlersMap in interface IUsurperGeneratorSetup
Returns:
the property type handlers map
See Also:
IUsurperGeneratorSetup.getPropertyTypeHandlersMap()

getSpecificPropertyHandlersMap

public java.util.Map<SpecificPropertyDefinition,AbstractSpecificPropertyHandler> getSpecificPropertyHandlersMap()
Description copied from interface: IUsurperGeneratorSetup
Gets the specific property handlers map.

Specified by:
getSpecificPropertyHandlersMap in interface IUsurperGeneratorSetup
Returns:
the specific property handlers map
See Also:
IUsurperGeneratorSetup.getSpecificPropertyHandlersMap()

getArrayHandler

public ArrayHandler getArrayHandler()
Description copied from interface: IUsurperGeneratorSetup
Gets the array handler.

Specified by:
getArrayHandler in interface IUsurperGeneratorSetup
Returns:
the array handler
See Also:
IUsurperGeneratorSetup.getArrayHandler()

getEnumHandler

public EnumHandler getEnumHandler()
Description copied from interface: IUsurperGeneratorSetup
Gets the enum handler.

Specified by:
getEnumHandler in interface IUsurperGeneratorSetup
Returns:
the enum handler
See Also:
IUsurperGeneratorSetup.getEnumHandler()

getOnMissingHandlers

public OnMissingHandlers getOnMissingHandlers()
Description copied from interface: IUsurperGeneratorSetup
Gets the on missing handlers behavior.

Specified by:
getOnMissingHandlers in interface IUsurperGeneratorSetup
Returns:
the on missing handlers
See Also:
IUsurperGeneratorSetup.getOnMissingHandlers()

getPropertyWritingMechanism

public PropertyWritingMechanism getPropertyWritingMechanism()
Description copied from interface: IUsurperGeneratorSetup
Gets the property writing mechanism behavior.

Specified by:
getPropertyWritingMechanism in interface IUsurperGeneratorSetup
Returns:
the property writing mechanism
See Also:
IUsurperGeneratorSetup.getPropertyWritingMechanism()

getCountCallback

public ICountCallback getCountCallback()
Description copied from interface: IUsurperGeneratorSetup
Gets the count callback.

Specified by:
getCountCallback in interface IUsurperGeneratorSetup
Returns:
the count callback
See Also:
IUsurperGeneratorSetup.getCountCallback()

getAllHandlers

public java.util.Map<ITargetDefinition,IHandler> getAllHandlers()
Description copied from interface: IUsurperGeneratorSetup
Gets all handlers.

Specified by:
getAllHandlers in interface IUsurperGeneratorSetup
Returns:
the all handlers
See Also:
IUsurperGeneratorSetup.getAllHandlers()

hasPropertyTypeHandler

public boolean hasPropertyTypeHandler(PropertyTypeDefinition propertyTypeDefinition)
Description copied from interface: IUsurperGeneratorSetup
This method tests if a handler is registered for a given Java Type.

Specified by:
hasPropertyTypeHandler in interface IUsurperGeneratorSetup
Parameters:
propertyTypeDefinition - the property type definition
Returns:
true if one is registered, false otherwise
See Also:
IUsurperGeneratorSetup.hasPropertyTypeHandler(org.org.usurper.model.PropertyTypeDefinition)

getPropertyTypeHandler

public AbstractPropertyTypeHandler getPropertyTypeHandler(PropertyTypeDefinition propertyTypeDefinition)
Description copied from interface: IUsurperGeneratorSetup
This method retrieves the Handler for Properties of a given java type.

Specified by:
getPropertyTypeHandler in interface IUsurperGeneratorSetup
Parameters:
propertyTypeDefinition - the property type definition
Returns:
the registered handler or null if none is defined.
See Also:
IUsurperGeneratorSetup.getPropertyTypeHandler(org.org.usurper.model.PropertyTypeDefinition)

hasSpecificPropertyHandler

public boolean hasSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
Description copied from interface: IUsurperGeneratorSetup
This method tests if a handler is registered for a given Property of a given Class.

Specified by:
hasSpecificPropertyHandler in interface IUsurperGeneratorSetup
Parameters:
specificPropertyDefinition - the specific property definition
Returns:
true if one is registered, false otherwise
See Also:
IUsurperGeneratorSetup.hasSpecificPropertyHandler(org.org.usurper.model.SpecificPropertyDefinition)

getSpecificPropertyHandler

public AbstractSpecificPropertyHandler getSpecificPropertyHandler(SpecificPropertyDefinition specificPropertyDefinition)
Description copied from interface: IUsurperGeneratorSetup
This method retrieves the Handler for a given Property of a given Class.

Specified by:
getSpecificPropertyHandler in interface IUsurperGeneratorSetup
Parameters:
specificPropertyDefinition - the specific property definition
Returns:
the registered property handler or null if none is defined.
See Also:
IUsurperGeneratorSetup.getSpecificPropertyHandler(org.org.usurper.model.SpecificPropertyDefinition)

toStringRepresentation

public java.lang.String toStringRepresentation()
Description copied from interface: IUsurperGeneratorSetup
The implementation of this method must return a String representation of the setup.

Specified by:
toStringRepresentation in interface IUsurperGeneratorSetup
Returns:
the String representation of the setup.
See Also:
IUsurperGeneratorSetup.toStringRepresentation()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()


Copyright © 2008. All Rights Reserved.