T
- the component classpublic abstract class ICalComponentScribe<T extends ICalComponent> extends Object
Modifier and Type | Field and Description |
---|---|
protected Class<T> |
clazz |
protected String |
componentName |
Constructor and Description |
---|
ICalComponentScribe(Class<T> clazz,
String componentName)
Creates a new component scribe.
|
Modifier and Type | Method and Description |
---|---|
protected abstract T |
_newInstance()
Creates a new instance of the component class.
|
T |
emptyInstance()
Creates a new instance of the component class that doesn't have any
properties or sub-components.
|
Class<T> |
getComponentClass()
Gets the component class.
|
String |
getComponentName()
Gets the component's name.
|
Collection<ICalComponent> |
getComponents(T component)
Gets the sub-components to marshal.
|
List<ICalProperty> |
getProperties(T component)
Gets the properties to marshal.
|
Set<ICalVersion> |
getSupportedVersions()
Gets the iCalendar versions that support this component.
|
protected final Class<T extends ICalComponent> clazz
protected final String componentName
public ICalComponentScribe(Class<T> clazz, String componentName)
clazz
- the component's classcomponentName
- the component's name (e.g. "VEVENT")public Set<ICalVersion> getSupportedVersions()
public Class<T> getComponentClass()
public String getComponentName()
public T emptyInstance()
protected abstract T _newInstance()
public Collection<ICalComponent> getComponents(T component)
component
- the componentpublic List<ICalProperty> getProperties(T component)
component
- the componentCopyright © 2013-2015 Michael Angstadt. All Rights Reserved.