org.org.usurper.handlers.defaults
Class ListAndSetPropertyTypeHandler

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

public class ListAndSetPropertyTypeHandler
extends AbstractPropertyTypeHandler

This handler deals with Lists and Sets of Types.
These Lists and Sets must be generic types (Usurper cannot generate Lists of objects without knowing about the type to be generated) and must be declared using the List and Set 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 elements the List or Set will contain.

Author:
pagregoire

Constructor Summary
ListAndSetPropertyTypeHandler()
          Instantiates a new list and set 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

ListAndSetPropertyTypeHandler

public ListAndSetPropertyTypeHandler()
Instantiates a new list and set 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.