Top Description Fields Constructors Methods
net.fortuna.ical4j.model

public abstract Class AbstractContentFactory<T>

extends Object
implements Serializable, Supplier<List<T>>
Class Inheritance
All Implemented Interfaces
java.util.function.Supplier, java.io.Serializable
Known Direct Subclasses
net.fortuna.ical4j.model.ParameterFactoryImpl, net.fortuna.ical4j.model.PropertyFactoryImpl, net.fortuna.ical4j.model.ComponentFactoryImpl
Annotations
@Deprecated
Imports
org.apache.commons.lang3.Validate, java.io.Serializable, java.util.*, java.util.function.Supplier

Deprecated

$Id$

Created on 28/01/2007

Abstract implementation of a content factory.

Author
Ben Fortuna

Field Summary

Modifier and TypeField and Description
private final boolean
private final Map<String, T>
protected transient ServiceLoader<S>

Constructor Summary

AccessConstructor and Description
public
AbstractContentFactory(ServiceLoader<S> factoryLoader, boolean allowIllegalNames)

Default constructor.

Method Summary

Modifier and TypeMethod and Description
protected boolean

Returns:

true if non-standard names are allowed, otherwise false
allowIllegalNames
()

protected abstract boolean
factorySupports(T factory, String key)

public List<T>
get()

Implements java.util.function.Supplier.get.

Gets a result.

protected final T

Returns:

a factory associated with the specified key, giving preference to standard factories
getFactory
(String
a factory key
key
)

protected final void
registerExtendedFactory(String key, T factory)
Deprecated Define extensions in META-INF/services/net.fortuna.ical4j.model.[Type]Factory

Register a non-standard content factory.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

allowIllegalNamesback to summary
private final boolean allowIllegalNames
extendedFactoriesback to summary
private final Map<String, T> extendedFactories
factoryLoaderback to summary
protected transient ServiceLoader<S> factoryLoader

Constructor Detail

AbstractContentFactoryback to summary
public AbstractContentFactory(ServiceLoader<S> factoryLoader, boolean allowIllegalNames)

Default constructor.

Method Detail

allowIllegalNamesback to summary
protected boolean allowIllegalNames()
Returns:boolean

true if non-standard names are allowed, otherwise false

factorySupportsback to summary
protected abstract boolean factorySupports(T factory, String key)
getback to summary
public List<T> get()

Implements java.util.function.Supplier.get.

Doc from java.util.function.Supplier.get.

Gets a result.

Returns:List<T>

a result

Annotations
@Override
getFactoryback to summary
protected final T getFactory(String key)
Parameters
key:String

a factory key

Returns:T

a factory associated with the specified key, giving preference to standard factories

Exceptions
IllegalArgumentException:
if the specified key is blank
registerExtendedFactoryback to summary
protected final void registerExtendedFactory(String key, T factory)

Deprecated

Define extensions in META-INF/services/net.fortuna.ical4j.model.[Type]Factory

Register a non-standard content factory.

Annotations
@Deprecated