public final class DataTypeCollector extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static DataTypeCollector |
systemDataTypeCollector |
| Constructor and Description |
|---|
DataTypeCollector(Object signature) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCollector(DataTypeCollector collector)
Adds a datatype collector on which this collector depends.
|
BasicDataType<?> |
addDataType(BasicDataType<?> dataType)
Adds a datatype to this collector.
|
(package private) void |
clear() |
boolean |
contains(DataType<?> dataType)
Returns whether the dataType is part of the current collection.
|
boolean |
contains(String name)
Returns whether the dataType with the given name is part of the current collection.
|
(package private) static DataTypeCollector |
createSystemDataTypeCollector()
Creates the DataTypeCollector used to store datatypes accessible throughout the application.
|
void |
finish(DataType<?> dataType)
Lock a dataType so it can be changed or altered.
|
Iterator<DataType<?>> |
getAllSpecializations(String name)
Recursively calls
getSpecializations(String) so that you can easily iterate also all indirectly specializaed versions of a certain DataType in this collector |
BasicDataType<?> |
getDataType(String name)
Get a datatype defined for this collector.
|
BasicDataType<?> |
getDataType(String name,
boolean recursive)
Get a datatype defined for this collector, and possibly any collectors it depends on.
|
DataTypeDefinition |
getDataTypeDefinition() |
BasicDataType<?> |
getDataTypeInstance(String name,
DataType<?> baseDataType)
Get a datatype instance through this collector.
|
Map<String,BasicDataType<?>> |
getDataTypes()
Set local datatypes of the collector
|
Set<DataType<?>> |
getRoots()
Returns all DataTypes in this Collector which did not have an origina DataType (in this Collector).
|
Collection<DataType<?>> |
getSpecializations(String name)
Returns a set of all DataTypes in this collector which are directly inherited from the one with given name
|
void |
rewrite(DataType<?> dataType)
Unlock a dataType so it can be changed or altered.
|
void |
setDataTypes(Map<String,BasicDataType<?>> dataTypes)
Set local datatypes of the collector
|
String |
toString() |
static DataTypeCollector systemDataTypeCollector
public DataTypeCollector(Object signature)
signature - the object used to finish a data type for this collector.static DataTypeCollector createSystemDataTypeCollector()
DataTypes class.public DataTypeDefinition getDataTypeDefinition()
public void addCollector(DataTypeCollector collector)
collector - the dataType collector to addpublic void setDataTypes(Map<String,BasicDataType<?>> dataTypes)
dataTypes - a Map containing the datatypespublic Map<String,BasicDataType<?>> getDataTypes()
public BasicDataType<?> getDataType(String name)
name - the name of the datatype to retrieveDataType with the given name, as defined for this collector, or null
if no datatype is defined.public BasicDataType<?> addDataType(BasicDataType<?> dataType)
dataType - the datatype to addnull
if it is not applicable.public Collection<DataType<?>> getSpecializations(String name)
public Iterator<DataType<?>> getAllSpecializations(String name)
getSpecializations(String) so that you can easily iterate also all indirectly specializaed versions of a certain DataType in this collectorpublic Set<DataType<?>> getRoots()
public BasicDataType<?> getDataType(String name, boolean recursive)
name - the name of the datatype to retrieverecursive - if true, the datatype is also searched in collectors it depends on.DataType with the given name, as defined for this collector, or null
if no datatype is defined.public BasicDataType<?> getDataTypeInstance(String name, DataType<?> baseDataType)
name - the name of the datatype to retrievebaseDataType - the datatype to base a new datatype on if it is not yet defined. Can be null.DataType with the given name, as defined for this collector, or null
if no datatype is defined and no base datatype was passed.public boolean contains(String name)
public boolean contains(DataType<?> dataType)
public void rewrite(DataType<?> dataType)
public void finish(DataType<?> dataType)
void clear()
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}