Top Description Fields Constructors Methods
org.springframework.beans.factory.support

public Class ManagedList<E>

extends ArrayList<E>
implements Mergeable, BeanMetadataElement
Class Inheritance
All Implemented Interfaces
org.springframework.beans.BeanMetadataElement, org.springframework.beans.Mergeable
Known Direct Subclasses
org.springframework.beans.factory.support.ManagedArray
Annotations
@SuppressWarnings:serial
Type Parameters
<E>
the element type
Imports
java.util.ArrayList, .Collections, .List, org.springframework.beans.BeanMetadataElement, .Mergeable, org.springframework.lang.Nullable

Tag collection class used to hold managed List elements, which may include runtime bean references (to be resolved into bean objects).
Authors
Rod Johnson, Rob Harrop, Juergen Hoeller, Stephane Nicoll, Sam Brannen
Since
27.05.2003

Field Summary

Modifier and TypeField and Description
private String
private boolean
private Object

Constructor Summary

AccessConstructor and Description
public
public
ManagedList(int initialCapacity)

Method Summary

Modifier and TypeMethod and Description
public String
getElementTypeName()

Return the default element type name (class name) to be used for this list.

public Object
getSource()

Overrides default org.springframework.beans.BeanMetadataElement.getSource.

Return the configuration source Object for this metadata element (may be null).

public boolean
isMergeEnabled()

Implements org.springframework.beans.Mergeable.isMergeEnabled.

Is merging enabled for this particular instance?

public List<E>
merge(Object
the object to merge with
parent
)

Implements org.springframework.beans.Mergeable.merge.

Merge the current value set with that of the supplied object.

public static <
the List's element type
E
>
ManagedList<E>

Returns:

a ManagedList containing the specified elements
of
(E...
the elements to be contained in the list
elements
)

Hides java.util.List.of, java.util.List.of.

Create a new instance containing an arbitrary number of elements.

public void
setElementTypeName(String elementTypeName)

Set the default element type name (class name) to be used for this list.

public void
setMergeEnabled(boolean mergeEnabled)

Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.

public void
setSource(Object source)

Set the configuration source Object for this metadata element.

Inherited from java.util.ArrayList:
addaddaddAlladdAlladdFirstaddLastclearclonecontainsensureCapacityequalsforEachgetgetFirstgetLasthashCodeindexOfisEmptyiteratorlastIndexOflistIteratorlistIteratorremoveremoveremoveAllremoveFirstremoveIfremoveLastremoveRangereplaceAllretainAllsetsizesortspliteratorsubListtoArraytoArraytrimToSize

Field Detail

elementTypeNameback to summary
private String elementTypeName
Annotations
@Nullable
mergeEnabledback to summary
private boolean mergeEnabled
sourceback to summary
private Object source
Annotations
@Nullable

Constructor Detail

ManagedListback to summary
public ManagedList()
ManagedListback to summary
public ManagedList(int initialCapacity)

Method Detail

getElementTypeNameback to summary
public String getElementTypeName()

Return the default element type name (class name) to be used for this list.

Annotations
@Nullable
getSourceback to summary
public Object getSource()

Overrides default org.springframework.beans.BeanMetadataElement.getSource.

Doc from org.springframework.beans.BeanMetadataElement.getSource.

Return the configuration source Object for this metadata element (may be null).

Annotations
@Override
@Nullable
isMergeEnabledback to summary
public boolean isMergeEnabled()

Implements org.springframework.beans.Mergeable.isMergeEnabled.

Doc from org.springframework.beans.Mergeable.isMergeEnabled.

Is merging enabled for this particular instance?

Annotations
@Override
mergeback to summary
public List<E> merge(Object parent)

Implements org.springframework.beans.Mergeable.merge.

Doc from org.springframework.beans.Mergeable.merge.

Merge the current value set with that of the supplied object.

The supplied object is considered the parent, and values in the callee's value set must override those of the supplied object.

Parameters
parent:Object

the object to merge with

Returns:List<E>

the result of the merge operation

Annotations
@Override
@SuppressWarnings:unchecked
ofback to summary
public static <E> ManagedList<E> of(E... elements)

Hides java.util.List.of, java.util.List.of.

Create a new instance containing an arbitrary number of elements.

Parameters
<E>
the List's element type
elements:E[]

the elements to be contained in the list

Returns:ManagedList<E>

a ManagedList containing the specified elements

Annotations
@SafeVarargs
@SuppressWarnings:varargs
Since
5.3.16
setElementTypeNameback to summary
public void setElementTypeName(String elementTypeName)

Set the default element type name (class name) to be used for this list.

setMergeEnabledback to summary
public void setMergeEnabled(boolean mergeEnabled)

Set whether merging should be enabled for this collection, in case of a 'parent' collection value being present.

setSourceback to summary
public void setSource(Object source)

Set the configuration source Object for this metadata element.

The exact type of the object will depend on the configuration mechanism used.