org.org.usurper.handlers.defaults
Class MapPropertyTypeHandler

java.lang.Object
  extended by org.org.usurper.handlers.basic.AbstractPropertyTypeHandler
      extended by org.org.usurper.handlers.defaults.MapPropertyTypeHandler
All Implemented Interfaces:
IHandler

public class MapPropertyTypeHandler
extends AbstractPropertyTypeHandler

This handler deals with Map Types.
The Map must be a generic type (Usurper cannot generate Maps of objects without knowing about the types to be generated) and must be declared using the Map interface.
This handler then delegates to the handlers defined in the generator setup for the proper generation.
It also delegates to the CountCallback defined in the generator setup to determine the number of key/value pairs the Map will contain.

Author:
pagregoire

Constructor Summary
MapPropertyTypeHandler()
          Instantiates a new map property type handler.
 
Method Summary
 java.lang.Object handle(HandledBeanProperty handledBeanProperty)
          This method allows the generation of a properties' value.
 java.lang.Object handle(HandledConstructorArg handledConstructorArg)
          This method allows the generation of a constructor argument.
 
Methods inherited from class org.org.usurper.handlers.basic.AbstractPropertyTypeHandler
getHandledTypes, setHandledTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapPropertyTypeHandler

public MapPropertyTypeHandler()
Instantiates a new map property type handler.

Method Detail

handle

public java.lang.Object handle(HandledBeanProperty handledBeanProperty)
Description copied from interface: IHandler
This method allows the generation of a properties' value.

Parameters:
handledBeanProperty - The bean property's info
Returns:
the generated value.
See Also:
org.org.usurper.handlers.basic.AbstractPropertyTypeHandler#handle()

handle

public java.lang.Object handle(HandledConstructorArg handledConstructorArg)
Description copied from interface: IHandler
This method allows the generation of a constructor argument.

Parameters:
handledConstructorArg - The constructor's arg's info
Returns:
the generated value.
See Also:
org.org.usurper.handlers.basic.AbstractPropertyTypeHandler#handle()


Copyright © 2008. All Rights Reserved.