Package org.jfree.xml.generator
Class ModelBuilder
- java.lang.Object
-
- org.jfree.xml.generator.ModelBuilder
-
public final class ModelBuilder extends java.lang.Object
A model builder. This class performs the work of creating a class description model from a set of source files.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAttributeHandlers(java.util.Properties p)Adds attribute handlers.DescriptionModelbuildModel(SourceCollector c, DescriptionModel model)Builds a model from the classes provided by theSourceCollector.PropertyInfocreateSimplePropertyInfo(java.beans.PropertyDescriptor pd)Creates aPropertyInfoobject from aPropertyDescriptor.static ModelBuildergetInstance()Returns the single instance of this class.static booleanisValidMethod(java.lang.reflect.Method method)Checks, whether the given method can be called from the generic object factory.
-
-
-
Method Detail
-
getInstance
public static ModelBuilder getInstance()
Returns the single instance of this class.- Returns:
- the single instance of this class.
-
addAttributeHandlers
public void addAttributeHandlers(java.util.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 theSourceCollector.The
DescriptionGeneratorclass invokes this.- Parameters:
c- the source collector.model- the model under construction (nullpermitted).- Returns:
- The completed model.
-
isValidMethod
public static boolean isValidMethod(java.lang.reflect.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.
-
createSimplePropertyInfo
public PropertyInfo createSimplePropertyInfo(java.beans.PropertyDescriptor pd)
Creates aPropertyInfoobject from aPropertyDescriptor.- Parameters:
pd- the property descriptor.- Returns:
- the property info (
nullpossible).
-
-