org.fuin.utils4swing.glazedlists
Class TableFormatCreator<E>

java.lang.Object
  extended by org.fuin.utils4swing.glazedlists.TableFormatCreator<E>
Type Parameters:
E - A business class annotated with @TableColumn.

public final class TableFormatCreator<E>
extends java.lang.Object

Utility-Class to create a Table-Format class "on-the-fly" from @Label and @TableColumn annotations. The TableFormatExt implementation is created with "Javassist" - No reflection is used after the class was constructed.

See Also:
org.fuin.utils4swing.annotations.Label}, org.fuin.utils4swing.annotations.TableColumn}, org.fuin.utils4swing.glazedlists.TableFormatExt}

Constructor Summary
TableFormatCreator()
          Default constructor.
TableFormatCreator(org.fuin.srcgen4javassist.SgClassPool pool, org.fuin.srcgen4javassist.ByteCodeGenerator generator)
          Constructor with class pool and generator.
 
Method Summary
 TableFormatExt<E> create(java.lang.Class<E> clasz)
          Creates a table format for the given class.
 TableFormatExt<E> create(java.lang.Class<E> clasz, java.util.Locale locale)
          Creates a table format for the given class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableFormatCreator

public TableFormatCreator()
Default constructor.


TableFormatCreator

public TableFormatCreator(org.fuin.srcgen4javassist.SgClassPool pool,
                          org.fuin.srcgen4javassist.ByteCodeGenerator generator)
Constructor with class pool and generator.

Parameters:
pool - Pool to use. If NULL a new instance will be created and used.
generator - Generator to use. If NULL a new instance will be created and used.
Method Detail

create

public TableFormatExt<E> create(java.lang.Class<E> clasz)
Creates a table format for the given class. The default Locale is used to determine the ResourceBundle.

Parameters:
clasz - Class annotated with @Label and @TableColumn annotations.
Returns:
Table format.

create

public TableFormatExt<E> create(java.lang.Class<E> clasz,
                                java.util.Locale locale)
Creates a table format for the given class.

Parameters:
clasz - Class annotated with @Label and @TableColumn annotations.
locale - Locale to use for determining the ResourceBundle.
Returns:
Table format.


Copyright © 2009 Future Invent Informationsmanagement GmbH. All Rights Reserved.