org.jfree.xml.generator

Class ModelBuilder

public final class ModelBuilder extends Object

A model builder. This class performs the work of creating a class description model from a set of source files.
Method Summary
voidaddAttributeHandlers(Properties p)
Adds attribute handlers.
DescriptionModelbuildModel(SourceCollector c, DescriptionModel model)
Builds a model from the classes provided by the SourceCollector.
PropertyInfocreateSimplePropertyInfo(PropertyDescriptor pd)
Creates a PropertyInfo object from a PropertyDescriptor.
static ModelBuildergetInstance()
Returns the single instance of this class.
static booleanisValidMethod(Method method)
Checks, whether the given method can be called from the generic object factory.

Method Detail

addAttributeHandlers

public void addAttributeHandlers(Properties p)
Adds attribute handlers.

Parameters: p the handlers.

buildModel

public DescriptionModel buildModel(SourceCollector c, DescriptionModel model)
Builds a model from the classes provided by the SourceCollector.

The DescriptionGenerator class invokes this.

Parameters: c the source collector. model the model under construction (null permitted).

Returns: The completed model.

createSimplePropertyInfo

public PropertyInfo createSimplePropertyInfo(PropertyDescriptor pd)
Creates a PropertyInfo object from a PropertyDescriptor.

Parameters: pd the property descriptor.

Returns: the property info (null possible).

getInstance

public static ModelBuilder getInstance()
Returns the single instance of this class.

Returns: the single instance of this class.

isValidMethod

public static boolean isValidMethod(Method method)
Checks, whether the given method can be called from the generic object factory.

Parameters: method the method descriptor

Returns: true, if the method is not null and public, false otherwise.