GuavaSerIteratorFactorypublic class SerIteratorFactory
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static java.util.List<java.lang.Class<?>> |
EMPTY_VALUE_TYPES |
An empty list of classes.
|
static SerIteratorFactory |
INSTANCE |
Singleton instance.
|
| Constructor | Description |
|---|---|
SerIteratorFactory() |
| Modifier and Type | Method | Description |
|---|---|---|
static SerIterable |
array(java.lang.Class<?> valueType) |
Gets an iterable wrapper for an object array.
|
static SerIterator |
array(java.lang.Object[] array,
java.lang.Class<?> declaredType,
java.lang.Class<?> valueType) |
Gets an iterator wrapper for an object array.
|
static SerIterator |
collection(java.util.Collection<?> coll,
java.lang.Class<?> declaredType,
java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterator wrapper for
Collection. |
SerIterator |
create(java.lang.Object value,
MetaProperty<?> prop,
java.lang.Class<?> beanClass) |
Creates an iterator wrapper for a meta-property value.
|
SerIterator |
create(java.lang.Object value,
MetaProperty<?> prop,
java.lang.Class<?> beanClass,
boolean allowPrimitiveArrays) |
Creates an iterator wrapper for a meta-property value.
|
SerIterator |
createChild(java.lang.Object value,
SerIterator parent) |
Creates an iterator wrapper for a value retrieved from a parent iterator.
|
SerIterable |
createIterable(java.lang.String metaTypeDescription,
JodaBeanSer settings,
java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes) |
Creates an iterator wrapper for a meta-type description.
|
SerIterable |
createIterable(MetaProperty<?> prop,
java.lang.Class<?> beanClass) |
Creates an iterator wrapper for a meta-property value.
|
SerIterable |
createIterable(MetaProperty<?> prop,
java.lang.Class<?> beanClass,
boolean allowPrimitiveArrays) |
Creates an iterator wrapper for a meta-property value.
|
SerIterable |
createIterable(SerIterable iterable) |
Creates an iterator wrapper for a child where there are second level generic parameters.
|
protected java.lang.Class<?> |
defaultToObjectClass(java.lang.Class<?> type) |
Defaults input class to Object class.
|
static SerIterable |
list(java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
List. |
static SerIterable |
map(java.lang.Class<?> keyType,
java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
Map. |
static SerIterator |
map(java.util.Map<?,?> map,
java.lang.Class<?> declaredType,
java.lang.Class<?> keyType,
java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterator wrapper for
Map. |
static SerIterable |
navigableMap(java.lang.Class<?> keyType,
java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
NavigableMap. |
static SerIterable |
navigableSet(java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
NavigableSet. |
static SerIterable |
set(java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
Set. |
static SerIterable |
sortedMap(java.lang.Class<?> keyType,
java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
SortedMap. |
static SerIterable |
sortedSet(java.lang.Class<?> valueType,
java.util.List<java.lang.Class<?>> valueTypeTypes) |
Gets an iterable wrapper for
SortedSet. |
public static final SerIteratorFactory INSTANCE
public static final java.util.List<java.lang.Class<?>> EMPTY_VALUE_TYPES
public SerIterator create(java.lang.Object value, MetaProperty<?> prop, java.lang.Class<?> beanClass, boolean allowPrimitiveArrays)
value - the possible collection-like object, not nullprop - the meta-property defining the value, not nullbeanClass - the class of the bean, not the meta-property, for better generics, not nullallowPrimitiveArrays - whether to allow primitive arrayspublic SerIterator create(java.lang.Object value, MetaProperty<?> prop, java.lang.Class<?> beanClass)
value - the possible collection-like object, not nullprop - the meta-property defining the value, not nullbeanClass - the class of the bean, not the meta-property, for better generics, not nullpublic SerIterator createChild(java.lang.Object value, SerIterator parent)
Allows the parent iterator to define the child iterator using generic type information.
This handles cases such as a List as the value in a Map.
value - the possible collection-like object, not nullparent - the parent iterator, not nullprotected java.lang.Class<?> defaultToObjectClass(java.lang.Class<?> type)
type - the type, may be nullpublic SerIterable createIterable(java.lang.String metaTypeDescription, JodaBeanSer settings, java.util.Map<java.lang.String,java.lang.Class<?>> knownTypes)
metaTypeDescription - the description of the collection type, not nullsettings - the settings object, not nullknownTypes - the known types map, null if not using known type shorteningpublic SerIterable createIterable(SerIterable iterable)
iterable - the parent iterable, not nullpublic SerIterable createIterable(MetaProperty<?> prop, java.lang.Class<?> beanClass, boolean allowPrimitiveArrays)
prop - the meta-property defining the value, not nullbeanClass - the class of the bean, not the meta-property, for better generics, not nullallowPrimitiveArrays - whether to allow primitive arrayspublic SerIterable createIterable(MetaProperty<?> prop, java.lang.Class<?> beanClass)
prop - the meta-property defining the value, not nullbeanClass - the class of the bean, not the meta-property, for better generics, not nullpublic static final SerIterable list(java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
List.valueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable set(java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
Set.valueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable sortedSet(java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
SortedSet.valueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable navigableSet(java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
NavigableSet.valueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterator collection(java.util.Collection<?> coll, java.lang.Class<?> declaredType, java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
Collection.coll - the collection, not nulldeclaredType - the declared type, not nullvalueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable map(java.lang.Class<?> keyType, java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
Map.keyType - the value type, not nullvalueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable sortedMap(java.lang.Class<?> keyType, java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
SortedMap.keyType - the value type, not nullvalueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable navigableMap(java.lang.Class<?> keyType, java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
NavigableMap.keyType - the value type, not nullvalueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterator map(java.util.Map<?,?> map, java.lang.Class<?> declaredType, java.lang.Class<?> keyType, java.lang.Class<?> valueType, java.util.List<java.lang.Class<?>> valueTypeTypes)
Map.map - the collection, not nulldeclaredType - the declared type, not nullkeyType - the value type, not nullvalueType - the value type, not nullvalueTypeTypes - the generic parameters of the value typepublic static final SerIterable array(java.lang.Class<?> valueType)
valueType - the value type, not nullpublic static final SerIterator array(java.lang.Object[] array, java.lang.Class<?> declaredType, java.lang.Class<?> valueType)
array - the array, not nulldeclaredType - the declared type, not nullvalueType - the value type, not nullCopyright © 2007–2018 Joda.org. All rights reserved.