net.fortuna.ical4j.model

## Class ComponentFactory

- java.lang.Object
- - net.fortuna.ical4j.model.ComponentFactory

    public final class ComponentFactory
    extends Object

$Id$ [05-Apr-2004] A factory for creating iCalendar components. Note that if relaxed parsing is enabled (via specifying the system property: icalj.parsing.relaxed=true) illegal component names are allowed.

Author:
  Ben Fortuna

### Method Summary

Methods
`protected boolean` `allowIllegalNames()`
`Component` `createComponent(String name)`
`Component` `createComponent(String name, PropertyList properties)` Creates a component.
`Component` `createComponent(String name, PropertyList properties, ComponentList components)` Creates a component which contains sub-components.
`static ComponentFactory` `getInstance()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getInstance

    public static ComponentFactory getInstance()

Returns:
  Returns the instance.

#### createComponent

    public Component createComponent(String name)

Parameters:
  `name` - a component name
Returns:
  a new component instance of the specified type

#### createComponent

    public Component createComponent(String name,
                            PropertyList properties)

Creates a component.

Parameters:
  `name` - name of the component
  `properties` - a list of component properties
Returns:
  a component

#### createComponent

    public Component createComponent(String name,
                            PropertyList properties,
                            ComponentList components)

Creates a component which contains sub-components. Currently the only such component is VTIMEZONE.

Parameters:
  `name` - name of the component
  `properties` - a list of component properties
  `components` - a list of sub-components (namely standard/daylight timezones)
Returns:
  a component

#### allowIllegalNames

    protected boolean allowIllegalNames()

Returns:
  true if non-standard names are allowed, otherwise false